diff options
author | Tom Lane | 2019-12-20 20:34:07 +0000 |
---|---|---|
committer | Tom Lane | 2019-12-20 20:34:07 +0000 |
commit | e60b480d39ee3401727a994988dd9117a3b48466 (patch) | |
tree | b415b20282cdd0a15ba0334d51ab31dc180fb25d /contrib/postgres_fdw | |
parent | 77f416af6e821b40649c971ded43089e0450791a (diff) |
libpq should expose GSS-related parameters even when not implemented.
We realized years ago that it's better for libpq to accept all
connection parameters syntactically, even if some are ignored or
restricted due to lack of the feature in a particular build.
However, that lesson from the SSL support was for some reason never
applied to the GSSAPI support. This is causing various buildfarm
members to have problems with a test case added by commit 6136e94dc,
and it's just a bad idea from a user-experience standpoint anyway,
so fix it.
While at it, fix some places where parameter-related infrastructure
was added with the aid of a dartboard, or perhaps with the aid of
the anti-pattern "add new stuff at the end". It should be safe
to rearrange the contents of struct pg_conn even in released
branches, since that's private to libpq (and we'd have to move
some fields in some builds to fix this, anyway).
Back-patch to all supported branches.
Discussion: https://postgr.es/m/11297.1576868677@sss.pgh.pa.us
Diffstat (limited to 'contrib/postgres_fdw')
-rw-r--r-- | contrib/postgres_fdw/expected/postgres_fdw.out | 12 | ||||
-rw-r--r-- | contrib/postgres_fdw/sql/postgres_fdw.sql | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out index 3d6e4eeea0c..ea67ae31d08 100644 --- a/contrib/postgres_fdw/expected/postgres_fdw.out +++ b/contrib/postgres_fdw/expected/postgres_fdw.out @@ -132,8 +132,8 @@ CREATE FOREIGN TABLE ft6 ( -- =================================================================== -- tests for validator -- =================================================================== --- requiressl, krbsrvname and gsslib are omitted because they depend on --- configure options +-- requiressl and some other parameters are omitted because +-- valid values for them depend on configure options ALTER SERVER testserver1 OPTIONS ( use_remote_estimate 'false', updatable 'true', @@ -158,10 +158,10 @@ ALTER SERVER testserver1 OPTIONS ( sslcert 'value', sslkey 'value', sslrootcert 'value', - sslcrl 'value' + sslcrl 'value', --requirepeer 'value', - -- krbsrvname 'value', - -- gsslib 'value', + krbsrvname 'value', + gsslib 'value' --replication 'value' ); -- Error, invalid list syntax @@ -8855,7 +8855,7 @@ DO $d$ END; $d$; ERROR: invalid option "password" -HINT: Valid options in this context are: service, passfile, channel_binding, connect_timeout, dbname, host, hostaddr, port, options, application_name, keepalives, keepalives_idle, keepalives_interval, keepalives_count, tcp_user_timeout, sslmode, sslcompression, sslcert, sslkey, sslrootcert, sslcrl, requirepeer, gssencmode, krbsrvname, target_session_attrs, use_remote_estimate, fdw_startup_cost, fdw_tuple_cost, extensions, updatable, fetch_size +HINT: Valid options in this context are: service, passfile, channel_binding, connect_timeout, dbname, host, hostaddr, port, options, application_name, keepalives, keepalives_idle, keepalives_interval, keepalives_count, tcp_user_timeout, sslmode, sslcompression, sslcert, sslkey, sslrootcert, sslcrl, requirepeer, gssencmode, krbsrvname, gsslib, target_session_attrs, use_remote_estimate, fdw_startup_cost, fdw_tuple_cost, extensions, updatable, fetch_size CONTEXT: SQL statement "ALTER SERVER loopback_nopw OPTIONS (ADD password 'dummypw')" PL/pgSQL function inline_code_block line 3 at EXECUTE -- If we add a password for our user mapping instead, we should get a different diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 33307d67daf..c525897a78a 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -145,8 +145,8 @@ CREATE FOREIGN TABLE ft6 ( -- =================================================================== -- tests for validator -- =================================================================== --- requiressl, krbsrvname and gsslib are omitted because they depend on --- configure options +-- requiressl and some other parameters are omitted because +-- valid values for them depend on configure options ALTER SERVER testserver1 OPTIONS ( use_remote_estimate 'false', updatable 'true', @@ -171,10 +171,10 @@ ALTER SERVER testserver1 OPTIONS ( sslcert 'value', sslkey 'value', sslrootcert 'value', - sslcrl 'value' + sslcrl 'value', --requirepeer 'value', - -- krbsrvname 'value', - -- gsslib 'value', + krbsrvname 'value', + gsslib 'value' --replication 'value' ); |