Re: generating function default settings from pg_proc.dat

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Álvaro Herrera <alvherre@kurilemu.de>, Corey Huinker <corey.huinker@gmail.com>, Andrew Dunstan <andrew@dunslane.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2026-03-05T23:36:54Z
Lists: pgsql-hackers
Hi,

On 2026-03-05 17:44:06 -0500, Tom Lane wrote:
> I wrote:
> > =?utf-8?Q?=C3=81lvaro?= Herrera <alvherre@kurilemu.de> writes:
> >> I think this is an OK arrangement, but perhaps there should be a comment
> >> in system_views.sql about it.
> 
> > Yeah, that'd be a good thing to do if we keep it like this.  Perhaps
> > more or less
> 
> >  * Some of these views are not meant to be publicly readable.  The
> >  * underlying function(s) for such a view should not be publicly
> >  * executable either --- but by default they will be.  Don't forget to
> >  * adjust function permissions (in pg_proc.dat) when adding a new view.
> 
> Hearing no further comments, pushed like that.

Thanks a lot for working on this!

Greetings,

Andres Freund



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.