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

From Eric Ridge
Subject Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?
Date
Msg-id CANcm6wZMvFRpKsC3=PPiD9SApYgF7Po+XrsSfp8t=4zpMRvCnQ@mail.gmail.com
Whole thread Raw
In response to Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
On Sat, Oct 29, 2011 at 6:35 PM, Stephen Frost <sfrost@snowman.net> wrote:
>> Maybe the SQL spec says something about this and nobody's done the work yet?
>
> I don't know of anything like this in the spec.  Also, there would be
> concern about this possibly going against spec, breaking possibly valid
> queries, promoting keywords to reserved words, and maybe ending up in a
> bad situation if the SQL committee decides to support that kind of
> syntax for something completely different.

At least concerning breaking valid queries and promoting keywords, I
don't think the former can happen (they'd fail to parse today) and the
latter doesn't seem necessary as "EXCLUDING"'s use in this case
appears to be completely unambiguous.

However, I realize there's no second-guessing what the SQL committee
might do in the future.

> In general, I doubt this is something we'd implement, but others may
> feel differently.

I hope so.  :)

> What might be interesting to consider is how hard it
> would be to make psql smarter when it comes to line editing in this
> regard.  Maybe if there was a way to easily expand the '*' from psql and
> then you could remove the columns from the list easily..?

Probably really dang hard, especially when you consider a "SELECT *"
involving lots of joins.  And even if it turned out to be easy, it
would be limited to psql.

Anyways, it's just something I've wanted for quite awhile and thought
I'd actually do the work to make it happen, *if* y'all would take it.

eric


pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?
Next
From: Darren Duncan
Date:
Subject: Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?