[SQL] alter column from varchar(32) to varchar(255) without view re-creation

2009-02-24 Thread Emi Lu
Good morning, I am using PostgreSQL 8.0.15. Is there a way that I can easily alter column type from varchar(32) to varchar(255) but do not have to worry about views dependent on it? If Psql could support column alter without views' dependencies, that will be great! Thanks a lot, - Lu Ying

Re: [SQL] alter column from varchar(32) to varchar(255) without view re-creation

2009-02-24 Thread Marcin Stępnicki
On Tue, Feb 24, 2009 at 4:27 PM, Emi Lu em...@encs.concordia.ca wrote: Good morning, I am using PostgreSQL 8.0.15. Is there a way that I can easily alter column type from varchar(32) to varchar(255) but do not have to worry about views dependent on it? You should test it carefully and it is

[SQL] Best practices for geo-spatial city name searches?

2009-02-24 Thread Mark Stosberg
Hello, I use PostgreSQL and the cube type to perform geo-spatial zipcode proximity searches. I'm wondering about the best practices also supporting a geo-spatial distance search based on a city name rather than zipcode. In our original data model, we used a 'zipcodes' table, with the zipcode as

Re: [SQL] Best practices for geo-spatial city name searches?

2009-02-24 Thread johnf
On Tuesday 24 February 2009 08:19:56 am Mark Stosberg wrote: Hello, I use PostgreSQL and the cube type to perform geo-spatial zipcode proximity searches. I'm wondering about the best practices also supporting a geo-spatial distance search based on a city name rather than zipcode. In our

Re: [SQL] Best practices for geo-spatial city name searches?

2009-02-24 Thread Fernando Hevia
-Mensaje original- From: Mark Stosberg Hello, I use PostgreSQL and the cube type to perform geo-spatial zipcode proximity searches. I'm wondering about the best practices also supporting a geo-spatial distance search based on a city name rather than zipcode. In our

[SQL] Add column by using SELECT statement

2009-02-24 Thread John Zhang
Hi all, I was wondering how I can add a column and populate it by some query. For example: TblA (Id, fld1) TblB(Id, fld1, fld2) I have a query: SELECT b.fld2 FROM tblB b WHERE condition1 what I want to do is add a column in tblA: fld2 and polpulate the newly added field with the query on

Re: [SQL] Add column by using SELECT statement

2009-02-24 Thread A. Kretschmer
In response to John Zhang : Hi all, I was wondering how I can add a column and populate it by some query. For example: TblA (Id, fld1) TblB(Id, fld1, fld2) I have a query: SELECT b.fld2 FROM tblB b WHERE condition1 what I want to do is add a column in tblA: fld2 and polpulate