Re: SQL feature requests

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Michael Glaesemann" <grzm(at)seespotcode(dot)net>, "Ben Tilly" <btilly(at)gmail(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL feature requests
Date: 2007-08-23 17:20:19
Message-ID: 87ir76417w.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> Gregory Stark <stark(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2007-08-23 17:25:26 Re: SQL feature requests
Previous Message Tom Lane 2007-08-23 17:19:17 Re: [COMMITTERS] pgsql: Add configure option --with-system-tzdata to use operating system