You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: src/test/regress/expected/alter_table.out
+6-6
Original file line number
Diff line number
Diff line change
@@ -2418,14 +2418,14 @@ SELECT col_description('comment_test'::regclass, 1) as comment;
2418
2418
Column 'id' on comment_test
2419
2419
(1 row)
2420
2420
2421
-
SELECT indexrelid::regclass as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test'::regclass;
2421
+
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;
comment_test_pk | Index backing the PRIMARY KEY of comment_test
2426
2426
(2 rows)
2427
2427
2428
-
SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass;
2428
+
SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass ORDER BY 1, 2;
comment_test_pk | PRIMARY KEY constraint of comment_test
@@ -2449,18 +2449,18 @@ SELECT col_description('comment_test'::regclass, 1) as comment;
2449
2449
Column 'id' on comment_test
2450
2450
(1 row)
2451
2451
2452
-
SELECT indexrelid::regclass as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid = 'comment_test'::regclass;
2452
+
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;
comment_test_pk | Index backing the PRIMARY KEY of comment_test
2456
2455
comment_test_index | Simple index on comment_test
2456
+
comment_test_pk | Index backing the PRIMARY KEY of comment_test
2457
2457
(2 rows)
2458
2458
2459
-
SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass;
2459
+
SELECT conname as constraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid = 'comment_test'::regclass ORDER BY 1, 2;
Copy file name to clipboardExpand all lines: src/test/regress/sql/alter_table.sql
+4-4
Original file line number
Diff line number
Diff line change
@@ -1610,8 +1610,8 @@ COMMENT ON CONSTRAINT comment_test_pk ON comment_test IS 'PRIMARY KEY constraint
1610
1610
COMMENT ON INDEX comment_test_pk IS 'Index backing the PRIMARY KEY of comment_test';
1611
1611
1612
1612
SELECT col_description('comment_test'::regclass, 1) as comment;
1613
-
SELECT indexrelid::regclass as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid ='comment_test'::regclass;
1614
-
SELECT conname asconstraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid ='comment_test'::regclass;
1613
+
SELECT indexrelid::regclass::textas index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid ='comment_test'::regclassORDER BY1, 2;
1614
+
SELECT conname asconstraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid ='comment_test'::regclassORDER BY1, 2;
1615
1615
1616
1616
-- Change the datatype of all the columns. ALTER TABLE is optimized to not
1617
1617
-- 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
1626
1627
1627
-- Check that the comments are intact.
1628
1628
SELECT col_description('comment_test'::regclass, 1) as comment;
1629
-
SELECT indexrelid::regclass as index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid ='comment_test'::regclass;
1630
-
SELECT conname asconstraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid ='comment_test'::regclass;
1629
+
SELECT indexrelid::regclass::textas index, obj_description(indexrelid, 'pg_class') as comment FROM pg_index where indrelid ='comment_test'::regclassORDER BY1, 2;
1630
+
SELECT conname asconstraint, obj_description(oid, 'pg_constraint') as comment FROM pg_constraint where conrelid ='comment_test'::regclassORDER BY1, 2;
1631
1631
1632
1632
1633
1633
-- Check that we map relation oids to filenodes and back correctly. Only
0 commit comments