Re: 8.4b1: Query returning results in different order to 8.3

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 8.4b1: Query returning results in different order to 8.3
Дата
Msg-id 23286.1240089766@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 8.4b1: Query returning results in different order to 8.3  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Ответы Re: 8.4b1: Query returning results in different order to 8.3  (Grzegorz Jaskiewicz <gj@pointblue.com.pl>)
Re: 8.4b1: Query returning results in different order to 8.3  (Ian Barwick <barwick@gmail.com>)
Список pgsql-hackers
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> Ian Barwick wrote:
>> Note I'm not sure whether this is a bug, or whether the assumption
>> made for the original query (that the row order returned by the
>> subquery would be carried over to the main part of the query) is
>> incorrect but just happened to work as expected pre-8.4.

> The latter. Without an ORDER BY (at the outermost level), the order of 
> the result is not well defined. Before 8.4, UNION was always performed 
> by a Sort + Unique, which explains why the output is always sorted in 
> previous releases. 8.4 knows how to perform it with a Hash Aggregate, 
> which doesn't yield sorted output.

This is mentioned in the release notes, but I suppose we'd better
promote it to the "observe the following incompatibilities" list...
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: 8.4b1: Query returning results in different order to 8.3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [GENERAL] Performance of full outer join in 8.3