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

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

From: Eric Ridge <eebbrr(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?
Date: 2011-10-29 22:53:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Sat, Oct 29, 2011 at 6:35 PM, Stephen Frost <sfrost(at)snowman(dot)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.


In response to

pgsql-hackers by date

Next:From: Darren DuncanDate: 2011-10-29 22:55:21
Subject: Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?
Previous:From: Stephen FrostDate: 2011-10-29 22:35:47
Subject: Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?

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