diff options
author | Andres Freund <andres@anarazel.de> | 2014-08-26 02:54:53 +0200 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2014-08-26 12:27:26 +0200 |
commit | ddc2504dbcf2af97b58a91b071768c17774d58d1 (patch) | |
tree | 4b8dfca3fa0f534726582e02fe704e5044a250c8 /contrib/postgres_fdw | |
parent | 2bde29739d1e28f58e901b7e53057b8ddc0ec286 (diff) | |
download | postgresql-ddc2504dbcf2af97b58a91b071768c17774d58d1.tar.gz postgresql-ddc2504dbcf2af97b58a91b071768c17774d58d1.zip |
Don't hardcode contrib_regression dbname in postgres_fdw and dblink tests.
That allows parallel installcheck to succeed inside contrib/. The
output is not particularly pretty unless make's -O option to
synchronize the output is used.
There's other tests, outside contrib, that use a hardcoded,
non-unique, database name. Those prohibit paralell installcheck to be
used across more directories; but that's something for a separate
patch.
Diffstat (limited to 'contrib/postgres_fdw')
-rw-r--r-- | contrib/postgres_fdw/Makefile | 3 | ||||
-rw-r--r-- | contrib/postgres_fdw/expected/postgres_fdw.out | 8 | ||||
-rw-r--r-- | contrib/postgres_fdw/sql/postgres_fdw.sql | 8 |
3 files changed, 12 insertions, 7 deletions
diff --git a/contrib/postgres_fdw/Makefile b/contrib/postgres_fdw/Makefile index 7c660955caf..a9e380d6be4 100644 --- a/contrib/postgres_fdw/Makefile +++ b/contrib/postgres_fdw/Makefile @@ -13,9 +13,6 @@ DATA = postgres_fdw--1.0.sql REGRESS = postgres_fdw -# the db name is hard-coded in the tests -override USE_MODULE_DB = - ifdef USE_PGXS PG_CONFIG = pg_config PGXS := $(shell $(PG_CONFIG) --pgxs) diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out index 7eead58cffb..5fe752a1bbe 100644 --- a/contrib/postgres_fdw/expected/postgres_fdw.out +++ b/contrib/postgres_fdw/expected/postgres_fdw.out @@ -3,8 +3,12 @@ -- =================================================================== CREATE EXTENSION postgres_fdw; CREATE SERVER testserver1 FOREIGN DATA WRAPPER postgres_fdw; -CREATE SERVER loopback FOREIGN DATA WRAPPER postgres_fdw - OPTIONS (dbname 'contrib_regression'); +DO $d$ + BEGIN + EXECUTE $$CREATE SERVER loopback FOREIGN DATA WRAPPER postgres_fdw + OPTIONS (dbname '$$||current_database()||$$');$$; + END; +$d$; CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); CREATE USER MAPPING FOR CURRENT_USER SERVER loopback; diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 9f54359be58..ba5ef91f6a0 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -5,8 +5,12 @@ CREATE EXTENSION postgres_fdw; CREATE SERVER testserver1 FOREIGN DATA WRAPPER postgres_fdw; -CREATE SERVER loopback FOREIGN DATA WRAPPER postgres_fdw - OPTIONS (dbname 'contrib_regression'); +DO $d$ + BEGIN + EXECUTE $$CREATE SERVER loopback FOREIGN DATA WRAPPER postgres_fdw + OPTIONS (dbname '$$||current_database()||$$');$$; + END; +$d$; CREATE USER MAPPING FOR public SERVER testserver1 OPTIONS (user 'value', password 'value'); |