]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Avoid naming conflict between transactions.sql and namespace.sql.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 19 May 2023 14:57:46 +0000 (10:57 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 19 May 2023 14:57:46 +0000 (10:57 -0400)
Commits 681d9e462 et al added a test case in namespace.sql that
implicitly relied on there not being a table "public.abc".
However, the concurrently-run transactions.sql test creates precisely
such a table, so with the right timing you'd get a failure.
Creating a table named as generically as "abc" in a common schema
seems like bad practice, so fix this by changing the name of
transactions.sql's table.  (Compare 2cf8c7aa4.)

Marina Polyakova

Discussion: https://postgr.es/m/80d0201636665d82185942e7112257b4@postgrespro.ru

src/test/regress/expected/transactions.out
src/test/regress/sql/transactions.sql

index 69e176c5259b74da328b1d227dd7d51cb6c78b7e..df704bc3f583f413b23bbfaa8c6df100041abad5 100644 (file)
@@ -571,10 +571,10 @@ drop function inverse(int);
 -- performed in the aborted subtransaction
 begin;
 savepoint x;
-create table abc (a int);
-insert into abc values (5);
-insert into abc values (10);
-declare foo cursor for select * from abc;
+create table trans_abc (a int);
+insert into trans_abc values (5);
+insert into trans_abc values (10);
+declare foo cursor for select * from trans_abc;
 fetch from foo;
  a 
 ---
@@ -587,11 +587,11 @@ fetch from foo;
 ERROR:  cursor "foo" does not exist
 commit;
 begin;
-create table abc (a int);
-insert into abc values (5);
-insert into abc values (10);
-insert into abc values (15);
-declare foo cursor for select * from abc;
+create table trans_abc (a int);
+insert into trans_abc values (5);
+insert into trans_abc values (10);
+insert into trans_abc values (15);
+declare foo cursor for select * from trans_abc;
 fetch from foo;
  a 
 ---
index 2e3739fd6c48512e1d0717273d88e29beaafe140..5ff290a46ea803a4374a212c2e41401f3bc332c8 100644 (file)
@@ -358,10 +358,10 @@ drop function inverse(int);
 begin;
 
 savepoint x;
-create table abc (a int);
-insert into abc values (5);
-insert into abc values (10);
-declare foo cursor for select * from abc;
+create table trans_abc (a int);
+insert into trans_abc values (5);
+insert into trans_abc values (10);
+declare foo cursor for select * from trans_abc;
 fetch from foo;
 rollback to x;
 
@@ -371,11 +371,11 @@ commit;
 
 begin;
 
-create table abc (a int);
-insert into abc values (5);
-insert into abc values (10);
-insert into abc values (15);
-declare foo cursor for select * from abc;
+create table trans_abc (a int);
+insert into trans_abc values (5);
+insert into trans_abc values (10);
+insert into trans_abc values (15);
+declare foo cursor for select * from trans_abc;
 
 fetch from foo;