Re: generating function default settings from pg_proc.dat

Álvaro Herrera <alvherre@kurilemu.de>

From: Álvaro Herrera <alvherre@kurilemu.de>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Andrew Dunstan <andrew@dunslane.net>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2026-02-16T23:39:11Z
Lists: pgsql-hackers
On 2026-Feb-16, Andres Freund wrote:

> could be
> 
> { oid => '3786', descr => 'set up a logical replication slot',
>   proname => 'pg_create_logical_replication_slot', provolatile => 'v',
>   proparallel => 'u',
>   proargs => [
>      {type => 'name', name => 'slot_name'},
>      {type => 'name', name => 'plugin'},
>      {type => 'bool', name => 'temporary', default => 'false'},
>      {type => 'bool', name => 'twophase', default => 'false'},
>      {type => 'bool', name => 'failover', default => 'false'},
>   ],
>   prorettype => [
>      {type => 'name', name => 'slot_name'},
>      {type => 'pg_lsn', name => 'lsn'},
>   ]
> }

This is pretty much the sort of thing I was imagining when I read
Corey's argumentation.  +1 for something along these lines.

-- 
Álvaro Herrera        Breisgau, Deutschland  —  https://www.EnterpriseDB.com/
"Pero la cosa no es muy grave ..."     (le petit Nicolas -- René Goscinny)



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.