aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2020-11-07 10:30:22 +0900
committerMichael Paquier <michael@paquier.xyz>2020-11-07 10:30:22 +0900
commita05dbf477b0ef173adb1ae5d004cbeb0cf400b66 (patch)
tree6b5be2fa50d4455f68966949c16e446d7ef1e1ab /src
parentceaeac54f75f0117a7b3caa2f8ecba5cfac18ee5 (diff)
downloadpostgresql-a05dbf477b0ef173adb1ae5d004cbeb0cf400b66.tar.gz
postgresql-a05dbf477b0ef173adb1ae5d004cbeb0cf400b66.zip
Add GUC_LIST_INPUT and GUC_LIST_QUOTE to unix_socket_directories
This should have been done in the initial commit that made unix_socket_directories a list as of c9b0cbe. This change allows to support correctly the case of ALTER SYSTEM, where it is possible to specify multiple paths as a list, like the following pattern where flattening is applied to each item: ALTER SYSTEM SET unix_socket_directories = '/path1', '/path2'; Any parameters specified in postgresql.conf are parsed the same way, so there is no compatibility change. pg_dump has a hardcoded list of parameters marked with GUC_LIST_QUOTE, that gets its routine update. These are reordered alphabetically for clarity. Author: Ian Lawrence Barwick Reviewed-by: Peter Eisentraunt, Tom Lane, Michael Paquier Discussion: https://postgr.es/m/CAB8KJ=iMOtNY6_sUwV=LQVCJ2zgYHBDyNzVfvE5GN3WQ3v9kQg@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/misc/guc.c2
-rw-r--r--src/bin/pg_dump/dumputils.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index a62d64eaa47..bb34630e8e4 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -4173,7 +4173,7 @@ static struct config_string ConfigureNamesString[] =
{"unix_socket_directories", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
gettext_noop("Sets the directories where Unix-domain sockets will be created."),
NULL,
- GUC_SUPERUSER_ONLY
+ GUC_LIST_INPUT | GUC_LIST_QUOTE | GUC_SUPERUSER_ONLY
},
&Unix_socket_directories,
#ifdef HAVE_UNIX_SOCKETS
diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c
index 2d6ea13c455..536c9ffec8c 100644
--- a/src/bin/pg_dump/dumputils.c
+++ b/src/bin/pg_dump/dumputils.c
@@ -865,11 +865,12 @@ buildACLQueries(PQExpBuffer acl_subquery, PQExpBuffer racl_subquery,
bool
variable_is_guc_list_quote(const char *name)
{
- if (pg_strcasecmp(name, "temp_tablespaces") == 0 ||
+ if (pg_strcasecmp(name, "local_preload_libraries") == 0 ||
+ pg_strcasecmp(name, "search_path") == 0 ||
pg_strcasecmp(name, "session_preload_libraries") == 0 ||
pg_strcasecmp(name, "shared_preload_libraries") == 0 ||
- pg_strcasecmp(name, "local_preload_libraries") == 0 ||
- pg_strcasecmp(name, "search_path") == 0)
+ pg_strcasecmp(name, "temp_tablespaces") == 0 ||
+ pg_strcasecmp(name, "unix_socket_directories") == 0)
return true;
else
return false;