fix(postgres): know PostgreSQL 19's catalog functions and refuse regdatabase

PostgreSQL 19 adds 41 functions to pg_catalog that the plugin guard's
catalog list did not hold, so PGPLUG-021 failed on the 19 lane and a plugin
could call the new ones the allowlist does not name. They are now in
catalog-functions.txt, taken from 19's pg_proc.dat; none of them joins the
plugin allowlist.

19 also adds the object identifier type regdatabase, whose input looks a
database of the cluster up by its name. A cast to it passed the guard, so a
plugin could probe which databases the server holds. It now joins the other
name lookup types, its array type with it.
This commit is contained in:
Maurice
2026-11-27 20:31:53 +01:00
parent 59f6e349bf
commit aad9272b2e
3 changed files with 48 additions and 0 deletions
@@ -235,6 +235,8 @@ const NAME_LOOKUP_TYPES = [
'regnamespace',
'regrole',
'regcollation',
// New in PostgreSQL 19: looks a database of the cluster up by its name.
'regdatabase',
];
/**