Skip to content

Commit

Permalink
Make 04_catalog test reproducible
Browse files Browse the repository at this point in the history
We start by inserting a row corresponding to one of the existing database,
excluding any database named "test".  But we later insert a fake record for a
database with oid 1, which is also the oid of an existing database.  So also
exclude this database oid from the list of existing database to make sure it
doesn't cause any problem (which actually happens with postgres 9.5 for some
reason).
  • Loading branch information
rjuju committed Jul 21, 2024
1 parent 0186f29 commit c70ae6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions expected/04_catalog.out
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ INSERT INTO "PoWA".powa_catalog_database_src_tmp
FROM "PoWA".powa_catalog_database_src(0) src
WHERE src.datname != current_database()
AND src.datname != 'test'
AND src.oid != 1
LIMIT 1;
SELECT "PoWA".powa_catalog_database_snapshot(1);
powa_catalog_database_snapshot
Expand Down
1 change: 1 addition & 0 deletions sql/04_catalog.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ INSERT INTO "PoWA".powa_catalog_database_src_tmp
FROM "PoWA".powa_catalog_database_src(0) src
WHERE src.datname != current_database()
AND src.datname != 'test'
AND src.oid != 1
LIMIT 1;
SELECT "PoWA".powa_catalog_database_snapshot(1);

Expand Down

0 comments on commit c70ae6c

Please sign in to comment.