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/option.c | |
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/option.c')
-rw-r--r-- | contrib/postgres_fdw/option.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/postgres_fdw/option.c b/contrib/postgres_fdw/option.c index df6d89a658f..4a26056db08 100644 --- a/contrib/postgres_fdw/option.c +++ b/contrib/postgres_fdw/option.c @@ -194,6 +194,15 @@ InitPgFdwOptions(void) {"fetch_size", ForeignServerRelationId, false}, {"fetch_size", ForeignTableRelationId, false}, {"password_required", UserMappingRelationId, false}, + /* + * sslcert and sslkey are in fact libpq options, but we repeat them + * here to allow them to appear in both foreign server context + * (when we generate libpq options) and user mapping context + * (from here). + */ + {"sslcert", UserMappingRelationId, true}, + {"sslkey", UserMappingRelationId, true}, + {NULL, InvalidOid, false} }; |