mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-27 23:27:31 +00:00
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:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user