From c427d0f8133b58eda7f63e40b48f122d7b917dde Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Mon, 5 Jan 2026 19:02:01 +0000 Subject: [PATCH] fix(deparser): quote schema name in CreateSchemaStmt The CreateSchemaStmt handler was not quoting the schema name, which caused parse errors when the schema name contained special characters like hyphens (e.g., 'constructive-public'). This fix uses QuoteUtils.quoteIdentifier() to properly quote schema names that require quoting, consistent with how other identifiers are handled elsewhere in the deparser (e.g., in sequence statements). Before: CREATE SCHEMA constructive-public; (invalid SQL) After: CREATE SCHEMA "constructive-public"; (valid SQL) --- packages/deparser/src/deparser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/deparser/src/deparser.ts b/packages/deparser/src/deparser.ts index 7acf86db..c104df1f 100644 --- a/packages/deparser/src/deparser.ts +++ b/packages/deparser/src/deparser.ts @@ -4273,7 +4273,7 @@ export class Deparser implements DeparserVisitor { } if (node.schemaname) { - output.push(node.schemaname); + output.push(QuoteUtils.quoteIdentifier(node.schemaname)); } if (node.authrole) {