Re: select random order by random - Mailing list pgsql-general

From Tom Lane
Subject Re: select random order by random
Date
Msg-id 15358.1193951493@sss.pgh.pa.us
Whole thread Raw
In response to Re: select random order by random  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
Martijn van Oosterhout <kleptog@svana.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

pgsql-general by date:

Previous
From: "Pavel Stehule"
Date:
Subject: Re: Scrolling cursors in PL/PgSQL
Next
From: Tom Lane
Date:
Subject: Re: Scrolling cursors in PL/PgSQL