Make command order in test more sensible

Through several updates, the CREATE USER command has been separated
from where the user is actually used in the test.
This commit is contained in:
Peter Eisentraut 2019-10-22 10:35:54 +02:00
parent f86f46d091
commit ad4b7aeb84
2 changed files with 3 additions and 3 deletions

View File

@ -599,7 +599,6 @@ DROP SEQUENCE seq2;
-- should fail
SELECT lastval();
ERROR: lastval is not yet defined in this session
CREATE USER regress_seq_user;
-- Test sequences in read-only transactions
CREATE TEMPORARY SEQUENCE sequence_test_temp1;
START TRANSACTION READ ONLY;
@ -623,6 +622,7 @@ SELECT setval('sequence_test2', 1); -- error
ERROR: cannot execute setval() in a read-only transaction
ROLLBACK;
-- privileges tests
CREATE USER regress_seq_user;
-- nextval
BEGIN;
SET LOCAL SESSION AUTHORIZATION regress_seq_user;

View File

@ -272,8 +272,6 @@ DROP SEQUENCE seq2;
-- should fail
SELECT lastval();
CREATE USER regress_seq_user;
-- Test sequences in read-only transactions
CREATE TEMPORARY SEQUENCE sequence_test_temp1;
START TRANSACTION READ ONLY;
@ -287,6 +285,8 @@ ROLLBACK;
-- privileges tests
CREATE USER regress_seq_user;
-- nextval
BEGIN;
SET LOCAL SESSION AUTHORIZATION regress_seq_user;