Thread
-
updates for handling optional argument in system functions
Mark Wong <markwkm@gmail.com> — 2025-12-09T23:28:59Z
Hi everyone, I noticed how it was preferred to define optional arguments with the system functions in system_functions.sql instead of defining them in pg_proc.dat. I took a gross stab at updating the ones that ended in _ext, which turned out to be 7 declarations across 6 system functions, and created a patch per system function, hoping it would be easier to review. Perhaps the most interesting thing to share is the total reduction of the lines of code, although system_functions.sql only grows: src/backend/catalog/system_functions.sql | 49 ++++++++ src/backend/utils/adt/ruleutils.c | 130 ---------------------- src/include/catalog/pg_proc.dat | 36 ++---- 3 files changed, 56 insertions(+), 159 deletions(-) Is that something we want? Regards, Mark -- Mark Wong <markwkm@gmail.com> EDB https://enterprisedb.com
-
Re: updates for handling optional argument in system functions
Daniel Gustafsson <daniel@yesql.se> — 2025-12-10T09:33:05Z
> On 10 Dec 2025, at 00:28, Mark Wong <markwkm@gmail.com> wrote: > Is that something we want? I have yet to study the patch, but conceptually I am favour of this. I find reading the code is easier when it's done this way. -- Daniel Gustafsson