aboutsummaryrefslogtreecommitdiff
path: root/contrib/postgres_fdw/postgres_fdw.h
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2021-12-24 16:55:11 +0900
committerFujii Masao <fujii@postgresql.org>2021-12-24 16:55:11 +0900
commit6e0cb3dec10e460288d68a128e3d79d16a230cdb (patch)
tree5d106381fe2fa91fb9b0dbf3a81061c7d9356764 /contrib/postgres_fdw/postgres_fdw.h
parent94226d4506e66d6e7cbf4b391f1e7393c1962841 (diff)
downloadpostgresql-6e0cb3dec10e460288d68a128e3d79d16a230cdb.tar.gz
postgresql-6e0cb3dec10e460288d68a128e3d79d16a230cdb.zip
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
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.h')
-rw-r--r--contrib/postgres_fdw/postgres_fdw.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/postgres_fdw/postgres_fdw.h b/contrib/postgres_fdw/postgres_fdw.h
index 90b72e9ec55..fa2af8bb8ad 100644
--- a/contrib/postgres_fdw/postgres_fdw.h
+++ b/contrib/postgres_fdw/postgres_fdw.h
@@ -158,6 +158,7 @@ extern int ExtractConnectionOptions(List *defelems,
const char **values);
extern List *ExtractExtensionList(const char *extensionsString,
bool warnOnMissing);
+extern char *process_pgfdw_appname(const char *appname);
extern char *pgfdw_application_name;
/* in deparse.c */