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

From: Brendan Jurd <direvus(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Christopher Browne <cbbrowne(at)gmail(dot)com>, Darren Duncan <darren(at)darrenduncan(dot)net>, Eric Ridge <eebbrr(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Mark Mielke <mark(at)mark(dot)mielke(dot)cc>, David Wilson <david(dot)t(dot)wilson(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?
Date: 2011-11-01 10:12:46
Message-ID: CADxJZo3WLHFQL_nmnSP_0MwvvOd9NRY9kyu+7H7VhhdWXAq=MQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1 November 2011 00:14, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
> On 10/30/2011 10:00 PM, Christopher Browne wrote:
>> I don't think I wish it.  We're telling our developers not to use "select
>> *", and I don't think having "select * except " would change that policy,
>> beyond requiring us to waste time explaining :
>>
>> "No, we're not changing policy.  The fact that PGDG added this to 9.2 does
>> *not* imply our policy was wrong."
>>
>
> That's fine, and it's a good policy. A good policy might well exclude use of
> a number of available features (e.g. one place I know bans doing joins with
> ',' instead of explicit join operators). But I don't think it helps us
> decide what to support.
>
> The fact is that if you have 100 columns and want 95 of them, it's very
> tedious to have to specify them all, especially for ad hoc queries where the
> house SQL standards really don't matter that much.

I couldn't agree more with Andrew's comment. What's good for an ad
hoc psql query isn't congruent with what's good for your application
queries.

We could have " * EXCLUDING " and still say that it is undesirable in
all the same contexts that " * " is undesirable.

Cheers,
BJ

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2011-11-01 11:38:06 Re: IDLE in transaction introspection
Previous Message Marti Raudsepp 2011-11-01 10:01:43 Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?