Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."? - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?
Date
Msg-id 46558BD3-62E1-4256-AA4D-F8D8DA0C9F18@nasby.net
Whole thread Raw
In response to Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?  ("Joshua D. Drake" <jd@commandprompt.com>)
Responses Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?
List pgsql-hackers
On Oct 29, 2011, at 11:53 PM, Joshua D. Drake wrote:
> On 10/29/2011 03:26 PM, Eric Ridge wrote:
>>
>> Would y'all accept a patch that extended the "SELECT *" syntax to let
>> you list fields to exclude from the A_Star?
>>
>> Quite regularly I'll be testing queries via psql and want to see all
>> the columns from a fairly wide table except maybe a giant text or xml
>> column.  A syntax like:
>>
>>      SELECT * EXCLUDING (big_col1, big_col2) FROM foo;
>>
>
> If it is quite regular I would actually argue two things:
>
> 1. Use a view

If you know that you want all fields except X, Y and Z, why should you be forced to manually cut and paste all the
otherfields into the view definition? That's wasted time and effort that could better be spent elsewhere. 
--
Jim C. Nasby, Database Architect                   jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net




pgsql-hackers by date:

Previous
From: pasman pasmański
Date:
Subject: Re: ecpg-related build failure with make 3.82
Next
From: "Eric B. Ridge"
Date:
Subject: Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?