Re: generating function default settings from pg_proc.dat

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2026-02-16T18:07:34Z
Lists: pgsql-hackers
> On 16 Feb 2026, at 18:31, Andrew Dunstan <andrew@dunslane.net> wrote:

> Motivated by Bug 19409 [1] I decided to do something about a wart that has bugged me for a while, namely the requirement to write stuff in system_views.sql if you need to specify default values for function arguments.

I haven't studied the patch yet, but a big +many on the idea.  This has bugged
me many times.

--
Daniel Gustafsson




Commits

  1. Simplify creation of built-in functions with non-default ACLs.

  2. Be more wary of false matches in initdb's replace_token().

  3. Simplify creation of built-in functions with default arguments.