Re: Preserving order through an inner join

From: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Kevin Jardine <kevinjardine(at)yahoo(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Preserving order through an inner join
Date: 2010-09-27 18:32:07
Message-ID: AANLkTimSGOo87ygDd+8O-zXAgpD_UETPt7o2zEap-0CK@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Sep 26, 2010 at 9:37 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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(dot)gurjeet(at){ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet

Mail sent from my BlackLaptop device

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Darren Duncan 2010-09-27 19:00:44 Re: Preserving order through an inner join
Previous Message Dave Page 2010-09-27 18:19:10 Re: Database Cluster Initialisation Failed" error during PostgreSQL install