mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 23:27:31 +00:00
fix(postgres): keep plugin columns named like PostgreSQL 19's new functions
Besides uuid, 19 brings error_on_null, tid_block, tid_offset and oid8 to the catalog, and since the catalog list is the same for every server the guard refused a plugin's s.error_on_null column on 14 to 18 too, where it had always passed. error_on_null and the tuple id parts only read their argument and join the allowlist, where PGPLUG-022 checks their overloads; oid8 only converts, like oid, and joins the column names.
This commit is contained in:
@@ -106,6 +106,8 @@ describe('plugin SQL guard', () => {
|
||||
'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)',
|
||||
// So did error_on_null, tid_block, tid_offset and oid8; a plugin column of that name still passes.
|
||||
'SELECT s.error_on_null, s.tid_block, s.tid_offset, s.oid8 FROM settings s',
|
||||
])('lets through %s', (sql) => {
|
||||
expect(() => check(sql)).not.toThrow();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user