From bb654fb6c09cac06338bb90e083974e6b4d84494 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Fri, 20 Nov 2026 07:16:05 +0000 Subject: [PATCH 1/3] fix(deparser): preserve SHOW identifier quoting --- __fixtures__/generated/generated.json | 9 +++++ .../kitchen-sink/misc/show-quoting.sql | 9 +++++ .../kitchen-sink/misc-show-quoting.test.ts | 17 +++++++++ .../__snapshots__/show-quoting.test.ts.snap | 37 +++++++++++++++++++ .../__tests__/pretty/show-quoting.test.ts | 14 +++++++ packages/deparser/src/deparser.ts | 4 +- 6 files changed, 88 insertions(+), 2 deletions(-) create mode 100644 __fixtures__/kitchen-sink/misc/show-quoting.sql create mode 100644 packages/deparser/__tests__/kitchen-sink/misc-show-quoting.test.ts create mode 100644 packages/deparser/__tests__/pretty/__snapshots__/show-quoting.test.ts.snap create mode 100644 packages/deparser/__tests__/pretty/show-quoting.test.ts diff --git a/__fixtures__/generated/generated.json b/__fixtures__/generated/generated.json index 4b7688b5..269414c2 100644 --- a/__fixtures__/generated/generated.json +++ b/__fixtures__/generated/generated.json @@ -21220,6 +21220,15 @@ "original/alter/alter-table-column-7.sql": "ALTER TABLE public.books\nADD COLUMN tags TEXT[] DEFAULT '{}'", "original/alter/alter-table-column-8.sql": "CREATE TYPE mood AS ENUM ('happy', 'sad', 'neutral')", "original/alter/alter-table-column-9.sql": "ALTER TABLE public.profiles\nADD COLUMN current_mood mood DEFAULT 'neutral'", + "misc/show-quoting-1.sql": "SHOW \"ALL\"", + "misc/show-quoting-2.sql": "SHOW ALL", + "misc/show-quoting-3.sql": "SHOW \"TimeZone\"", + "misc/show-quoting-4.sql": "SHOW \"Foo\".\"Bar\"", + "misc/show-quoting-5.sql": "SHOW search_path", + "misc/show-quoting-6.sql": "SHOW plpgsql.extra_warnings", + "misc/show-quoting-7.sql": "SHOW TIME ZONE", + "misc/show-quoting-8.sql": "SHOW TRANSACTION ISOLATION LEVEL", + "misc/show-quoting-9.sql": "SHOW SESSION AUTHORIZATION", "misc/rename-qualified-and-sequence-privs-1.sql": "ALTER TYPE app.t2 RENAME TO t", "misc/rename-qualified-and-sequence-privs-2.sql": "ALTER DOMAIN app.d2 RENAME TO d", "misc/rename-qualified-and-sequence-privs-3.sql": "GRANT ALL ON SEQUENCE app.seq TO bob", diff --git a/__fixtures__/kitchen-sink/misc/show-quoting.sql b/__fixtures__/kitchen-sink/misc/show-quoting.sql new file mode 100644 index 00000000..a5fc454e --- /dev/null +++ b/__fixtures__/kitchen-sink/misc/show-quoting.sql @@ -0,0 +1,9 @@ +SHOW "ALL"; +SHOW ALL; +SHOW "TimeZone"; +SHOW "Foo"."Bar"; +SHOW search_path; +SHOW plpgsql.extra_warnings; +SHOW TIME ZONE; +SHOW TRANSACTION ISOLATION LEVEL; +SHOW SESSION AUTHORIZATION; diff --git a/packages/deparser/__tests__/kitchen-sink/misc-show-quoting.test.ts b/packages/deparser/__tests__/kitchen-sink/misc-show-quoting.test.ts new file mode 100644 index 00000000..5202cc84 --- /dev/null +++ b/packages/deparser/__tests__/kitchen-sink/misc-show-quoting.test.ts @@ -0,0 +1,17 @@ + +import { FixtureTestUtils } from '../../test-utils'; +const fixtures = new FixtureTestUtils(); + +it('misc-show-quoting', async () => { + await fixtures.runFixtureTests([ + "misc/show-quoting-1.sql", + "misc/show-quoting-2.sql", + "misc/show-quoting-3.sql", + "misc/show-quoting-4.sql", + "misc/show-quoting-5.sql", + "misc/show-quoting-6.sql", + "misc/show-quoting-7.sql", + "misc/show-quoting-8.sql", + "misc/show-quoting-9.sql" +]); +}); diff --git a/packages/deparser/__tests__/pretty/__snapshots__/show-quoting.test.ts.snap b/packages/deparser/__tests__/pretty/__snapshots__/show-quoting.test.ts.snap new file mode 100644 index 00000000..be0664dd --- /dev/null +++ b/packages/deparser/__tests__/pretty/__snapshots__/show-quoting.test.ts.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing + +exports[`non-pretty: misc/show-quoting-1.sql 1`] = `"SHOW "ALL""`; + +exports[`non-pretty: misc/show-quoting-2.sql 1`] = `"SHOW ALL"`; + +exports[`non-pretty: misc/show-quoting-3.sql 1`] = `"SHOW "TimeZone""`; + +exports[`non-pretty: misc/show-quoting-4.sql 1`] = `"SHOW "Foo"."Bar""`; + +exports[`non-pretty: misc/show-quoting-5.sql 1`] = `"SHOW search_path"`; + +exports[`non-pretty: misc/show-quoting-6.sql 1`] = `"SHOW plpgsql.extra_warnings"`; + +exports[`non-pretty: misc/show-quoting-7.sql 1`] = `"SHOW timezone"`; + +exports[`non-pretty: misc/show-quoting-8.sql 1`] = `"SHOW transaction_isolation"`; + +exports[`non-pretty: misc/show-quoting-9.sql 1`] = `"SHOW session_authorization"`; + +exports[`pretty: misc/show-quoting-1.sql 1`] = `"SHOW "ALL""`; + +exports[`pretty: misc/show-quoting-2.sql 1`] = `"SHOW ALL"`; + +exports[`pretty: misc/show-quoting-3.sql 1`] = `"SHOW "TimeZone""`; + +exports[`pretty: misc/show-quoting-4.sql 1`] = `"SHOW "Foo"."Bar""`; + +exports[`pretty: misc/show-quoting-5.sql 1`] = `"SHOW search_path"`; + +exports[`pretty: misc/show-quoting-6.sql 1`] = `"SHOW plpgsql.extra_warnings"`; + +exports[`pretty: misc/show-quoting-7.sql 1`] = `"SHOW timezone"`; + +exports[`pretty: misc/show-quoting-8.sql 1`] = `"SHOW transaction_isolation"`; + +exports[`pretty: misc/show-quoting-9.sql 1`] = `"SHOW session_authorization"`; diff --git a/packages/deparser/__tests__/pretty/show-quoting.test.ts b/packages/deparser/__tests__/pretty/show-quoting.test.ts new file mode 100644 index 00000000..47aed356 --- /dev/null +++ b/packages/deparser/__tests__/pretty/show-quoting.test.ts @@ -0,0 +1,14 @@ +import { PrettyTest } from '../../test-utils/PrettyTest'; + +const prettyTest = new PrettyTest([ + 'misc/show-quoting-1.sql', + 'misc/show-quoting-2.sql', + 'misc/show-quoting-3.sql', + 'misc/show-quoting-4.sql', + 'misc/show-quoting-5.sql', + 'misc/show-quoting-6.sql', + 'misc/show-quoting-7.sql', + 'misc/show-quoting-8.sql', + 'misc/show-quoting-9.sql' +]); +prettyTest.generateTests(); diff --git a/packages/deparser/src/deparser.ts b/packages/deparser/src/deparser.ts index 4aaa36f6..195bb42f 100644 --- a/packages/deparser/src/deparser.ts +++ b/packages/deparser/src/deparser.ts @@ -4435,10 +4435,10 @@ export class Deparser implements DeparserVisitor { } VariableShowStmt(node: t.VariableShowStmt, context: DeparserContext): string { - if (node.name === 'ALL') { + if (node.name === 'all') { return 'SHOW ALL'; } - return `SHOW ${node.name}`; + return `SHOW ${QuoteUtils.quoteDottedName(node.name.split('.'))}`; } CreateSchemaStmt(node: t.CreateSchemaStmt, context: DeparserContext): string { From 27f377c52428086349fa98557d889aab8489dd5d Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Sat, 21 Nov 2026 00:34:48 +0000 Subject: [PATCH 2/3] fix(deparser): quote every SHOW name component --- __fixtures__/generated/generated.json | 4 ++++ __fixtures__/kitchen-sink/misc/show-quoting.sql | 4 ++++ .../kitchen-sink/misc-show-quoting.test.ts | 6 +++++- .../__snapshots__/show-quoting.test.ts.snap | 16 ++++++++++++++++ .../__tests__/pretty/show-quoting.test.ts | 6 +++++- packages/deparser/src/deparser.ts | 6 +++++- 6 files changed, 39 insertions(+), 3 deletions(-) diff --git a/__fixtures__/generated/generated.json b/__fixtures__/generated/generated.json index 269414c2..650e485d 100644 --- a/__fixtures__/generated/generated.json +++ b/__fixtures__/generated/generated.json @@ -21229,6 +21229,10 @@ "misc/show-quoting-7.sql": "SHOW TIME ZONE", "misc/show-quoting-8.sql": "SHOW TRANSACTION ISOLATION LEVEL", "misc/show-quoting-9.sql": "SHOW SESSION AUTHORIZATION", + "misc/show-quoting-10.sql": "SHOW foo.\"select\"", + "misc/show-quoting-11.sql": "SHOW \"foo..bar\"", + "misc/show-quoting-12.sql": "SHOW \".foo\"", + "misc/show-quoting-13.sql": "SHOW \"foo.\"", "misc/rename-qualified-and-sequence-privs-1.sql": "ALTER TYPE app.t2 RENAME TO t", "misc/rename-qualified-and-sequence-privs-2.sql": "ALTER DOMAIN app.d2 RENAME TO d", "misc/rename-qualified-and-sequence-privs-3.sql": "GRANT ALL ON SEQUENCE app.seq TO bob", diff --git a/__fixtures__/kitchen-sink/misc/show-quoting.sql b/__fixtures__/kitchen-sink/misc/show-quoting.sql index a5fc454e..4cedf4ba 100644 --- a/__fixtures__/kitchen-sink/misc/show-quoting.sql +++ b/__fixtures__/kitchen-sink/misc/show-quoting.sql @@ -7,3 +7,7 @@ SHOW plpgsql.extra_warnings; SHOW TIME ZONE; SHOW TRANSACTION ISOLATION LEVEL; SHOW SESSION AUTHORIZATION; +SHOW foo."select"; +SHOW "foo..bar"; +SHOW ".foo"; +SHOW "foo."; diff --git a/packages/deparser/__tests__/kitchen-sink/misc-show-quoting.test.ts b/packages/deparser/__tests__/kitchen-sink/misc-show-quoting.test.ts index 5202cc84..bc9d9688 100644 --- a/packages/deparser/__tests__/kitchen-sink/misc-show-quoting.test.ts +++ b/packages/deparser/__tests__/kitchen-sink/misc-show-quoting.test.ts @@ -12,6 +12,10 @@ it('misc-show-quoting', async () => { "misc/show-quoting-6.sql", "misc/show-quoting-7.sql", "misc/show-quoting-8.sql", - "misc/show-quoting-9.sql" + "misc/show-quoting-9.sql", + "misc/show-quoting-10.sql", + "misc/show-quoting-11.sql", + "misc/show-quoting-12.sql", + "misc/show-quoting-13.sql" ]); }); diff --git a/packages/deparser/__tests__/pretty/__snapshots__/show-quoting.test.ts.snap b/packages/deparser/__tests__/pretty/__snapshots__/show-quoting.test.ts.snap index be0664dd..3bc7e408 100644 --- a/packages/deparser/__tests__/pretty/__snapshots__/show-quoting.test.ts.snap +++ b/packages/deparser/__tests__/pretty/__snapshots__/show-quoting.test.ts.snap @@ -18,6 +18,14 @@ exports[`non-pretty: misc/show-quoting-8.sql 1`] = `"SHOW transaction_isolation" exports[`non-pretty: misc/show-quoting-9.sql 1`] = `"SHOW session_authorization"`; +exports[`non-pretty: misc/show-quoting-10.sql 1`] = `"SHOW foo."select""`; + +exports[`non-pretty: misc/show-quoting-11.sql 1`] = `"SHOW "foo..bar""`; + +exports[`non-pretty: misc/show-quoting-12.sql 1`] = `"SHOW ".foo""`; + +exports[`non-pretty: misc/show-quoting-13.sql 1`] = `"SHOW "foo.""`; + exports[`pretty: misc/show-quoting-1.sql 1`] = `"SHOW "ALL""`; exports[`pretty: misc/show-quoting-2.sql 1`] = `"SHOW ALL"`; @@ -35,3 +43,11 @@ exports[`pretty: misc/show-quoting-7.sql 1`] = `"SHOW timezone"`; exports[`pretty: misc/show-quoting-8.sql 1`] = `"SHOW transaction_isolation"`; exports[`pretty: misc/show-quoting-9.sql 1`] = `"SHOW session_authorization"`; + +exports[`pretty: misc/show-quoting-10.sql 1`] = `"SHOW foo."select""`; + +exports[`pretty: misc/show-quoting-11.sql 1`] = `"SHOW "foo..bar""`; + +exports[`pretty: misc/show-quoting-12.sql 1`] = `"SHOW ".foo""`; + +exports[`pretty: misc/show-quoting-13.sql 1`] = `"SHOW "foo.""`; diff --git a/packages/deparser/__tests__/pretty/show-quoting.test.ts b/packages/deparser/__tests__/pretty/show-quoting.test.ts index 47aed356..67a0254b 100644 --- a/packages/deparser/__tests__/pretty/show-quoting.test.ts +++ b/packages/deparser/__tests__/pretty/show-quoting.test.ts @@ -9,6 +9,10 @@ const prettyTest = new PrettyTest([ 'misc/show-quoting-6.sql', 'misc/show-quoting-7.sql', 'misc/show-quoting-8.sql', - 'misc/show-quoting-9.sql' + 'misc/show-quoting-9.sql', + 'misc/show-quoting-10.sql', + 'misc/show-quoting-11.sql', + 'misc/show-quoting-12.sql', + 'misc/show-quoting-13.sql' ]); prettyTest.generateTests(); diff --git a/packages/deparser/src/deparser.ts b/packages/deparser/src/deparser.ts index 195bb42f..b3050ab3 100644 --- a/packages/deparser/src/deparser.ts +++ b/packages/deparser/src/deparser.ts @@ -4438,7 +4438,11 @@ export class Deparser implements DeparserVisitor { if (node.name === 'all') { return 'SHOW ALL'; } - return `SHOW ${QuoteUtils.quoteDottedName(node.name.split('.'))}`; + const parts = node.name.split('.'); + const name = parts.some(part => !part) + ? QuoteUtils.quoteIdentifier(node.name) + : parts.map(part => QuoteUtils.quoteIdentifier(part)).join('.'); + return `SHOW ${name}`; } CreateSchemaStmt(node: t.CreateSchemaStmt, context: DeparserContext): string { From ebbcdbe7c6972cc6b9ce50f4255dc0254f1d9715 Mon Sep 17 00:00:00 2001 From: Dan Lynch Date: Sat, 21 Nov 2026 02:03:21 +0000 Subject: [PATCH 3/3] fix(deparser): split long SHOW names at identifier boundaries --- __fixtures__/generated/generated.json | 3 +++ .../kitchen-sink/misc/show-quoting.sql | 3 +++ .../kitchen-sink/misc-show-quoting.test.ts | 5 +++- .../__snapshots__/show-quoting.test.ts.snap | 12 ++++++++++ .../__tests__/pretty/show-quoting.test.ts | 11 ++++++++- packages/deparser/src/deparser.ts | 24 +++++++++++++++---- 6 files changed, 52 insertions(+), 6 deletions(-) diff --git a/__fixtures__/generated/generated.json b/__fixtures__/generated/generated.json index 54ca4831..25d31f1c 100644 --- a/__fixtures__/generated/generated.json +++ b/__fixtures__/generated/generated.json @@ -21241,6 +21241,9 @@ "misc/show-quoting-11.sql": "SHOW \"foo..bar\"", "misc/show-quoting-12.sql": "SHOW \".foo\"", "misc/show-quoting-13.sql": "SHOW \"foo.\"", + "misc/show-quoting-14.sql": "SHOW \"foo.\".\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"", + "misc/show-quoting-15.sql": "SHOW \"foo.\".\"ééééééééééééééééééééééééééééééé\"", + "misc/show-quoting-16.sql": "SHOW \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.\".\"yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy\".\".bar\"", "misc/rename-qualified-and-sequence-privs-1.sql": "ALTER TYPE app.t2 RENAME TO t", "misc/rename-qualified-and-sequence-privs-2.sql": "ALTER DOMAIN app.d2 RENAME TO d", "misc/rename-qualified-and-sequence-privs-3.sql": "GRANT ALL ON SEQUENCE app.seq TO bob", diff --git a/__fixtures__/kitchen-sink/misc/show-quoting.sql b/__fixtures__/kitchen-sink/misc/show-quoting.sql index 4cedf4ba..c9926140 100644 --- a/__fixtures__/kitchen-sink/misc/show-quoting.sql +++ b/__fixtures__/kitchen-sink/misc/show-quoting.sql @@ -11,3 +11,6 @@ SHOW foo."select"; SHOW "foo..bar"; SHOW ".foo"; SHOW "foo."; +SHOW "foo."."xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; +SHOW "foo."."ééééééééééééééééééééééééééééééé"; +SHOW "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx."."yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy".".bar"; diff --git a/packages/deparser/__tests__/kitchen-sink/misc-show-quoting.test.ts b/packages/deparser/__tests__/kitchen-sink/misc-show-quoting.test.ts index bc9d9688..29b55989 100644 --- a/packages/deparser/__tests__/kitchen-sink/misc-show-quoting.test.ts +++ b/packages/deparser/__tests__/kitchen-sink/misc-show-quoting.test.ts @@ -16,6 +16,9 @@ it('misc-show-quoting', async () => { "misc/show-quoting-10.sql", "misc/show-quoting-11.sql", "misc/show-quoting-12.sql", - "misc/show-quoting-13.sql" + "misc/show-quoting-13.sql", + "misc/show-quoting-14.sql", + "misc/show-quoting-15.sql", + "misc/show-quoting-16.sql" ]); }); diff --git a/packages/deparser/__tests__/pretty/__snapshots__/show-quoting.test.ts.snap b/packages/deparser/__tests__/pretty/__snapshots__/show-quoting.test.ts.snap index 3bc7e408..1080f019 100644 --- a/packages/deparser/__tests__/pretty/__snapshots__/show-quoting.test.ts.snap +++ b/packages/deparser/__tests__/pretty/__snapshots__/show-quoting.test.ts.snap @@ -26,6 +26,12 @@ exports[`non-pretty: misc/show-quoting-12.sql 1`] = `"SHOW ".foo""`; exports[`non-pretty: misc/show-quoting-13.sql 1`] = `"SHOW "foo.""`; +exports[`non-pretty: misc/show-quoting-14.sql 1`] = `"SHOW "foo.".xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"`; + +exports[`non-pretty: misc/show-quoting-15.sql 1`] = `"SHOW "foo."."ééééééééééééééééééééééééééééééé""`; + +exports[`non-pretty: misc/show-quoting-16.sql 1`] = `"SHOW "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.".yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.".bar""`; + exports[`pretty: misc/show-quoting-1.sql 1`] = `"SHOW "ALL""`; exports[`pretty: misc/show-quoting-2.sql 1`] = `"SHOW ALL"`; @@ -51,3 +57,9 @@ exports[`pretty: misc/show-quoting-11.sql 1`] = `"SHOW "foo..bar""`; exports[`pretty: misc/show-quoting-12.sql 1`] = `"SHOW ".foo""`; exports[`pretty: misc/show-quoting-13.sql 1`] = `"SHOW "foo.""`; + +exports[`pretty: misc/show-quoting-14.sql 1`] = `"SHOW "foo.".xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"`; + +exports[`pretty: misc/show-quoting-15.sql 1`] = `"SHOW "foo."."ééééééééééééééééééééééééééééééé""`; + +exports[`pretty: misc/show-quoting-16.sql 1`] = `"SHOW "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.".yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.".bar""`; diff --git a/packages/deparser/__tests__/pretty/show-quoting.test.ts b/packages/deparser/__tests__/pretty/show-quoting.test.ts index 67a0254b..89107b71 100644 --- a/packages/deparser/__tests__/pretty/show-quoting.test.ts +++ b/packages/deparser/__tests__/pretty/show-quoting.test.ts @@ -1,3 +1,4 @@ +import { Deparser } from '../../src'; import { PrettyTest } from '../../test-utils/PrettyTest'; const prettyTest = new PrettyTest([ @@ -13,6 +14,14 @@ const prettyTest = new PrettyTest([ 'misc/show-quoting-10.sql', 'misc/show-quoting-11.sql', 'misc/show-quoting-12.sql', - 'misc/show-quoting-13.sql' + 'misc/show-quoting-13.sql', + 'misc/show-quoting-14.sql', + 'misc/show-quoting-15.sql', + 'misc/show-quoting-16.sql' ]); prettyTest.generateTests(); + +it('rejects an overlong SHOW identifier that cannot be split', () => { + expect(() => Deparser.deparse({ VariableShowStmt: { name: `${'x'.repeat(64)}..` } })) + .toThrow('SHOW name cannot be split into identifiers of at most 63 bytes'); +}); diff --git a/packages/deparser/src/deparser.ts b/packages/deparser/src/deparser.ts index 8e0a1c4e..0c08c3b4 100644 --- a/packages/deparser/src/deparser.ts +++ b/packages/deparser/src/deparser.ts @@ -4443,10 +4443,26 @@ export class Deparser implements DeparserVisitor { return 'SHOW ALL'; } const parts = node.name.split('.'); - const name = parts.some(part => !part) - ? QuoteUtils.quoteIdentifier(node.name) - : parts.map(part => QuoteUtils.quoteIdentifier(part)).join('.'); - return `SHOW ${name}`; + if (!parts.some(part => !part)) { + return `SHOW ${parts.map(part => QuoteUtils.quoteIdentifier(part)).join('.')}`; + } + const encoder = new TextEncoder(); + const segments: string[] = []; + let remaining = node.name; + while (encoder.encode(remaining).length > 63) { + let boundary = -1; + for (let i = 1; i < remaining.length - 1; i++) { + if (encoder.encode(remaining.slice(0, i)).length > 63) break; + if (remaining[i] === '.') boundary = i; + } + if (boundary === -1) { + throw new Error('SHOW name cannot be split into identifiers of at most 63 bytes'); + } + segments.push(remaining.slice(0, boundary)); + remaining = remaining.slice(boundary + 1); + } + segments.push(remaining); + return `SHOW ${segments.map(part => QuoteUtils.quoteIdentifier(part)).join('.')}`; } CreateSchemaStmt(node: t.CreateSchemaStmt, context: DeparserContext): string {