Commit 9c18104c authored by Peter Eisentraut's avatar Peter Eisentraut

Simplify sequence test

We maintained two separate expected files because log_cnt could be one
of two values.  Rewrite the test so that we only need one file.
Reviewed-by: default avatarPetr Jelinek <petr.jelinek@2ndquadrant.com>
parent e8ee3d6b
......@@ -190,10 +190,12 @@ SELECT nextval('foo_seq_new');
2
(1 row)
SELECT * FROM foo_seq_new;
last_value | log_cnt | is_called
------------+---------+-----------
2 | 31 | t
-- log_cnt can be higher if there is a checkpoint just at the right
-- time, so just test for the expected range
SELECT last_value, log_cnt IN (31, 32) AS log_cnt_ok, is_called FROM foo_seq_new;
last_value | log_cnt_ok | is_called
------------+------------+-----------
2 | t | t
(1 row)
DROP SEQUENCE foo_seq_new;
......
This diff is collapsed.
......@@ -84,7 +84,9 @@ ALTER TABLE foo_seq RENAME TO foo_seq_new;
SELECT * FROM foo_seq_new;
SELECT nextval('foo_seq_new');
SELECT nextval('foo_seq_new');
SELECT * FROM foo_seq_new;
-- log_cnt can be higher if there is a checkpoint just at the right
-- time, so just test for the expected range
SELECT last_value, log_cnt IN (31, 32) AS log_cnt_ok, is_called FROM foo_seq_new;
DROP SEQUENCE foo_seq_new;
-- renaming serial sequences
......
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