Re: lag() default value ignored for some window partition depending on table records count?

Поиск
Список
Период
Сортировка
От Loïc Revest
Тема Re: lag() default value ignored for some window partition depending on table records count?
Дата
Msg-id CABkOrLsPtG=fgHTuTQz35RMx1jvFJ8NN1Nrvto-b4hQB8hS5oQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: lag() default value ignored for some window partition depending on table records count?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
>> On Wed, 27 Apr 2022 at 10:48, David G. Johnston
>> <david.g.johnston@gmail.com> wrote:
>>
>> There can only be qual pushdown when the column in the qual is present
>> in the PARTITION BY clause. In this case, there's no PARTITION BY
>> clause, so can't be pushdowns.
>>
peer_id being only used as a sort criterion instead of the
partitioning factor is indeed the culprit, and a true shame I haven't
figured it out on my own.

lag(<value>, 1, 0::numeric) OVER (PARTITION BY peer_id ORDER BY
calculation_time) returns 0::numeric for first row in partition, as
expected.

Thanks a lot to all three of you for pointing it out to me, and my
apologies for the unrelevant noise on that list.

Regards,
L. Revest



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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: psql emit WARNING if built with option --with-extra-version and the option only contains numbers
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: [issue] wal_buffers_full increases depending on the values of wal_buffers and wal-segsize