Preserving order through an inner join

Поиск
Список
Период
Сортировка
От Kevin Jardine
Тема Preserving order through an inner join
Дата
Msg-id 551808.43868.qm@web52908.mail.re2.yahoo.com
обсуждение исходный текст
Ответы Re: Preserving order through an inner join  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: Preserving order through an inner join  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Preserving order through an inner join  ("Igor Neyman" <ineyman@perceptron.com>)
Re: Preserving order through an inner join  (Darren Duncan <darren@darrenduncan.net>)
Список pgsql-general
I have a query structured like this:

SELECT stuff FROM
(SELECT more stuff FROM
table1
ORDER BY field1) AS q1
INNER JOIN table2 ON ( ... )

and have found that the INNER JOIN is ignoring the order set for q1.

The final results are not ordered by field1.

This works for other databases (eg. MySQL and Sqllite3) but not PostgreSQL.

I would really like to support PostgreSQL but this ordering problem is stopping me from doing so.

I can make some small changes to the query structure as long as it works for the other DBs as well. Moving the ORDER BY
outsideq1 would be a large amount of work, however (these queries are generated by a program), so I am hoping that
thereis a simpler solution. 

Any suggestions for getting this to work?

Kevin




В списке pgsql-general по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: Visualize GiST Index
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Preserving order through an inner join