Re: [Question] Window Function Results without ORDER BY Clause

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: [Question] Window Function Results without ORDER BY Clause
Дата
Msg-id CAKFQuwZE-6ezOJprZeMgDFLUU79kD_x+4_Qh90_WT=ekJcrEaw@mail.gmail.com
обсуждение исходный текст
Ответ на [Question] Window Function Results without ORDER BY Clause  (Zhang Mingli <zmlpostgres@gmail.com>)
Ответы Re: [Question] Window Function Results without ORDER BY Clause
Список pgsql-hackers
On Friday, July 11, 2025, Zhang Mingli <zmlpostgres@gmail.com> wrote:

Referring to the SQL 2011 standard, it states that if ORDER BY is omitted, the order of rows in the partition is undefined. 
While using a window function without ORDER BY is valid, the resulting output seems unpredictable.

So, are both result sets technically correct given the absence of an ORDER BY clause?

The system is behaving within the requirements of the specification.  The query itself is bugged code that the query author should fix.

David J.

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