Re: Preserving order through an inner join - Mailing list pgsql-general

From Gurjeet Singh
Subject Re: Preserving order through an inner join
Date
Msg-id AANLkTimSGOo87ygDd+8O-zXAgpD_UETPt7o2zEap-0CK@mail.gmail.com
Whole thread Raw
In response to Re: Preserving order through an inner join  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Preserving order through an inner join  (Darren Duncan <darren@darrenduncan.net>)
List pgsql-general
On Sun, Sep 26, 2010 at 9:37 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

The SQL standard explicitly disavows any particular
output row order unless there is a top-level ORDER BY.  (In fact,
unless things have changed recently an ORDER BY in a sub-select isn't
even legal per spec.)


Not sure about the SQL spec allowing it, but an ORDER BY followed by a LIMIT does have valid use cases in sub-selects.

Regards,
--
gurjeet.singh
@ EnterpriseDB - The Enterprise Postgres Company
http://www.EnterpriseDB.com

singh.gurjeet@{ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet

Mail sent from my BlackLaptop device

pgsql-general by date:

Previous
From: Andy Colson
Date:
Subject: PG 9.0 large object permissions
Next
From: Darren Duncan
Date:
Subject: Re: Preserving order through an inner join