Re: Add proper planner support for ORDER BY / DISTINCT aggregates

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Add proper planner support for ORDER BY / DISTINCT aggregates
Date: 2021-07-02 20:51:51
Message-ID: 1155682.1625259111@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gavin Flower <GavinFlower(at)archidevsys(dot)co(dot)nz> writes:
> On 2/07/21 8:39 pm, David Rowley wrote:
>> That's a good question. There was an argument in [1] that mentions
>> that there might be a group of people who rely on aggregation being
>> done in a certain order where they're not specifying an ORDER BY
>> clause in the aggregate. If that group of people exists, then it's
>> possible they might be upset in the scenario that you describe.

> So I think that pg has no obligation to protect the sensibilities of
> naive users in this case, especially at the expense of users that want
> queries to complete as quickly as possible.  IMHO

I agree. We've broken such expectations in the past and I don't
have much hesitation about breaking them again.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-07-02 20:56:54 Re: psql - factor out echo code
Previous Message Tom Lane 2021-07-02 20:49:17 Re: logical replication worker accesses catalogs in error context callback