[postgis-users] Except
Barend K=?ISO-8859-1?B?9g==?=bben
kobben at itc.nl
Wed Nov 28 15:10:58 PST 2007
Auw!
That's what a all a nasty hack...
What's wrong with just doing a
SELECT thing _want_want1,..., thing _want_n
And not include the thing_you_dont_want in the list...?
__
Barend Köbben
International Institute for Geo-information
Sciences and Earth Observation (ITC)
PO Box 6, 7500AA Enschede (The Netherlands)
ph: +31 (0)53 4874253; fax: +31 (0)53 4874335
On 28-11-2007 23:07, "Chander Ganesan" <chander at otg-nc.com> wrote:
> Matt Doughty wrote:
>>
>> Hi,
>>
>>
>>
>> Is there a way of selecting all fields except one in particular? I'd
>> like to create a query that says something like: select * except
>> field01. The thing is the query needs to be valid for a number of
>> different tables, each with a different set of fields apart from one
>> (gid), which I don't want to select.
>>
> Well, you could do the following:
>
> begin transaction;
> alter table table_name drop column field01;
> select * from table_name;
> rollback;
>
> I think that should work. Keep in mind that you wouldn't want to commit
> the transaction, or you would lose the column data.
>
> Don't try this in other databases, PostgreSQL's DDL is transaction
> safe...so you can do such things.
>
> Hope that helps
More information about the postgis-users
mailing list