postgres.git / summary / log / commit / refs

commit    0d1f6ae485d8d3d034e3d67dd38cc65ab359f773
Author:   Tom Lane <tgl@sss.pgh.pa.us>
Date:     Mon Oct 05 00:45:06 2020 +0000
First released in: 14.0, 10.15, 11.10, 12.5, 13.1

    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.


src/test/regress/expected/identity.out | 2 +- src/test/regress/sql/identity.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/regress/expected/identity.out b/src/test/regress/expected/identity.out index d7d5178f5d8..98699348ebf 100644 --- a/src/test/regress/expected/identity.out +++ b/src/test/regress/expected/identity.out @@ -303,7 +303,7 @@ SELECT * FROM itest6; 102 | (3 rows) -SELECT table_name, column_name, is_identity, identity_generation FROM information_schema.columns WHERE table_name = 'itest6'; +SELECT table_name, column_name, is_identity, identity_generation FROM information_schema.columns WHERE table_name = 'itest6' ORDER BY 1, 2; table_name | column_name | is_identity | identity_generation ------------+-------------+-------------+--------------------- itest6 | a | YES | BY DEFAULT diff --git a/src/test/regress/sql/identity.sql b/src/test/regress/sql/identity.sql index a35f331f4e0..3f6fb629a4a 100644 --- a/src/test/regress/sql/identity.sql +++ b/src/test/regress/sql/identity.sql @@ -183,7 +183,7 @@ INSERT INTO itest6 DEFAULT VALUES; INSERT INTO itest6 DEFAULT VALUES; SELECT * FROM itest6; -SELECT table_name, column_name, is_identity, identity_generation FROM information_schema.columns WHERE table_name = 'itest6'; +SELECT table_name, column_name, is_identity, identity_generation FROM information_schema.columns WHERE table_name = 'itest6' ORDER BY 1, 2; ALTER TABLE itest6 ALTER COLUMN b SET INCREMENT BY 2; -- fail, not identity [parent: 3b8402170ad2]