Re: GROUP BY column alias?

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Lew <noone(at)lwsc(dot)ehost-services(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: GROUP BY column alias?
Date: 2010-02-19 18:52:35
Message-ID: 20100219185235.GF27534@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Feb 19, 2010 at 12:07:42AM -0500, Tom Lane wrote:
> Lew <noone(at)lwsc(dot)ehost-services(dot)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(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vick Khera 2010-02-19 18:58:02 Re: Doubts about oid
Previous Message Tom Lane 2010-02-19 18:30:04 Re: Compiling .pgc programs gives error