@@ -575,10 +575,10 @@ drop function inverse(int);
575575-- performed in the aborted subtransaction
576576begin;
577577savepoint x;
578- create tableabc (a int);
579- insert intoabc values (5);
580- insert intoabc values (10);
581- declare foo cursor for select * fromabc ;
578+ create tabletrans_abc (a int);
579+ insert intotrans_abc values (5);
580+ insert intotrans_abc values (10);
581+ declare foo cursor for select * fromtrans_abc ;
582582fetch from foo;
583583 a
584584---
@@ -591,11 +591,11 @@ fetch from foo;
591591ERROR: cursor "foo" does not exist
592592commit;
593593begin;
594- create tableabc (a int);
595- insert intoabc values (5);
596- insert intoabc values (10);
597- insert intoabc values (15);
598- declare foo cursor for select * fromabc ;
594+ create tabletrans_abc (a int);
595+ insert intotrans_abc values (5);
596+ insert intotrans_abc values (10);
597+ insert intotrans_abc values (15);
598+ declare foo cursor for select * fromtrans_abc ;
599599fetch from foo;
600600 a
601601---
@@ -664,7 +664,7 @@ COMMIT;
664664DROP FUNCTION create_temp_tab();
665665DROP FUNCTION invert(x float8);
666666-- Tests for AND CHAIN
667- CREATE TABLEabc (a int);
667+ CREATE TABLEtrans_abc (a int);
668668-- set nondefault value so we have something to override below
669669SET default_transaction_read_only = on;
670670START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE;
@@ -686,8 +686,8 @@ SHOW transaction_deferrable;
686686 on
687687(1 row)
688688
689- INSERT INTOabc VALUES (1);
690- INSERT INTOabc VALUES (2);
689+ INSERT INTOtrans_abc VALUES (1);
690+ INSERT INTOtrans_abc VALUES (2);
691691COMMIT AND CHAIN; -- TBLOCK_END
692692SHOW transaction_isolation;
693693 transaction_isolation
@@ -707,11 +707,11 @@ SHOW transaction_deferrable;
707707 on
708708(1 row)
709709
710- INSERT INTOabc VALUES ('error');
710+ INSERT INTOtrans_abc VALUES ('error');
711711ERROR: invalid input syntax for type integer: "error"
712- LINE 1: INSERT INTOabc VALUES ('error');
713- ^
714- INSERT INTOabc VALUES (3); -- check it's really aborted
712+ LINE 1: INSERT INTOtrans_abc VALUES ('error');
713+ ^
714+ INSERT INTOtrans_abc VALUES (3); -- check it's really aborted
715715ERROR: current transaction is aborted, commands ignored until end of transaction block
716716COMMIT AND CHAIN; -- TBLOCK_ABORT_END
717717SHOW transaction_isolation;
@@ -732,7 +732,7 @@ SHOW transaction_deferrable;
732732 on
733733(1 row)
734734
735- INSERT INTOabc VALUES (4);
735+ INSERT INTOtrans_abc VALUES (4);
736736COMMIT;
737737START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE;
738738SHOW transaction_isolation;
@@ -754,10 +754,10 @@ SHOW transaction_deferrable;
754754(1 row)
755755
756756SAVEPOINT x;
757- INSERT INTOabc VALUES ('error');
757+ INSERT INTOtrans_abc VALUES ('error');
758758ERROR: invalid input syntax for type integer: "error"
759- LINE 1: INSERT INTOabc VALUES ('error');
760- ^
759+ LINE 1: INSERT INTOtrans_abc VALUES ('error');
760+ ^
761761COMMIT AND CHAIN; -- TBLOCK_ABORT_PENDING
762762SHOW transaction_isolation;
763763 transaction_isolation
@@ -777,7 +777,7 @@ SHOW transaction_deferrable;
777777 on
778778(1 row)
779779
780- INSERT INTOabc VALUES (5);
780+ INSERT INTOtrans_abc VALUES (5);
781781COMMIT;
782782START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE;
783783SHOW transaction_isolation;
@@ -839,7 +839,7 @@ SHOW transaction_deferrable;
839839 off
840840(1 row)
841841
842- INSERT INTOabc VALUES (6);
842+ INSERT INTOtrans_abc VALUES (6);
843843ROLLBACK AND CHAIN; -- TBLOCK_ABORT_PENDING
844844SHOW transaction_isolation;
845845 transaction_isolation
@@ -859,10 +859,10 @@ SHOW transaction_deferrable;
859859 off
860860(1 row)
861861
862- INSERT INTOabc VALUES ('error');
862+ INSERT INTOtrans_abc VALUES ('error');
863863ERROR: invalid input syntax for type integer: "error"
864- LINE 1: INSERT INTOabc VALUES ('error');
865- ^
864+ LINE 1: INSERT INTOtrans_abc VALUES ('error');
865+ ^
866866ROLLBACK AND CHAIN; -- TBLOCK_ABORT_END
867867SHOW transaction_isolation;
868868 transaction_isolation
@@ -888,7 +888,7 @@ COMMIT AND CHAIN; -- error
888888ERROR: COMMIT AND CHAIN can only be used in transaction blocks
889889ROLLBACK AND CHAIN; -- error
890890ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
891- SELECT * FROMabc ORDER BY 1;
891+ SELECT * FROMtrans_abc ORDER BY 1;
892892 a
893893---
894894 1
@@ -898,7 +898,7 @@ SELECT * FROM abc ORDER BY 1;
898898(4 rows)
899899
900900RESET default_transaction_read_only;
901- DROP TABLEabc ;
901+ DROP TABLEtrans_abc ;
902902-- Test assorted behaviors around the implicit transaction block created
903903-- when multiple SQL commands are sent in a single Query message. These
904904-- tests rely on the fact that psql will not break SQL commands apart at a
@@ -1056,29 +1056,29 @@ SHOW transaction_read_only;
10561056 off
10571057(1 row)
10581058
1059- CREATE TABLEabc (a int);
1059+ CREATE TABLEtrans_abc (a int);
10601060-- COMMIT/ROLLBACK + COMMIT/ROLLBACK AND CHAIN
1061- INSERT INTOabc VALUES (7)\; COMMIT\; INSERT INTOabc VALUES (8)\; COMMIT AND CHAIN; -- 7 commit, 8 error
1061+ INSERT INTOtrans_abc VALUES (7)\; COMMIT\; INSERT INTOtrans_abc VALUES (8)\; COMMIT AND CHAIN; -- 7 commit, 8 error
10621062WARNING: there is no transaction in progress
10631063ERROR: COMMIT AND CHAIN can only be used in transaction blocks
1064- INSERT INTOabc VALUES (9)\; ROLLBACK\; INSERT INTOabc VALUES (10)\; ROLLBACK AND CHAIN; -- 9 rollback, 10 error
1064+ INSERT INTOtrans_abc VALUES (9)\; ROLLBACK\; INSERT INTOtrans_abc VALUES (10)\; ROLLBACK AND CHAIN; -- 9 rollback, 10 error
10651065WARNING: there is no transaction in progress
10661066ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
10671067-- COMMIT/ROLLBACK AND CHAIN + COMMIT/ROLLBACK
1068- INSERT INTOabc VALUES (11)\; COMMIT AND CHAIN\; INSERT INTOabc VALUES (12)\; COMMIT; -- 11 error, 12 not reached
1068+ INSERT INTOtrans_abc VALUES (11)\; COMMIT AND CHAIN\; INSERT INTOtrans_abc VALUES (12)\; COMMIT; -- 11 error, 12 not reached
10691069ERROR: COMMIT AND CHAIN can only be used in transaction blocks
1070- INSERT INTOabc VALUES (13)\; ROLLBACK AND CHAIN\; INSERT INTOabc VALUES (14)\; ROLLBACK; -- 13 error, 14 not reached
1070+ INSERT INTOtrans_abc VALUES (13)\; ROLLBACK AND CHAIN\; INSERT INTOtrans_abc VALUES (14)\; ROLLBACK; -- 13 error, 14 not reached
10711071ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
10721072-- START TRANSACTION + COMMIT/ROLLBACK AND CHAIN
1073- START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOabc VALUES (15)\; COMMIT AND CHAIN; -- 15 ok
1073+ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOtrans_abc VALUES (15)\; COMMIT AND CHAIN; -- 15 ok
10741074SHOW transaction_isolation; -- transaction is active at this point
10751075 transaction_isolation
10761076-----------------------
10771077 repeatable read
10781078(1 row)
10791079
10801080COMMIT;
1081- START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOabc VALUES (16)\; ROLLBACK AND CHAIN; -- 16 ok
1081+ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOtrans_abc VALUES (16)\; ROLLBACK AND CHAIN; -- 16 ok
10821082SHOW transaction_isolation; -- transaction is active at this point
10831083 transaction_isolation
10841084-----------------------
@@ -1088,15 +1088,15 @@ SHOW transaction_isolation; -- transaction is active at this point
10881088ROLLBACK;
10891089SET default_transaction_isolation = 'read committed';
10901090-- START TRANSACTION + COMMIT/ROLLBACK + COMMIT/ROLLBACK AND CHAIN
1091- START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOabc VALUES (17)\; COMMIT\; INSERT INTOabc VALUES (18)\; COMMIT AND CHAIN; -- 17 commit, 18 error
1091+ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOtrans_abc VALUES (17)\; COMMIT\; INSERT INTOtrans_abc VALUES (18)\; COMMIT AND CHAIN; -- 17 commit, 18 error
10921092ERROR: COMMIT AND CHAIN can only be used in transaction blocks
10931093SHOW transaction_isolation; -- out of transaction block
10941094 transaction_isolation
10951095-----------------------
10961096 read committed
10971097(1 row)
10981098
1099- START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOabc VALUES (19)\; ROLLBACK\; INSERT INTOabc VALUES (20)\; ROLLBACK AND CHAIN; -- 19 rollback, 20 error
1099+ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOtrans_abc VALUES (19)\; ROLLBACK\; INSERT INTOtrans_abc VALUES (20)\; ROLLBACK AND CHAIN; -- 19 rollback, 20 error
11001100ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
11011101SHOW transaction_isolation; -- out of transaction block
11021102 transaction_isolation
@@ -1105,15 +1105,15 @@ SHOW transaction_isolation; -- out of transaction block
11051105(1 row)
11061106
11071107RESET default_transaction_isolation;
1108- SELECT * FROMabc ORDER BY 1;
1108+ SELECT * FROMtrans_abc ORDER BY 1;
11091109 a
11101110----
11111111 7
11121112 15
11131113 17
11141114(3 rows)
11151115
1116- DROP TABLEabc ;
1116+ DROP TABLEtrans_abc ;
11171117-- Test for successful cleanup of an aborted transaction at session exit.
11181118-- THIS MUST BE THE LAST TEST IN THIS FILE.
11191119begin;