Re: Query Regarding frame options initialization in Window aggregate state

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query Regarding frame options initialization in Window aggregate state
Дата
Msg-id 3320047.1711558608@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [MASSMAIL] Query Regarding frame options initialization in Window aggregate state  (Vallimaharajan G <vallimaharajan.gs@zohocorp.com>)
Список pgsql-hackers
Vallimaharajan G <vallimaharajan.gs@zohocorp.com> writes:
> I am currently referring to the Postgres source code (psql (PostgreSQL) 14.3) and came across a particular section
relatedto window aggregate initialization that has left me with a question. Specifically, I noticed a conditional case
inthe initialization of per aggregate (initialize_peraggregate in nodeWindowAgg.c) where the winstate frameOptions is
beingchecked, but it appears that frameOptions is not set before this conditional case. 

You are right, and that's a bug.  It's not of major consequence ---
it would just cause us to set up for moving-aggregate mode when
we won't ever actually move the frame head -- but it's at least a
little bit inefficient.

While I'm looking at it, there's a pretty obvious typo in the
adjacent comment:

- * and collect the right set of fields from the pg_attribute entry.
+ * and collect the right set of fields from the pg_aggregate entry.

            regards, tom lane



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

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Re: Slow GRANT ROLE on PostgreSQL 16 with thousands of ROLEs
Следующее
От: Greg Sabino Mullane
Дата:
Сообщение: Re: Possibility to disable `ALTER SYSTEM`