From 0b4548375d9d9a9803f48e3ccc2cc466e18ac57c Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Thu, 1 Jan 2026 03:43:15 +0000 Subject: [PATCH] fix: remove pg_catalog prefix for unknown types in deparser - Remove 'pg_catalog.' prefix from getPgCatalogTypeName() default case - Remove 'pg_catalog.bpchar' fallback, use just 'bpchar' - Remove 'pg_catalog.float4' for real type, use just 'float4' This fixes issues with extension types like citext, hstore, ltree, etc. that don't live in pg_catalog but in the schema where the extension is installed (typically public). PostgreSQL automatically searches pg_catalog first via the implicit search_path, so explicit qualification is unnecessary for built-in types and incorrect for extension types. Fixes: constructive-io/constructive-planning#477 --- packages/deparser/src/deparser.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/deparser/src/deparser.ts b/packages/deparser/src/deparser.ts index ff065da4..85028e8f 100644 --- a/packages/deparser/src/deparser.ts +++ b/packages/deparser/src/deparser.ts @@ -2199,7 +2199,7 @@ export class Deparser implements DeparserVisitor { if (size != null) { return 'char'; } - return 'pg_catalog.bpchar'; + return 'bpchar'; case 'varchar': return 'varchar'; case 'numeric': @@ -2213,7 +2213,7 @@ export class Deparser implements DeparserVisitor { case 'int8': return 'bigint'; case 'real': - return 'pg_catalog.float4'; + return 'float4'; case 'time': return 'time'; case 'timestamp': @@ -2223,7 +2223,7 @@ export class Deparser implements DeparserVisitor { case 'bit': return 'bit'; default: - return `pg_catalog.${typeName}`; + return typeName; } }