diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2020-11-25 08:14:23 +0100 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2020-11-25 08:33:57 +0100 |
commit | c9f0624bc2f544baacafa38e3797d5323401d039 (patch) | |
tree | 4425354e0eb7391059df513989a9aa62cd237b65 /src/bin/psql/prompt.c | |
parent | a7e65dc88b6f088fc2fcf5a660d866de644b1300 (diff) |
Add support for abstract Unix-domain sockets
This is a variant of the normal Unix-domain sockets that don't use the
file system but a separate "abstract" namespace. At the user
interface, such sockets are represented by names starting with "@".
Supported on Linux and Windows right now.
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/flat/6dee8574-b0ad-fc49-9c8c-2edc796f0033@2ndquadrant.com
Diffstat (limited to 'src/bin/psql/prompt.c')
-rw-r--r-- | src/bin/psql/prompt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/psql/prompt.c b/src/bin/psql/prompt.c index ef503ec41bb..f42c3dfc748 100644 --- a/src/bin/psql/prompt.c +++ b/src/bin/psql/prompt.c @@ -15,6 +15,7 @@ #include "common.h" #include "common/string.h" #include "input.h" +#include "libpq/pqcomm.h" #include "prompt.h" #include "settings.h" @@ -136,7 +137,7 @@ get_prompt(promptStatus_t status, ConditionalStack cstack) const char *host = PQhost(pset.db); /* INET socket */ - if (host && host[0] && !is_absolute_path(host)) + if (host && host[0] && !is_unixsock_path(host)) { strlcpy(buf, host, sizeof(buf)); if (*p == 'm') |