Skip to content

Commit

Permalink
Fix unrecognized value error in upgrade test
Browse files Browse the repository at this point in the history
When post.catalog.sql is run outside of pgupgrade test it will
raise the error `unrecognized value ":PG_UPGRADE_TEST" for "\if expression": Boolean expected`
This patch defines the variable and sets it to false for non pgupgrade runs.
  • Loading branch information
svenklemm committed Oct 15, 2024
1 parent 8a32f91 commit b2e6549
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/sql/updates/post.v7.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
-- Please see the included NOTICE for copyright information and
-- LICENSE-APACHE for a copy of the license.

\set PG_UPGRADE_TEST false
\ir post.catalog.sql
\unset PG_UPGRADE_TEST
\ir post.insert.sql
\ir post.integrity_test.sql
\ir catalog_missing_columns.sql
Expand Down
2 changes: 2 additions & 0 deletions test/sql/updates/post.v8.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
-- Please see the included NOTICE for copyright information and
-- LICENSE-APACHE for a copy of the license.

\set PG_UPGRADE_TEST false
\ir post.catalog.sql
\unset PG_UPGRADE_TEST
\ir post.insert.sql
\ir post.integrity_test.sql
\ir catalog_missing_columns.sql
Expand Down

0 comments on commit b2e6549

Please sign in to comment.