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

Поиск
Список
Период
Сортировка
От DINESH NAIR
Тема Re: [Question] Window Function Results without ORDER BY Clause
Дата
Msg-id PN4P287MB4381B382BCDD312672D5B0AE9C4BA@PN4P287MB4381.INDP287.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответ на Re: [Question] Window Function Results without ORDER BY Clause  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi, 

David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Friday, July 11, 2025, Zhang Mingli <zmlpostgres@gmail.com> wrote:
>> 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.

Well, it's our own regression-test query.  I think the actual question
being asked here is "do our regression tests need to pass under random
non-default GUC settings?".  I'd say no; it'd be next door to
impossible to guarantee that.  If this query gave unstable
results
in practice, we'd have noticed
by now (it's been there since 2010).

                        regards, tom lane

Would like to know .. 

Thanks in advance 

Dinesh



From: Tom Lane <tgl@sss.pgh.pa.us>
Sent: Friday, July 11, 2025 9:27 PM
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Zhang Mingli <zmlpostgres@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: [Question] Window Function Results without ORDER BY Clause
 
Caution: This email was sent from an external source. Please verify the sender’s identity before clicking links or opening attachments.

"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Friday, July 11, 2025, Zhang Mingli <zmlpostgres@gmail.com> wrote:
>> 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.

Well, it's our own regression-test query.  I think the actual question
being asked here is "do our regression tests need to pass under random
non-default GUC settings?".  I'd say no; it'd be next door to
impossible to guarantee that.  If this query gave unstable results
in practice, we'd have noticed by now (it's been there since 2010).

                        regards, tom lane


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