Skip to content

Commit

Permalink
Test quoting in deparse_tests.c
Browse files Browse the repository at this point in the history
  • Loading branch information
msepga committed Oct 31, 2024
1 parent 5a3fa6e commit 56d5727
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion test/deparse_tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
8 changes: 4 additions & 4 deletions test/sql/postgres_regress/portals.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 56d5727

Please sign in to comment.