dblink: Reject use_scram_passthrough on foreign-data wrappers

Previously, dblink accepted the use_scram_passthrough option on
foreign-data wrappers via ALTER FOREIGN DATA WRAPPER dblink_fdw
OPTIONS, even though the setting had no effect there.

use_scram_passthrough should be only meaningful for foreign servers
and user mappings, so this commit updates dblink to accept the option
only in those contexts.

Backpatch to v18, where use_scram_passthrough was introduced.

Author: Matheus Alcantara <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Discussion: 
https://postgr.es/m/cahgqgwej8rzjmbovcicyr4vbulio082bntde0wnoswawr9w...@mail.gmail.com
Backpatch-through: 18

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/cd777e27e2038f2c39f0f2d5d68d45c67bdf89e8

Modified Files
--------------
contrib/dblink/dblink.c            | 11 +++++++++--
contrib/dblink/expected/dblink.out |  5 +++++
contrib/dblink/sql/dblink.sql      |  4 ++++
3 files changed, 18 insertions(+), 2 deletions(-)

Reply via email to