From f5fd995a1a24e6571d26b1e29c4dc179112b1003 Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Thu, 9 Jan 2020 18:39:54 +1030 Subject: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings This allows different users to authenticate with different certificates. Author: Craig Ringer --- contrib/postgres_fdw/option.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'contrib/postgres_fdw/option.c') 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} }; -- cgit v1.2.3