Commit 89b160c3 authored by Peter Eisentraut's avatar Peter Eisentraut

Improve new AND CHAIN tests

Tweak the tests so that we're not just testing the default setting of
transaction_read_only.
Reported-by: default avatarfn ln <emuser20140816@gmail.com>
parent 1192e3fb
...@@ -940,7 +940,7 @@ ERROR: RELEASE SAVEPOINT can only be used in transaction blocks ...@@ -940,7 +940,7 @@ ERROR: RELEASE SAVEPOINT can only be used in transaction blocks
-- but this is OK, because the BEGIN converts it to a regular xact -- but this is OK, because the BEGIN converts it to a regular xact
SELECT 1\; BEGIN\; SAVEPOINT sp\; ROLLBACK TO SAVEPOINT sp\; COMMIT; SELECT 1\; BEGIN\; SAVEPOINT sp\; ROLLBACK TO SAVEPOINT sp\; COMMIT;
-- Tests for AND CHAIN in implicit transaction blocks -- Tests for AND CHAIN in implicit transaction blocks
SET TRANSACTION READ WRITE\; COMMIT AND CHAIN; -- error SET TRANSACTION READ ONLY\; COMMIT AND CHAIN; -- error
ERROR: COMMIT AND CHAIN can only be used in transaction blocks ERROR: COMMIT AND CHAIN can only be used in transaction blocks
SHOW transaction_read_only; SHOW transaction_read_only;
transaction_read_only transaction_read_only
...@@ -948,7 +948,7 @@ SHOW transaction_read_only; ...@@ -948,7 +948,7 @@ SHOW transaction_read_only;
off off
(1 row) (1 row)
SET TRANSACTION READ WRITE\; ROLLBACK AND CHAIN; -- error SET TRANSACTION READ ONLY\; ROLLBACK AND CHAIN; -- error
ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
SHOW transaction_read_only; SHOW transaction_read_only;
transaction_read_only transaction_read_only
......
...@@ -542,10 +542,10 @@ SELECT 1\; BEGIN\; SAVEPOINT sp\; ROLLBACK TO SAVEPOINT sp\; COMMIT; ...@@ -542,10 +542,10 @@ SELECT 1\; BEGIN\; SAVEPOINT sp\; ROLLBACK TO SAVEPOINT sp\; COMMIT;
-- Tests for AND CHAIN in implicit transaction blocks -- Tests for AND CHAIN in implicit transaction blocks
SET TRANSACTION READ WRITE\; COMMIT AND CHAIN; -- error SET TRANSACTION READ ONLY\; COMMIT AND CHAIN; -- error
SHOW transaction_read_only; SHOW transaction_read_only;
SET TRANSACTION READ WRITE\; ROLLBACK AND CHAIN; -- error SET TRANSACTION READ ONLY\; ROLLBACK AND CHAIN; -- error
SHOW transaction_read_only; SHOW transaction_read_only;
CREATE TABLE abc (a int); CREATE TABLE abc (a int);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment