Re: GROUP BY column alias? - Mailing list pgsql-general

From David Fetter
Subject Re: GROUP BY column alias?
Date
Msg-id 20100219185235.GF27534@fetter.org
Whole thread Raw
In response to Re: GROUP BY column alias?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: GROUP BY column alias?
List pgsql-general
On Fri, Feb 19, 2010 at 12:07:42AM -0500, Tom Lane wrote:
> Lew <noone@lwsc.ehost-services.com> writes:
> > Eric B. Ridge wrote:
> >> That explains it.  Thanks.  Breaks the rule of least surprise,
> >> but it is SQL.
>
> SQL:1999 and later use a slightly different definition which is not
> entirely upward compatible with SQL-92. In most cases, however,
> PostgreSQL will interpret an ORDER BY or GROUP BY expression the
> same way SQL:1999 does.

The current SQL standard *supersedes* all previous ones.  There isn't
a hierarchy in the sense of "higher levels of compliance" that our
docs implicitly and falsely assume in many spots, and we need to make
them stop including this idea.

The only standard actually worth citing today is SQL:2008, and the day
the next one comes out, we need to change all our references to cite
it.

Cheers,
David.
--
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Compiling .pgc programs gives error
Next
From: Tom Lane
Date:
Subject: Re: GROUP BY column alias?