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: Allow postgres_fdw.application_name to include esc
Date: Fri, 24 Dec 2021 07:58:21 +0000
Message-ID: <E1n0fT3-0004bA-8e@gemulon.postgresql.org> (raw)

postgres_fdw: Allow postgres_fdw.application_name to include escape sequences.

application_name that used when postgres_fdw establishes a connection to
a foreign server can be specified in either or both a connection parameter
of a server object and GUC postgres_fdw.application_name. This commit
allows those parameters to include escape sequences that begins with
% character. Then postgres_fdw replaces those escape sequences with
status information. For example, %d and %u are replaced with user name
and database name in local server, respectively. This feature enables us
to add information more easily to track remote transactions or queries,
into application_name of a remote connection.

Author: Hayato Kuroda
Reviewed-by: Kyotaro Horiguchi, Masahiro Ikeda, Hou Zhijie, Fujii Masao
Discussion: https://postgr.es/m/TYAPR01MB5866FAE71C66547C64616584F5EB9@TYAPR01MB5866.jpnprd01.prod.outlook.com
Discussion: https://postgr.es/m/TYCPR01MB5870D1E8B949DAF6D3B84E02F5F29@TYCPR01MB5870.jpnprd01.prod.outlook.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/6e0cb3dec10e460288d68a128e3d79d16a230cdb

Modified Files
--------------
contrib/postgres_fdw/connection.c              | 36 ++++++++++++++
contrib/postgres_fdw/expected/postgres_fdw.out | 32 ++++++++++++
contrib/postgres_fdw/option.c                  | 62 ++++++++++++++++++++++++
contrib/postgres_fdw/postgres_fdw.h            |  1 +
contrib/postgres_fdw/sql/postgres_fdw.sql      | 21 ++++++++
doc/src/sgml/postgres-fdw.sgml                 | 67 +++++++++++++++++++++++++-
6 files changed, 218 insertions(+), 1 deletion(-)



view thread (7+ messages)  latest in thread

Message-ID: <E1n0fT3-0004bA-8e@gemulon.postgresql.org>
Permalink:  ../E1n0fT3-0004bA-8e@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1n0fT3-0004bA-8e@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: fujii@postgresql.org
  Subject: Re: pgsql: postgres_fdw: Allow postgres_fdw.application_name to include esc
  In-Reply-To: <E1n0fT3-0004bA-8e@gemulon.postgresql.org>
  References: <E1n0fT3-0004bA-8e@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