pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fujii Masao <fujii@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: postgres_fdw: Extend postgres_fdw_get_connections to return user
Date: Wed, 18 Sep 2024 03:52:43 +0000
Message-ID: <E1sqlkB-001azR-Ec@gemulon.postgresql.org> (raw)

postgres_fdw: Extend postgres_fdw_get_connections to return user name.

This commit adds a "user_name" output column to
the postgres_fdw_get_connections function, returning the name
of the local user mapped to the foreign server for each connection.
If a public mapping is used, it returns "public."

This helps identify postgres_fdw connections more easily,
such as determining which connections are invalid, closed,
or used within the current transaction.

No extension version bump is needed, as commit c297a47c5f
already handled it for v18~.

Author: Hayato Kuroda
Reviewed-by: Fujii Masao
Discussion: https://postgr.es/m/b492a935-6c7e-8c08-e485-3c1d64d7d10f@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4f08ab55457751308ffd8d33e82155758cd0e304

Modified Files
--------------
contrib/postgres_fdw/connection.c               | 57 ++++++++++++++++++++-----
contrib/postgres_fdw/expected/postgres_fdw.out  | 16 ++++---
contrib/postgres_fdw/postgres_fdw--1.1--1.2.sql |  3 +-
contrib/postgres_fdw/sql/postgres_fdw.sql       |  8 ++--
doc/src/sgml/postgres-fdw.sgml                  | 23 +++++++---
5 files changed, 81 insertions(+), 26 deletions(-)



view thread (2+ messages)  latest in thread

Message-ID: <E1sqlkB-001azR-Ec@gemulon.postgresql.org>
Permalink:  ../E1sqlkB-001azR-Ec@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sqlkB-001azR-Ec@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: postgres_fdw: Extend postgres_fdw_get_connections to return user
  In-Reply-To: <E1sqlkB-001azR-Ec@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox