* Eric Ridge (eebbrr(at)gmail(dot)com) wrote:
> It seems like such a syntax would better document the
> intent of a query too, rather than leaving one wondering if "big_col1"
> was supposed to be omitted from the target list or not.
Well, I expect most here would say that any application query should be
specific about exactly what columns it wants (iow- don't use select * in
your apps :). As for it being useful in psql, I could see that.
> Anyways, I just wanted to run the idea by youse guys before I put too
> much more effort into it. I've already made what appear to be the
> minimum necessary changes to gram.y, and a few quick greps through the
> code make me think the rest will be pretty easy.
> 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.
In general, I doubt this is something we'd implement, but others may
feel differently. 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..?
In response to
pgsql-hackers by date
|Next:||From: Eric Ridge||Date: 2011-10-29 22:53:50|
|Subject: Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?|
|Previous:||From: Eric Ridge||Date: 2011-10-29 22:26:19|
|Subject: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?|