Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET
Дата
Msg-id Z-NSjcQmQjFiC5mc@paquier.xyz
обсуждение исходный текст
Ответ на Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET  (David Rowley <dgrowleyml@gmail.com>)
Ответы RE: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET
Re: Query ID Calculation Fix for DISTINCT / ORDER BY and LIMIT / OFFSET
Список pgsql-hackers
On Wed, Mar 26, 2025 at 11:56:50AM +1300, David Rowley wrote:
> Here is the v8 version with the bug fix and performance stuff
> separated out.

Why not.  I assume that you would merge these together?

> I also added the Assert code to ensure we always add
> something to the jumble buffer when jumbling a node.

Thanks.  This part looks good with its USE_ASSERT_CHECKING.

> I didn't include the regression tests I saw in the v2b patch [1]. I
> felt these were just marking the fact that there used to be a bug
> here.

I disagree about the lack of tests.  These are cheap to add.  I'd
suggest to not use the ones posted as part of v2 variant B as these do
not require the creation of a relation so they can be made cheaper,
and instead use the set I have posted in patch 0001 here which covers
most of the main scenarios from the parser with this nodes in the
Query:
https://www.postgresql.org/message-id/Z9z85Ui5lPkPn2hq@paquier.xyz

It is a bit disappointing that we require JumbleQuery() to jumble the
NULLs.  There are discussions about making this code available not
only for Querys, but for Nodes, and the NUL computations would be
missed..
--
Michael

Вложения

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