Fujii.Yuki@df.MitsubishiElectric.co.jp писал 2023-06-06 15:31:
> Thanks for the explanation.
> I understand that the method of comparing two function name strings is
> incorrect.
> Instead, I added the parameter isaggpartialfunc indicating whether the
> aggregate
> function and its aggpartialfunc are the same or different.
Hi.
This seems to be more robust, but the interface became more strange.
I'm not sure what to do with it. Some ideas I had to avoid introducing
this parameter. Not sure I like any of them.
1) You can use QualifiedNameGetCreationNamespace() for aggpartialfnName
and still compare namespace and function name for it and aggName,
aggNamespace.
Seems to be not ideal, but avoids introducing new parameters.
2) You can lookup for partial aggregate function after ProcedureCreate()
in AggregateCreate(), if it wasn't found at earlier stages. If it is the
aggregate itself - check it. If it's still not found, error out. Also
seems to be a bit ugly - you leave uncommitted garbage for vacuum in
catalogue.
Another issue - the patch misses recording dependency between
aggpartialfn and aggregate procedure.
--
Best regards,
Alexander Pyhalov,
Postgres Professional