[postgis-users] Except

Kevin Neufeld kneufeld at refractions.net
Wed Nov 28 08:04:14 PST 2007


Sorry, my bad... I misread your question. 

You might be able to write a plpgsql function that went looking at the 
system tables for a list of all your columns for a given table and then 
build a query using the columns of your choice.
-- Kevin

Kevin Neufeld wrote:
> How about,
>
> SELECT col1, col2, col3 FROM my_tbl
> EXCEPT
> (SELECT col1, col2, col3 FROM my_tbl LIMIT 1);
>
> -- Kevin
>
> 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.
>>
>> Cheers,
>>
>> Matt
>>
>> Matt Doughty
>>
>>     
>>
>> GEOGRAMA S.L.
>>
>> Tel.: +34 945 13 13 72 652 77 14 15
>>
>> Fax: +34 945 23 03 40
>>
>> www.geograma.com
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>   
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list