@@ -609,10 +609,10 @@ drop function inverse(int);
609
609
-- performed in the aborted subtransaction
610
610
begin;
611
611
savepoint x;
612
- create tableabc (a int);
613
- insert intoabc values (5);
614
- insert intoabc values (10);
615
- declare foo cursor for select * fromabc ;
612
+ create tabletrans_abc (a int);
613
+ insert intotrans_abc values (5);
614
+ insert intotrans_abc values (10);
615
+ declare foo cursor for select * fromtrans_abc ;
616
616
fetch from foo;
617
617
a
618
618
---
@@ -625,11 +625,11 @@ fetch from foo;
625
625
ERROR: cursor "foo" does not exist
626
626
commit;
627
627
begin;
628
- create tableabc (a int);
629
- insert intoabc values (5);
630
- insert intoabc values (10);
631
- insert intoabc values (15);
632
- declare foo cursor for select * fromabc ;
628
+ create tabletrans_abc (a int);
629
+ insert intotrans_abc values (5);
630
+ insert intotrans_abc values (10);
631
+ insert intotrans_abc values (15);
632
+ declare foo cursor for select * fromtrans_abc ;
633
633
fetch from foo;
634
634
a
635
635
---
@@ -698,7 +698,7 @@ COMMIT;
698
698
DROP FUNCTION create_temp_tab();
699
699
DROP FUNCTION invert(x float8);
700
700
-- Tests for AND CHAIN
701
- CREATE TABLEabc (a int);
701
+ CREATE TABLEtrans_abc (a int);
702
702
-- set nondefault value so we have something to override below
703
703
SET default_transaction_read_only = on;
704
704
START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE;
@@ -720,8 +720,8 @@ SHOW transaction_deferrable;
720
720
on
721
721
(1 row)
722
722
723
- INSERT INTOabc VALUES (1);
724
- INSERT INTOabc VALUES (2);
723
+ INSERT INTOtrans_abc VALUES (1);
724
+ INSERT INTOtrans_abc VALUES (2);
725
725
COMMIT AND CHAIN; -- TBLOCK_END
726
726
SHOW transaction_isolation;
727
727
transaction_isolation
@@ -741,11 +741,11 @@ SHOW transaction_deferrable;
741
741
on
742
742
(1 row)
743
743
744
- INSERT INTOabc VALUES ('error');
744
+ INSERT INTOtrans_abc VALUES ('error');
745
745
ERROR: invalid input syntax for type integer: "error"
746
- LINE 1: INSERT INTOabc VALUES ('error');
747
- ^
748
- INSERT INTOabc VALUES (3); -- check it's really aborted
746
+ LINE 1: INSERT INTOtrans_abc VALUES ('error');
747
+ ^
748
+ INSERT INTOtrans_abc VALUES (3); -- check it's really aborted
749
749
ERROR: current transaction is aborted, commands ignored until end of transaction block
750
750
COMMIT AND CHAIN; -- TBLOCK_ABORT_END
751
751
SHOW transaction_isolation;
@@ -766,7 +766,7 @@ SHOW transaction_deferrable;
766
766
on
767
767
(1 row)
768
768
769
- INSERT INTOabc VALUES (4);
769
+ INSERT INTOtrans_abc VALUES (4);
770
770
COMMIT;
771
771
START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE;
772
772
SHOW transaction_isolation;
@@ -788,10 +788,10 @@ SHOW transaction_deferrable;
788
788
(1 row)
789
789
790
790
SAVEPOINT x;
791
- INSERT INTOabc VALUES ('error');
791
+ INSERT INTOtrans_abc VALUES ('error');
792
792
ERROR: invalid input syntax for type integer: "error"
793
- LINE 1: INSERT INTOabc VALUES ('error');
794
- ^
793
+ LINE 1: INSERT INTOtrans_abc VALUES ('error');
794
+ ^
795
795
COMMIT AND CHAIN; -- TBLOCK_ABORT_PENDING
796
796
SHOW transaction_isolation;
797
797
transaction_isolation
@@ -811,7 +811,7 @@ SHOW transaction_deferrable;
811
811
on
812
812
(1 row)
813
813
814
- INSERT INTOabc VALUES (5);
814
+ INSERT INTOtrans_abc VALUES (5);
815
815
COMMIT;
816
816
START TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ WRITE, DEFERRABLE;
817
817
SHOW transaction_isolation;
@@ -873,7 +873,7 @@ SHOW transaction_deferrable;
873
873
off
874
874
(1 row)
875
875
876
- INSERT INTOabc VALUES (6);
876
+ INSERT INTOtrans_abc VALUES (6);
877
877
ROLLBACK AND CHAIN; -- TBLOCK_ABORT_PENDING
878
878
SHOW transaction_isolation;
879
879
transaction_isolation
@@ -893,10 +893,10 @@ SHOW transaction_deferrable;
893
893
off
894
894
(1 row)
895
895
896
- INSERT INTOabc VALUES ('error');
896
+ INSERT INTOtrans_abc VALUES ('error');
897
897
ERROR: invalid input syntax for type integer: "error"
898
- LINE 1: INSERT INTOabc VALUES ('error');
899
- ^
898
+ LINE 1: INSERT INTOtrans_abc VALUES ('error');
899
+ ^
900
900
ROLLBACK AND CHAIN; -- TBLOCK_ABORT_END
901
901
SHOW transaction_isolation;
902
902
transaction_isolation
@@ -922,7 +922,7 @@ COMMIT AND CHAIN; -- error
922
922
ERROR: COMMIT AND CHAIN can only be used in transaction blocks
923
923
ROLLBACK AND CHAIN; -- error
924
924
ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
925
- SELECT * FROMabc ORDER BY 1;
925
+ SELECT * FROMtrans_abc ORDER BY 1;
926
926
a
927
927
---
928
928
1
@@ -932,7 +932,7 @@ SELECT * FROM abc ORDER BY 1;
932
932
(4 rows)
933
933
934
934
RESET default_transaction_read_only;
935
- DROP TABLEabc ;
935
+ DROP TABLEtrans_abc ;
936
936
-- Test assorted behaviors around the implicit transaction block created
937
937
-- when multiple SQL commands are sent in a single Query message. These
938
938
-- tests rely on the fact that psql will not break SQL commands apart at a
@@ -1090,29 +1090,29 @@ SHOW transaction_read_only;
1090
1090
off
1091
1091
(1 row)
1092
1092
1093
- CREATE TABLEabc (a int);
1093
+ CREATE TABLEtrans_abc (a int);
1094
1094
-- COMMIT/ROLLBACK + COMMIT/ROLLBACK AND CHAIN
1095
- INSERT INTOabc VALUES (7)\; COMMIT\; INSERT INTOabc VALUES (8)\; COMMIT AND CHAIN; -- 7 commit, 8 error
1095
+ INSERT INTOtrans_abc VALUES (7)\; COMMIT\; INSERT INTOtrans_abc VALUES (8)\; COMMIT AND CHAIN; -- 7 commit, 8 error
1096
1096
WARNING: there is no transaction in progress
1097
1097
ERROR: COMMIT AND CHAIN can only be used in transaction blocks
1098
- INSERT INTOabc VALUES (9)\; ROLLBACK\; INSERT INTOabc VALUES (10)\; ROLLBACK AND CHAIN; -- 9 rollback, 10 error
1098
+ INSERT INTOtrans_abc VALUES (9)\; ROLLBACK\; INSERT INTOtrans_abc VALUES (10)\; ROLLBACK AND CHAIN; -- 9 rollback, 10 error
1099
1099
WARNING: there is no transaction in progress
1100
1100
ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
1101
1101
-- COMMIT/ROLLBACK AND CHAIN + COMMIT/ROLLBACK
1102
- INSERT INTOabc VALUES (11)\; COMMIT AND CHAIN\; INSERT INTOabc VALUES (12)\; COMMIT; -- 11 error, 12 not reached
1102
+ INSERT INTOtrans_abc VALUES (11)\; COMMIT AND CHAIN\; INSERT INTOtrans_abc VALUES (12)\; COMMIT; -- 11 error, 12 not reached
1103
1103
ERROR: COMMIT AND CHAIN can only be used in transaction blocks
1104
- INSERT INTOabc VALUES (13)\; ROLLBACK AND CHAIN\; INSERT INTOabc VALUES (14)\; ROLLBACK; -- 13 error, 14 not reached
1104
+ INSERT INTOtrans_abc VALUES (13)\; ROLLBACK AND CHAIN\; INSERT INTOtrans_abc VALUES (14)\; ROLLBACK; -- 13 error, 14 not reached
1105
1105
ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
1106
1106
-- START TRANSACTION + COMMIT/ROLLBACK AND CHAIN
1107
- START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOabc VALUES (15)\; COMMIT AND CHAIN; -- 15 ok
1107
+ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOtrans_abc VALUES (15)\; COMMIT AND CHAIN; -- 15 ok
1108
1108
SHOW transaction_isolation; -- transaction is active at this point
1109
1109
transaction_isolation
1110
1110
-----------------------
1111
1111
repeatable read
1112
1112
(1 row)
1113
1113
1114
1114
COMMIT;
1115
- START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOabc VALUES (16)\; ROLLBACK AND CHAIN; -- 16 ok
1115
+ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOtrans_abc VALUES (16)\; ROLLBACK AND CHAIN; -- 16 ok
1116
1116
SHOW transaction_isolation; -- transaction is active at this point
1117
1117
transaction_isolation
1118
1118
-----------------------
@@ -1122,15 +1122,15 @@ SHOW transaction_isolation; -- transaction is active at this point
1122
1122
ROLLBACK;
1123
1123
SET default_transaction_isolation = 'read committed';
1124
1124
-- START TRANSACTION + COMMIT/ROLLBACK + COMMIT/ROLLBACK AND CHAIN
1125
- START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOabc VALUES (17)\; COMMIT\; INSERT INTOabc VALUES (18)\; COMMIT AND CHAIN; -- 17 commit, 18 error
1125
+ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOtrans_abc VALUES (17)\; COMMIT\; INSERT INTOtrans_abc VALUES (18)\; COMMIT AND CHAIN; -- 17 commit, 18 error
1126
1126
ERROR: COMMIT AND CHAIN can only be used in transaction blocks
1127
1127
SHOW transaction_isolation; -- out of transaction block
1128
1128
transaction_isolation
1129
1129
-----------------------
1130
1130
read committed
1131
1131
(1 row)
1132
1132
1133
- START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOabc VALUES (19)\; ROLLBACK\; INSERT INTOabc VALUES (20)\; ROLLBACK AND CHAIN; -- 19 rollback, 20 error
1133
+ START TRANSACTION ISOLATION LEVEL REPEATABLE READ\; INSERT INTOtrans_abc VALUES (19)\; ROLLBACK\; INSERT INTOtrans_abc VALUES (20)\; ROLLBACK AND CHAIN; -- 19 rollback, 20 error
1134
1134
ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
1135
1135
SHOW transaction_isolation; -- out of transaction block
1136
1136
transaction_isolation
@@ -1139,15 +1139,15 @@ SHOW transaction_isolation; -- out of transaction block
1139
1139
(1 row)
1140
1140
1141
1141
RESET default_transaction_isolation;
1142
- SELECT * FROMabc ORDER BY 1;
1142
+ SELECT * FROMtrans_abc ORDER BY 1;
1143
1143
a
1144
1144
----
1145
1145
7
1146
1146
15
1147
1147
17
1148
1148
(3 rows)
1149
1149
1150
- DROP TABLEabc ;
1150
+ DROP TABLEtrans_abc ;
1151
1151
-- Test for successful cleanup of an aborted transaction at session exit.
1152
1152
-- THIS MUST BE THE LAST TEST IN THIS FILE.
1153
1153
begin;