CREATE SUBSCRIPTION: do not construct conninfo unnecessarily.

Still check that the creating user has USAGE privileges on the server,
and that the FDW supports subscription connections.

Addresses finding 1 in the report from the linked discussion.

Reported-by: Noah Misch <[email protected]>
Reviewed-by: Amit Kapila <[email protected]>
Discussion: https://postgr.es/m/20260710195902.4f.noahmisch%40microsoft.com
Discussion: 
https://postgr.es/m/[email protected]
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1718a16433a3f6572e0ff9c64ef394ae8fec3765

Modified Files
--------------
src/backend/commands/subscriptioncmds.c    | 37 ++++++++++++++++++++++--------
src/backend/foreign/foreign.c              |  4 ++--
src/test/regress/expected/subscription.out |  4 ++--
3 files changed, 31 insertions(+), 14 deletions(-)

Reply via email to