Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 89b160c

Browse filesBrowse files
committed
Improve new AND CHAIN tests
Tweak the tests so that we're not just testing the default setting of transaction_read_only. Reported-by: fn ln <emuser20140816@gmail.com>
1 parent 1192e3f commit 89b160c
Copy full SHA for 89b160c

File tree

Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-4
lines changed

‎src/test/regress/expected/transactions.out

Copy file name to clipboardExpand all lines: src/test/regress/expected/transactions.out
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -940,15 +940,15 @@ ERROR: RELEASE SAVEPOINT can only be used in transaction blocks
940940
-- but this is OK, because the BEGIN converts it to a regular xact
941941
SELECT 1\; BEGIN\; SAVEPOINT sp\; ROLLBACK TO SAVEPOINT sp\; COMMIT;
942942
-- Tests for AND CHAIN in implicit transaction blocks
943-
SET TRANSACTION READ WRITE\; COMMIT AND CHAIN; -- error
943+
SET TRANSACTION READ ONLY\; COMMIT AND CHAIN; -- error
944944
ERROR: COMMIT AND CHAIN can only be used in transaction blocks
945945
SHOW transaction_read_only;
946946
transaction_read_only
947947
-----------------------
948948
off
949949
(1 row)
950950

951-
SET TRANSACTION READ WRITE\; ROLLBACK AND CHAIN; -- error
951+
SET TRANSACTION READ ONLY\; ROLLBACK AND CHAIN; -- error
952952
ERROR: ROLLBACK AND CHAIN can only be used in transaction blocks
953953
SHOW transaction_read_only;
954954
transaction_read_only

‎src/test/regress/sql/transactions.sql

Copy file name to clipboardExpand all lines: src/test/regress/sql/transactions.sql
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,10 @@ SELECT 1\; BEGIN\; SAVEPOINT sp\; ROLLBACK TO SAVEPOINT sp\; COMMIT;
542542

543543
-- Tests for AND CHAIN in implicit transaction blocks
544544

545-
SET TRANSACTION READ WRITE\; COMMIT AND CHAIN; -- error
545+
SET TRANSACTION READ ONLY\; COMMIT AND CHAIN; -- error
546546
SHOW transaction_read_only;
547547

548-
SET TRANSACTION READ WRITE\; ROLLBACK AND CHAIN; -- error
548+
SET TRANSACTION READ ONLY\; ROLLBACK AND CHAIN; -- error
549549
SHOW transaction_read_only;
550550

551551
CREATE TABLE abc (a int);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.