Re: SQL feature requests - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: SQL feature requests
Date
Msg-id 87ir76417w.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: SQL feature requests  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: SQL feature requests  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> Gregory Stark <stark@enterprisedb.com> writes:
>> This seems like a particularly petty case compared to a lot of other
>> extensions we do allow.
>
> That's exactly the problem.  Most of our other extensions are justified
> by some significant capability gain.  This isn't --- it provides zero
> new functionality, and the "convenience" factor amounts to the saving of
> one keystroke (ok, maybe two if you insist on a space before the alias).
> Pretty weak argument...

I think we're talking about two different things. I'm referring to this:

postgres=# select * from (select * from test);
ERROR:  subquery in FROM must have an alias
HINT:  For example, FROM (SELECT ...) [AS] foo.

I get this about once a day because I frequently type this ad-hoc query and
always forget to put the alias in the first time:

postgres=# select count(*),n from (select count(*) as n from test group by i) group by n;
ERROR:  subquery in FROM must have an alias
HINT:  For example, FROM (SELECT ...) [AS] foo.


Not to say that four is a lot larger than one but if we're talking about two
different things then we're not likely to reach any kind of agreement...

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Add configure option --with-system-tzdata to use operating system
Next
From: "Joshua D. Drake"
Date:
Subject: Re: SQL feature requests