From 56d572757dff3af3987b0c5916d2a1865ad81e68 Mon Sep 17 00:00:00 2001 From: msepga Date: Thu, 31 Oct 2024 16:48:51 -0400 Subject: [PATCH] Test quoting in `deparse_tests.c` --- test/deparse_tests.c | 4 +++- test/sql/postgres_regress/portals.sql | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/deparse_tests.c b/test/deparse_tests.c index 09445b45..03fd88f2 100644 --- a/test/deparse_tests.c +++ b/test/deparse_tests.c @@ -407,7 +407,9 @@ const char* tests[] = { "ALTER TABLE a DISABLE TRIGGER ALL", "ALTER TABLE a DISABLE TRIGGER USER", "CREATE INDEX myindex ON public.mytable USING btree (col1, (col2::varchar) varchar_pattern_ops)", - "SELECT * FROM CAST(1 AS text)" + "SELECT * FROM CAST(1 AS text)", + "DECLARE \"Foo1\" SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2", + "FETCH BACKWARD 23 \"Foo1\"" }; size_t testsLength = __LINE__ - 4; diff --git a/test/sql/postgres_regress/portals.sql b/test/sql/postgres_regress/portals.sql index 4ed0fc49..fc4cccb9 100644 --- a/test/sql/postgres_regress/portals.sql +++ b/test/sql/postgres_regress/portals.sql @@ -4,7 +4,7 @@ BEGIN; -DECLARE "Foo1" SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; +DECLARE foo1 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; DECLARE foo2 SCROLL CURSOR FOR SELECT * FROM tenk2; @@ -50,7 +50,7 @@ DECLARE foo22 SCROLL CURSOR FOR SELECT * FROM tenk2; DECLARE foo23 SCROLL CURSOR FOR SELECT * FROM tenk1 ORDER BY unique2; -FETCH 1 in "Foo1"; +FETCH 1 in foo1; FETCH 2 in foo2; @@ -140,9 +140,9 @@ FETCH backward 21 in foo3; FETCH backward 22 in foo2; -FETCH backward 23 in "Foo1"; +FETCH backward 23 in foo1; -CLOSE "Foo1"; +CLOSE foo1; CLOSE foo2;