Skip site navigation (1) Skip section navigation (2)

Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?

From: Jim Nasby <jim(at)nasby(dot)net>
To: Joshua D(dot) Drake <jd(at)commandprompt(dot)com>
Cc: Eric Ridge <eebbrr(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?
Date: 2011-10-30 18:15:01
Message-ID: 46558BD3-62E1-4256-AA4D-F8D8DA0C9F18@nasby.net (view raw or flat)
Thread:
Lists: 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 other fields into the view definition? That's wasted time and effort that could better be spent elsewhere.
--
Jim C. Nasby, Database Architect                   jim(at)nasby(dot)net
512.569.9461 (cell)                         http://jim.nasby.net



In response to

Responses

pgsql-hackers by date

Next:From: Robert HaasDate: 2011-10-30 18:49:40
Subject: Re: [v9.2] make_greater_string() does not return a string in some cases
Previous:From: pasman pasmańskiDate: 2011-10-30 18:13:04
Subject: Re: ecpg-related build failure with make 3.82

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group