Skip to content

Commit c1d12d5

Browse files
committed
tests: use distinct savepoint names in test
1 parent 930d9f3 commit c1d12d5

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

nix/tests/expected/pgmq.out

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,32 +125,32 @@ select
125125
*/
126126
-- Make sure SQLI enabling characters are blocked
127127
-- Use savepoints to test error conditions without aborting the transaction
128-
SAVEPOINT test_invalid_names;
128+
SAVEPOINT test_invalid_names_1;
129129
select pgmq.create('F--oo');
130130
ERROR: queue name contains invalid characters: $, ;, --, or \'
131131
CONTEXT: PL/pgSQL function pgmq.format_table_name(text,text) line 5 at RAISE
132132
PL/pgSQL function pgmq.create_non_partitioned(text) line 3 during statement block local variable initialization
133133
SQL statement "SELECT pgmq.create_non_partitioned(queue_name)"
134134
PL/pgSQL function pgmq."create"(text) line 3 at PERFORM
135-
ROLLBACK TO SAVEPOINT test_invalid_names;
136-
SAVEPOINT test_invalid_names;
135+
ROLLBACK TO SAVEPOINT test_invalid_names_1;
136+
SAVEPOINT test_invalid_names_2;
137137
select pgmq.create('F$oo');
138138
ERROR: queue name contains invalid characters: $, ;, --, or \'
139139
CONTEXT: PL/pgSQL function pgmq.format_table_name(text,text) line 5 at RAISE
140140
SQL expression "pgmq.format_table_name(queue_name, 'q')"
141141
PL/pgSQL function pgmq.create_non_partitioned(text) line 3 during statement block local variable initialization
142142
SQL statement "SELECT pgmq.create_non_partitioned(queue_name)"
143143
PL/pgSQL function pgmq."create"(text) line 3 at PERFORM
144-
ROLLBACK TO SAVEPOINT test_invalid_names;
145-
SAVEPOINT test_invalid_names;
144+
ROLLBACK TO SAVEPOINT test_invalid_names_2;
145+
SAVEPOINT test_invalid_names_3;
146146
select pgmq.create($$F'oo$$);
147147
ERROR: queue name contains invalid characters: $, ;, --, or \'
148148
CONTEXT: PL/pgSQL function pgmq.format_table_name(text,text) line 5 at RAISE
149149
SQL expression "pgmq.format_table_name(queue_name, 'q')"
150150
PL/pgSQL function pgmq.create_non_partitioned(text) line 3 during statement block local variable initialization
151151
SQL statement "SELECT pgmq.create_non_partitioned(queue_name)"
152152
PL/pgSQL function pgmq."create"(text) line 3 at PERFORM
153-
ROLLBACK TO SAVEPOINT test_invalid_names;
153+
ROLLBACK TO SAVEPOINT test_invalid_names_3;
154154
\echo
155155

156156
-- pgmq schema functions with owners (ownership is modified on ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql)

nix/tests/sql/pgmq.sql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,17 @@ select
8787

8888
-- Make sure SQLI enabling characters are blocked
8989
-- Use savepoints to test error conditions without aborting the transaction
90-
SAVEPOINT test_invalid_names;
90+
SAVEPOINT test_invalid_names_1;
9191
select pgmq.create('F--oo');
92-
ROLLBACK TO SAVEPOINT test_invalid_names;
92+
ROLLBACK TO SAVEPOINT test_invalid_names_1;
9393

94-
SAVEPOINT test_invalid_names;
94+
SAVEPOINT test_invalid_names_2;
9595
select pgmq.create('F$oo');
96-
ROLLBACK TO SAVEPOINT test_invalid_names;
96+
ROLLBACK TO SAVEPOINT test_invalid_names_2;
9797

98-
SAVEPOINT test_invalid_names;
98+
SAVEPOINT test_invalid_names_3;
9999
select pgmq.create($$F'oo$$);
100-
ROLLBACK TO SAVEPOINT test_invalid_names;
100+
ROLLBACK TO SAVEPOINT test_invalid_names_3;
101101
\echo
102102
103103
-- pgmq schema functions with owners (ownership is modified on ansible/files/postgresql_extension_custom_scripts/pgmq/after-create.sql)

0 commit comments

Comments
 (0)