diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2020-01-09 18:39:54 +1030 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2020-01-09 18:39:54 +1030 |
commit | f5fd995a1a24e6571d26b1e29c4dc179112b1003 (patch) | |
tree | 4f63d161b18605c3c6403c2ed4707f521936af31 /contrib/postgres_fdw/sql | |
parent | 45223fd9cefe483daa4af7740f15c004486636eb (diff) | |
download | postgresql-f5fd995a1a24e6571d26b1e29c4dc179112b1003.tar.gz postgresql-f5fd995a1a24e6571d26b1e29c4dc179112b1003.zip |
Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
This allows different users to authenticate with different certificates.
Author: Craig Ringer
Diffstat (limited to 'contrib/postgres_fdw/sql')
-rw-r--r-- | contrib/postgres_fdw/sql/postgres_fdw.sql | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 4f29e7cb44f..f2a4089e9d3 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -188,6 +188,19 @@ ALTER SERVER testserver1 OPTIONS (DROP extensions); ALTER USER MAPPING FOR public SERVER testserver1 OPTIONS (DROP user, DROP password); +-- Attempt to add a valid option that's not allowed in a user mapping +ALTER USER MAPPING FOR public SERVER testserver1 + OPTIONS (ADD sslmode 'require'); + +-- But we can add valid ones fine +ALTER USER MAPPING FOR public SERVER testserver1 + OPTIONS (ADD sslpassword 'dummy'); + +-- Ensure valid options we haven't used in a user mapping yet are +-- permitted to check validation. +ALTER USER MAPPING FOR public SERVER testserver1 + OPTIONS (ADD sslkey 'value', ADD sslcert 'value'); + ALTER FOREIGN TABLE ft1 OPTIONS (schema_name 'S 1', table_name 'T 1'); ALTER FOREIGN TABLE ft2 OPTIONS (schema_name 'S 1', table_name 'T 1'); ALTER FOREIGN TABLE ft1 ALTER COLUMN c1 OPTIONS (column_name 'C 1'); |