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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Eric Ridge <eebbrr(at)gmail(dot)com>
Cc: Mark Mielke <mark(at)mark(dot)mielke(dot)cc>, Darren Duncan <darren(at)darrenduncan(dot)net>, David Wilson <david(dot)t(dot)wilson(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
Subject: Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?
Date: 2011-10-30 20:09:04
Message-ID: 26596.1320005344@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Eric Ridge <eebbrr(at)gmail(dot)com> writes:
> On Sun, Oct 30, 2011 at 3:38 PM, Mark Mielke <mark(at)mark(dot)mielke(dot)cc> wrote:
>> 2) Not deterministic (i.e. a database change might cause my code to break),

> Okay, I'm inventing a use-case here, but say you have a "users" table
> with various bits of metadata about the user, including password.
> Maybe, regardless of database changes, you never want the password
> column returned: SELECT * EXCLUDING (password) FROM tbl_users;

Well, here you're not only inventing a use-case, but you're making a lot
of contrary-to-fact-and-to-SQL-spec assumptions about when the * notation
gets expanded. This thing wouldn't be useful that way in views.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Eric Ridge 2011-10-30 20:27:51 Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?
Previous Message Tom Lane 2011-10-30 20:03:57 Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?