From eff5098c2324c267ddeb4cf3db12b539b5ac6814 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 30 Sep 2026 20:58:29 +0200 Subject: [PATCH] Schema check: the collation alias is not a reserved word `collation` is reserved in Postgres, so the key check's query failed with 42601 on every database and every start refused. The live block showed it. Co-Authored-By: Claude Opus 5.5 --- src/store/postgres.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store/postgres.ts b/src/store/postgres.ts index 20eccf0..6f10326 100644 --- a/src/store/postgres.ts +++ b/src/store/postgres.ts @@ -453,9 +453,9 @@ export class PostgresStore implements HeimdallStore { WHERE key.position <= i.indnkeyatts ) = required.columns AND NOT EXISTS ( - SELECT 1 FROM unnest(i.indcollation::oid[]) WITH ORDINALITY AS collation(oid, position) - JOIN pg_collation c ON c.oid = collation.oid - WHERE collation.position <= i.indnkeyatts AND NOT c.collisdeterministic + SELECT 1 FROM unnest(i.indcollation::oid[]) WITH ORDINALITY AS key_collation(oid, position) + JOIN pg_collation c ON c.oid = key_collation.oid + WHERE key_collation.position <= i.indnkeyatts AND NOT c.collisdeterministic ) UNION ALL SELECT 'privilege', NULL, NULL, NULL