Re: select random order by random

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Martijn van Oosterhout <kleptog(at)svana(dot)org>
Cc: Richard Huxton <dev(at)archonet(dot)com>, Gregory Stark <stark(at)enterprisedb(dot)com>, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>, Lee Keel <lee(dot)keel(at)uai(dot)com>, piotr_sobolewski <piotr_sobolewski(at)o2(dot)pl>, pgsql-general(at)postgresql(dot)org
Subject: Re: select random order by random
Date: 2007-11-01 21:11:33
Message-ID: 15358.1193951493@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> Something twigged telling me that in fact the latter expression is not
> in standard SQL but a (very common) extension. A <sort key> is clearly
> indicated to be a <value expression> with no indication anywhere that
> column aliases are allowed here (though that may be in the common rules
> somewhere).

SQL92 says differently. The committee basically redefined ORDER BY
entirely between SQL92 and SQL99.

What we actually try to support is both SQL92 and SQL99 interpretations,
which is a pretty unholy mess, but enough people (and programs) are used
to the SQL92 way that I don't foresee being able to drop it.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2007-11-01 21:19:36 Re: [GENERAL] Abbreviation list
Previous Message Pavel Stehule 2007-11-01 21:05:38 Re: Scrolling cursors in PL/PgSQL