@@ -571,10 +571,10 @@ drop function inverse(int);
571571-- performed in the aborted subtransaction
572572begin;
573573savepoint x;
574- create tableabc (a int);
575- insert intoabc values (5);
576- insert intoabc values (10);
577- declare foo cursor for select * fromabc ;
574+ create tabletrans_abc (a int);
575+ insert intotrans_abc values (5);
576+ insert intotrans_abc values (10);
577+ declare foo cursor for select * fromtrans_abc ;
578578fetch from foo;
579579 a
580580---
@@ -587,11 +587,11 @@ fetch from foo;
587587ERROR: cursor "foo" does not exist
588588commit;
589589begin;
590- create tableabc (a int);
591- insert intoabc values (5);
592- insert intoabc values (10);
593- insert intoabc values (15);
594- declare foo cursor for select * fromabc ;
590+ create tabletrans_abc (a int);
591+ insert intotrans_abc values (5);
592+ insert intotrans_abc values (10);
593+ insert intotrans_abc values (15);
594+ declare foo cursor for select * fromtrans_abc ;
595595fetch from foo;
596596 a
597597---
@@ -660,7 +660,7 @@ COMMIT;
660660DROP FUNCTION create_temp_tab();
661661DROP FUNCTION invert(x float8);
662662-- Tests for AND CHAIN
663- CREATE TABLEabc (a int);
663+ CREATE TABLEtrans_abc (a int);
664664-- set nondefault value so we have something to override below
665665SET default_transaction_read_only = on;
666666START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE;
@@ -682,8 +682,8 @@ SHOW transaction_deferrable;
682682 on
683683(1 row)
684684
685- INSERT INTOabc VALUES (1);
686- INSERT INTOabc VALUES (2);
685+ INSERT INTOtrans_abc VALUES (1);
686+ INSERT INTOtrans_abc VALUES (2);
687687COMMIT AND CHAIN; -- TBLOCK_END
688688SHOW transaction_isolation;
689689 transaction_isolation
@@ -703,11 +703,11 @@ SHOW transaction_deferrable;
703703 on
704704(1 row)
705705
706- INSERT INTOabc VALUES ('error');
706+ INSERT INTOtrans_abc VALUES ('error');
707707ERROR: invalid input syntax for type integer: "error"
708- LINE 1: INSERT INTOabc VALUES ('error');
709- ^
710- INSERT INTOabc VALUES (3); -- check it's really aborted
708+ LINE 1: INSERT INTOtrans_abc VALUES ('error');
709+ ^
710+ INSERT INTOtrans_abc VALUES (3); -- check it's really aborted
711711ERROR: current transaction is aborted, commands ignored until end of transaction block
712712COMMIT AND CHAIN; -- TBLOCK_ABORT_END
713713SHOW transaction_isolation;
@@ -728,7 +728,7 @@ SHOW transaction_deferrable;
728728 on
729729(1 row)
730730
731- INSERT INTOabc VALUES (4);
731+ INSERT INTOtrans_abc VALUES (4);
732732COMMIT;
733733START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE;
734734SHOW transaction_isolation;
@@ -750,10 +750,10 @@ SHOW transaction_deferrable;
750750(1 row)
751751
752752SAVEPOINT x;
753- INSERT INTOabc VALUES ('error');
753+ INSERT INTOtrans_abc VALUES ('error');
754754ERROR: invalid input syntax for type integer: "error"
755- LINE 1: INSERT INTOabc VALUES ('error');
756- ^
755+ LINE 1: INSERT INTOtrans_abc VALUES ('error');
756+ ^
757757COMMIT AND CHAIN; -- TBLOCK_ABORT_PENDING
758758SHOW transaction_isolation;
759759 transaction_isolation
@@ -773,7 +773,7 @@ SHOW transaction_deferrable;
773773 on
774774(1 row)
775775
776- INSERT INTOabc VALUES (5);
776+ INSERT INTOtrans_abc VALUES (5);
777777COMMIT;
778778START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE;
779779SHOW transaction_isolation;
@@ -835,7 +835,7 @@ SHOW transaction_deferrable;
835835 off
836836(1 row)
837837
838- INSERT INTOabc VALUES (6);
838+ INSERT INTOtrans_abc VALUES (6);
839839ROLLBACK AND CHAIN; -- TBLOCK_ABORT_PENDING
840840SHOW transaction_isolation;
841841 transaction_isolation
@@ -855,10 +855,10 @@ SHOW transaction_deferrable;
855855 off
856856(1 row)
857857
858- INSERT INTOabc VALUES ('error');
858+ INSERT INTOtrans_abc VALUES ('error');
859859ERROR: invalid input syntax for type integer: "error"
860- LINE 1: INSERT INTOabc VALUES ('error');
861- ^
860+ LINE 1: INSERT INTOtrans_abc VALUES ('error');
861+ ^
862862ROLLBACK AND CHAIN; -- TBLOCK_ABORT_END
863863SHOW transaction_isolation;
864864 transaction_isolation
@@ -884,7 +884,7 @@ COMMIT AND CHAIN; -- error
884884ERROR: COMMIT AND CHAIN can only be used in transaction blocks
885885ROLLBACK AND CHAIN; -- error
886886ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
887- SELECT * FROMabc ORDER BY 1;
887+ SELECT * FROMtrans_abc ORDER BY 1;
888888 a
889889---
890890 1
@@ -894,7 +894,7 @@ SELECT * FROM abc ORDER BY 1;
894894(4 rows)
895895
896896RESET default_transaction_read_only;
897- DROP TABLEabc ;
897+ DROP TABLEtrans_abc ;
898898-- Test assorted behaviors around the implicit transaction block created
899899-- when multiple SQL commands are sent in a single Query message. These
900900-- tests rely on the fact that psql will not break SQL commands apart at a
@@ -996,29 +996,29 @@ SHOW transaction_read_only;
996996 off
997997(1 row)
998998
999- CREATE TABLEabc (a int);
999+ CREATE TABLEtrans_abc (a int);
10001000-- COMMIT/ROLLBACK + COMMIT/ROLLBACK AND CHAIN
1001- INSERT INTOabc VALUES (7)\; COMMIT\; INSERT INTOabc VALUES (8)\; COMMIT AND CHAIN; -- 7 commit, 8 error
1001+ INSERT INTOtrans_abc VALUES (7)\; COMMIT\; INSERT INTOtrans_abc VALUES (8)\; COMMIT AND CHAIN; -- 7 commit, 8 error
10021002WARNING: there is no transaction in progress
10031003ERROR: COMMIT AND CHAIN can only be used in transaction blocks
1004- INSERT INTOabc VALUES (9)\; ROLLBACK\; INSERT INTOabc VALUES (10)\; ROLLBACK AND CHAIN; -- 9 rollback, 10 error
1004+ INSERT INTOtrans_abc VALUES (9)\; ROLLBACK\; INSERT INTOtrans_abc VALUES (10)\; ROLLBACK AND CHAIN; -- 9 rollback, 10 error
10051005WARNING: there is no transaction in progress
10061006ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
10071007-- COMMIT/ROLLBACK AND CHAIN + COMMIT/ROLLBACK
1008- INSERT INTOabc VALUES (11)\; COMMIT AND CHAIN\; INSERT INTOabc VALUES (12)\; COMMIT; -- 11 error, 12 not reached
1008+ INSERT INTOtrans_abc VALUES (11)\; COMMIT AND CHAIN\; INSERT INTOtrans_abc VALUES (12)\; COMMIT; -- 11 error, 12 not reached
10091009ERROR: COMMIT AND CHAIN can only be used in transaction blocks
1010- INSERT INTOabc VALUES (13)\; ROLLBACK AND CHAIN\; INSERT INTOabc VALUES (14)\; ROLLBACK; -- 13 error, 14 not reached
1010+ INSERT INTOtrans_abc VALUES (13)\; ROLLBACK AND CHAIN\; INSERT INTOtrans_abc VALUES (14)\; ROLLBACK; -- 13 error, 14 not reached
10111011ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
10121012-- START TRANSACTION + COMMIT/ROLLBACK AND CHAIN
1013- START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOabc VALUES (15)\; COMMIT AND CHAIN; -- 15 ok
1013+ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOtrans_abc VALUES (15)\; COMMIT AND CHAIN; -- 15 ok
10141014SHOW transaction_isolation; -- transaction is active at this point
10151015 transaction_isolation
10161016-----------------------
10171017 repeatable read
10181018(1 row)
10191019
10201020COMMIT;
1021- START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOabc VALUES (16)\; ROLLBACK AND CHAIN; -- 16 ok
1021+ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOtrans_abc VALUES (16)\; ROLLBACK AND CHAIN; -- 16 ok
10221022SHOW transaction_isolation; -- transaction is active at this point
10231023 transaction_isolation
10241024-----------------------
@@ -1028,15 +1028,15 @@ SHOW transaction_isolation; -- transaction is active at this point
10281028ROLLBACK;
10291029SET default_transaction_isolation = 'read committed';
10301030-- START TRANSACTION + COMMIT/ROLLBACK + COMMIT/ROLLBACK AND CHAIN
1031- START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOabc VALUES (17)\; COMMIT\; INSERT INTOabc VALUES (18)\; COMMIT AND CHAIN; -- 17 commit, 18 error
1031+ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOtrans_abc VALUES (17)\; COMMIT\; INSERT INTOtrans_abc VALUES (18)\; COMMIT AND CHAIN; -- 17 commit, 18 error
10321032ERROR: COMMIT AND CHAIN can only be used in transaction blocks
10331033SHOW transaction_isolation; -- out of transaction block
10341034 transaction_isolation
10351035-----------------------
10361036 read committed
10371037(1 row)
10381038
1039- START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOabc VALUES (19)\; ROLLBACK\; INSERT INTOabc VALUES (20)\; ROLLBACK AND CHAIN; -- 19 rollback, 20 error
1039+ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOtrans_abc VALUES (19)\; ROLLBACK\; INSERT INTOtrans_abc VALUES (20)\; ROLLBACK AND CHAIN; -- 19 rollback, 20 error
10401040ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
10411041SHOW transaction_isolation; -- out of transaction block
10421042 transaction_isolation
@@ -1045,15 +1045,15 @@ SHOW transaction_isolation; -- out of transaction block
10451045(1 row)
10461046
10471047RESET default_transaction_isolation;
1048- SELECT * FROMabc ORDER BY 1;
1048+ SELECT * FROMtrans_abc ORDER BY 1;
10491049 a
10501050----
10511051 7
10521052 15
10531053 17
10541054(3 rows)
10551055
1056- DROP TABLEabc ;
1056+ DROP TABLEtrans_abc ;
10571057-- Test for successful cleanup of an aborted transaction at session exit.
10581058-- THIS MUST BE THE LAST TEST IN THIS FILE.
10591059begin;