"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