diff --git a/src/test/regress/expected/temp.out b/src/test/regress/expected/temp.out index eab75dbe2c..b1d2ffdef3 100644 --- a/src/test/regress/expected/temp.out +++ b/src/test/regress/expected/temp.out @@ -246,7 +246,7 @@ create temp table temp_parted_oncommit_test2 insert into temp_parted_oncommit_test values (1), (2); commit; -- no relations remain in this case. -select relname from pg_class where relname like 'temp_parted_oncommit_test%'; +select relname from pg_class where relname ~ '^temp_parted_oncommit_test'; relname --------- (0 rows) @@ -273,7 +273,8 @@ select * from temp_parted_oncommit_test; (1 row) -- two relations remain in this case. -select relname from pg_class where relname like 'temp_parted_oncommit_test%'; +select relname from pg_class where relname ~ '^temp_parted_oncommit_test' + order by relname; relname ---------------------------- temp_parted_oncommit_test @@ -290,7 +291,7 @@ create temp table temp_inh_oncommit_test1 () insert into temp_inh_oncommit_test1 values (1); commit; -- no relations remain in this case -select relname from pg_class where relname like 'temp_inh_oncommit_test%'; +select relname from pg_class where relname ~ '^temp_inh_oncommit_test'; relname --------- (0 rows) @@ -309,7 +310,7 @@ select * from temp_inh_oncommit_test; (0 rows) -- one relation remains -select relname from pg_class where relname like 'temp_inh_oncommit_test%'; +select relname from pg_class where relname ~ '^temp_inh_oncommit_test'; relname ------------------------ temp_inh_oncommit_test diff --git a/src/test/regress/sql/temp.sql b/src/test/regress/sql/temp.sql index 761955bfe6..b636b33dca 100644 --- a/src/test/regress/sql/temp.sql +++ b/src/test/regress/sql/temp.sql @@ -192,7 +192,7 @@ create temp table temp_parted_oncommit_test2 insert into temp_parted_oncommit_test values (1), (2); commit; -- no relations remain in this case. -select relname from pg_class where relname like 'temp_parted_oncommit_test%'; +select relname from pg_class where relname ~ '^temp_parted_oncommit_test'; -- Using ON COMMIT DELETE on a partitioned table does not remove -- all rows if partitions preserve their data. begin; @@ -210,7 +210,8 @@ commit; -- preserved. select * from temp_parted_oncommit_test; -- two relations remain in this case. -select relname from pg_class where relname like 'temp_parted_oncommit_test%'; +select relname from pg_class where relname ~ '^temp_parted_oncommit_test' + order by relname; drop table temp_parted_oncommit_test; -- Check dependencies between ON COMMIT actions with inheritance trees. @@ -222,7 +223,7 @@ create temp table temp_inh_oncommit_test1 () insert into temp_inh_oncommit_test1 values (1); commit; -- no relations remain in this case -select relname from pg_class where relname like 'temp_inh_oncommit_test%'; +select relname from pg_class where relname ~ '^temp_inh_oncommit_test'; -- Data on the parent is removed, and the child goes away. begin; create temp table temp_inh_oncommit_test (a int) on commit delete rows; @@ -233,7 +234,7 @@ insert into temp_inh_oncommit_test values (1); commit; select * from temp_inh_oncommit_test; -- one relation remains -select relname from pg_class where relname like 'temp_inh_oncommit_test%'; +select relname from pg_class where relname ~ '^temp_inh_oncommit_test'; drop table temp_inh_oncommit_test; -- Tests with two-phase commit