Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 5856ed1

Browse files
committed
Improve stability of identity.sql regression test.
I noticed while trying to run the regression tests under a low geqo_threshold that one query on information_schema.columns had unstable (as in, variable from one run to the next) output order. This is pretty unsurprising given the complexity of the underlying plan. Interestingly, of this test's three nigh-identical queries on information_schema.columns, the other two already had ORDER BY clauses guaranteeing stable output. Let's make this one look the same. Back-patch to v10 where this test was added. We've not heard field reports of the test failing, but this experience shows that it can happen when testing under even slightly unusual conditions.
1 parent 62f6f11 commit 5856ed1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/regress/expected/identity.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ SELECT * FROM itest6;
316316
102 |
317317
(3 rows)
318318

319-
SELECT table_name, column_name, is_identity, identity_generation FROM information_schema.columns WHERE table_name = 'itest6';
319+
SELECT table_name, column_name, is_identity, identity_generation FROM information_schema.columns WHERE table_name = 'itest6' ORDER BY 1, 2;
320320
table_name | column_name | is_identity | identity_generation
321321
------------+-------------+-------------+---------------------
322322
itest6 | a | YES | BY DEFAULT

src/test/regress/sql/identity.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ INSERT INTO itest6 DEFAULT VALUES;
191191
INSERT INTO itest6 DEFAULT VALUES;
192192
SELECT * FROM itest6;
193193

194-
SELECT table_name, column_name, is_identity, identity_generation FROM information_schema.columns WHERE table_name = 'itest6';
194+
SELECT table_name, column_name, is_identity, identity_generation FROM information_schema.columns WHERE table_name = 'itest6' ORDER BY 1, 2;
195195

196196
ALTER TABLE itest6 ALTER COLUMN b SET INCREMENT BY 2; -- fail, not identity
197197

0 commit comments

Comments
 (0)