dblink: Give user mapping precedence for use_scram_passthrough

Fujii Masao <fujii@postgresql.org>

Commit: 5f5165e2fe193cc2c9e9078992cdb277013e8dec
Author: Fujii Masao <fujii@postgresql.org>
Date: 2026-05-25T15:51:18Z
dblink: Give user mapping precedence for use_scram_passthrough

Commit 97f6fc10fff changed postgres_fdw so that user-mapping settings
override foreign server settings for use_scram_passthrough. This commit
applies the same behavior to dblink.

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 +8 −2
contrib/dblink/t/001_auth_scram.pl modified +24 −0
doc/src/sgml/dblink.sgml modified +6 −4

Discussion