dblink: Reject use_scram_passthrough on foreign-data wrappers

Fujii Masao <fujii@postgresql.org>

Commit: e2b8813403b19609a3f194b1d4cdb88df5aa4c7d
Author: Fujii Masao <fujii@postgresql.org>
Date: 2026-05-25T16:07:24Z
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 <matheusssilv97@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwEJ8rZjmbOvCicyr4vbuLio082bNTde0WNoSWaWr9wVcg@mail.gmail.com
Backpatch-through: 18

Files

PathChange+/−
contrib/dblink/dblink.c modified +9 −2
contrib/dblink/expected/dblink.out modified +5 −0
contrib/dblink/sql/dblink.sql modified +4 −0

Discussion