fix(postgres): let plugin SQL keep its uuid columns and casts on every server

PostgreSQL 19's catalog brings a uuid(bytea) conversion, and once its name
joined the catalog list the guard refused every uuid it read as a call or a
field: `t.uuid` and `uuid($1)` failed on 14 to 18 too, where they had
always passed. uuid joins the other type name conversions on the plugin
allowlist, so PGPLUG-022 checks its overloads on the 19 lane.
This commit is contained in:
Maurice
2026-11-27 23:46:09 +01:00
parent 2dc505eff2
commit 793be249a2
2 changed files with 3 additions and 0 deletions
@@ -104,6 +104,8 @@ describe('plugin SQL guard', () => {
'CREATE TYPE span AS RANGE (subtype = float8)',
'CREATE TABLE index (x int)',
'CREATE INDEX ON notes (body)',
// PostgreSQL 19 added a uuid() conversion to the catalog; a uuid column and the cast still pass.
'SELECT t.uuid FROM items t WHERE t.uuid = uuid($1)',
])('lets through %s', (sql) => {
expect(() => check(sql)).not.toThrow();
});