>> 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