Re: Preserving order through an inner join

Поиск
Список
Период
Сортировка
Искать
От
Darren Duncan
Тема
Re: Preserving order through an inner join
Дата
Msg-id
4CA0EAC8.5080409@darrenduncan.net
Ответ на
Список
Дерево обсуждения
Preserving order through an inner join Kevin Jardine <kevinjardine@yahoo.com>
Re: Preserving order through an inner join Tom Lane <tgl@sss.pgh.pa.us>
Re: Preserving order through an inner join Kevin Jardine <kevinjardine@yahoo.com>
Re: Preserving order through an inner join Craig Ringer <craig@postnewspapers.com.au>
Re: Preserving order through an inner join Gurjeet Singh <singh.gurjeet@gmail.com>
Re: Preserving order through an inner join Darren Duncan <darren@darrenduncan.net>
Re: Preserving order through an inner join Darren Duncan <darren@darrenduncan.net>
Re: Preserving order through an inner join Pavel Stehule <pavel.stehule@gmail.com>
Re: Preserving order through an inner join Kevin Jardine <kevinjardine@yahoo.com>
Re: Preserving order through an inner join Karsten Hilbert <Karsten.Hilbert@gmx.net>
Re: Preserving order through an inner join "Igor Neyman" <ineyman@perceptron.com>
Gurjeet Singh wrote:
> On Sun, Sep 26, 2010 at 9:37 PM, Tom Lane  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.

Absolutely it does, but that is just a row *filtering* operation.  You still 
have to have a separate ORDER BY in the outermost query to get result rows 
output in a particular order. -- Darren Duncan
В списке pgsql-general по дате отправления
От: Darren Duncan
Дата:
От: David Boreham
Дата:
FAQ