Commit 1a56498e authored by Heikki Linnakangas's avatar Heikki Linnakangas

Make regression test output stable.

In the test query I added for ALTER TABLE retaining comments, the order of
the result rows was not stable, and varied across systems. Add an ORDER BY
to make the order predictable. This should fix the buildfarm failures.
parent e42375fc
...@@ -2418,14 +2418,14 @@ SELECT col_description('comment_test'::regclass, 1) as comment; ...@@ -2418,14 +2418,14 @@ SELECT col_description('comment_test'::regclass, 1) as comment;
Column 'id' on comment_test Column 'id' on comment_test
(1 row) (1 row)
SELECT indexrelid::regclass as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test'::regclass; SELECT indexrelid::regclass::text as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test'::regclass ORDER BY 1, 2;
index | comment index | comment
--------------------+----------------------------------------------- --------------------+-----------------------------------------------
comment_test_index | Simple index on comment_test comment_test_index | Simple index on comment_test
comment_test_pk | Index backing the PRIMARY KEY of comment_test comment_test_pk | Index backing the PRIMARY KEY of comment_test
(2 rows) (2 rows)
SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass; SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass ORDER BY 1, 2;
constraint | comment constraint | comment
---------------------------------+----------------------------------------------- ---------------------------------+-----------------------------------------------
comment_test_pk | PRIMARY KEY constraint of comment_test comment_test_pk | PRIMARY KEY constraint of comment_test
...@@ -2449,18 +2449,18 @@ SELECT col_description('comment_test'::regclass, 1) as comment; ...@@ -2449,18 +2449,18 @@ SELECT col_description('comment_test'::regclass, 1) as comment;
Column 'id' on comment_test Column 'id' on comment_test
(1 row) (1 row)
SELECT indexrelid::regclass as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test'::regclass; SELECT indexrelid::regclass::text as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test'::regclass ORDER BY 1, 2;
index | comment index | comment
--------------------+----------------------------------------------- --------------------+-----------------------------------------------
comment_test_pk | Index backing the PRIMARY KEY of comment_test
comment_test_index | Simple index on comment_test comment_test_index | Simple index on comment_test
comment_test_pk | Index backing the PRIMARY KEY of comment_test
(2 rows) (2 rows)
SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass; SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass ORDER BY 1, 2;
constraint | comment constraint | comment
---------------------------------+----------------------------------------------- ---------------------------------+-----------------------------------------------
comment_test_positive_col_check | CHECK constraint on comment_test.positive_col
comment_test_pk | PRIMARY KEY constraint of comment_test comment_test_pk | PRIMARY KEY constraint of comment_test
comment_test_positive_col_check | CHECK constraint on comment_test.positive_col
(2 rows) (2 rows)
-- Check that we map relation oids to filenodes and back correctly. Only -- Check that we map relation oids to filenodes and back correctly. Only
......
...@@ -1610,8 +1610,8 @@ COMMENT ON CONSTRAINT comment_test_pk ON comment_test IS 'PRIMARY KEY constraint ...@@ -1610,8 +1610,8 @@ COMMENT ON CONSTRAINT comment_test_pk ON comment_test IS 'PRIMARY KEY constraint
COMMENT ON INDEX comment_test_pk IS 'Index backing the PRIMARY KEY of comment_test'; COMMENT ON INDEX comment_test_pk IS 'Index backing the PRIMARY KEY of comment_test';
SELECT col_description('comment_test'::regclass, 1) as comment; SELECT col_description('comment_test'::regclass, 1) as comment;
SELECT indexrelid::regclass as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test'::regclass; SELECT indexrelid::regclass::text as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test'::regclass ORDER BY 1, 2;
SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass; SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass ORDER BY 1, 2;
-- Change the datatype of all the columns. ALTER TABLE is optimized to not -- Change the datatype of all the columns. ALTER TABLE is optimized to not
-- rebuild an index if the new data type is binary compatible with the old -- rebuild an index if the new data type is binary compatible with the old
...@@ -1626,8 +1626,8 @@ ALTER TABLE comment_test ALTER COLUMN positive_col SET DATA TYPE bigint; ...@@ -1626,8 +1626,8 @@ ALTER TABLE comment_test ALTER COLUMN positive_col SET DATA TYPE bigint;
-- Check that the comments are intact. -- Check that the comments are intact.
SELECT col_description('comment_test'::regclass, 1) as comment; SELECT col_description('comment_test'::regclass, 1) as comment;
SELECT indexrelid::regclass as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test'::regclass; SELECT indexrelid::regclass::text as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test'::regclass ORDER BY 1, 2;
SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass; SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass ORDER BY 1, 2;
-- Check that we map relation oids to filenodes and back correctly. Only -- Check that we map relation oids to filenodes and back correctly. Only
......
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