diff options
author | Andres Freund <andres@anarazel.de> | 2014-08-26 12:21:06 +0200 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2014-08-26 12:28:08 +0200 |
commit | 57ca1d4f0175f60e9cfb0f997c864173d9c72607 (patch) | |
tree | 60ec14fef0d4ffa3c8be801adafa5c378014895b /contrib/postgres_fdw/sql/postgres_fdw.sql | |
parent | ddc2504dbcf2af97b58a91b071768c17774d58d1 (diff) | |
download | postgresql-57ca1d4f0175f60e9cfb0f997c864173d9c72607.tar.gz postgresql-57ca1d4f0175f60e9cfb0f997c864173d9c72607.zip |
Specify the port in dblink and postgres_fdw tests.
That allows to run those tests against a postmaster listening on a
nonstandard port without requiring to export PGPORT in postmaster's
environment.
This still doesn't support connecting to a nondefault host without
configuring it in postmaster's environment. That's harder and less
frequently used though. So this is a useful step.
Diffstat (limited to 'contrib/postgres_fdw/sql/postgres_fdw.sql')
-rw-r--r-- | contrib/postgres_fdw/sql/postgres_fdw.sql | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index ba5ef91f6a0..ae9668463c4 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -8,7 +8,9 @@ CREATE SERVER testserver1 FOREIGN DATA WRAPPER postgres_fdw; DO $d$ BEGIN EXECUTE $$CREATE SERVER loopback FOREIGN DATA WRAPPER postgres_fdw - OPTIONS (dbname '$$||current_database()||$$');$$; + OPTIONS (dbname '$$||current_database()||$$', + port '$$||current_setting('port')||$$' + )$$; END; $d$; |