Fujii.Yuki@df.MitsubishiElectric.co.jp писал 2023-09-27 01:35:
> Hi Mr.Momjian, Mr.Pyhalov.
>
> Tuesday, 26 September 2023 22:15 Alexander Pyhalov
> <a.pyhalov@postgrespro.ru>:
>> Do you mean that extra->partial_target->sortgrouprefs is not replaced,
>> and so we preserve tlesortgroupref numbers?
> Yes, that is correct.
>
>> I'm suspicious about rewriting extra->partial_target->exprs with
>> partial_target->exprs - I'm still not sure why we
>> don't we loose information, added by add_column_to_pathtarget() to
>> extra->partial_target->exprs?
>>
Hi.
In postgres_fdw.sql
"Partial aggregates are unsafe to push down having clause when there are
partial aggregates" - this comment likely should be fixed.
Some comments should be added to setGroupClausePartial() and to
make_partial_grouping_target() - especially why setGroupClausePartial()
is called prior to add_new_columns_to_pathtarget().
I'm not sure that I like this mechanics of adding sort group clauses -
it seems we do in core additional work, which is of use only for
one extension, but at least it seems to be working.
--
Best regards,
Alexander Pyhalov,
Postgres Professional