From c9f0624bc2f544baacafa38e3797d5323401d039 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 25 Nov 2020 08:14:23 +0100 Subject: 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 Discussion: https://www.postgresql.org/message-id/flat/6dee8574-b0ad-fc49-9c8c-2edc796f0033@2ndquadrant.com --- src/interfaces/libpq/fe-connect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/interfaces/libpq/fe-connect.c') diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index e7781d010f0..7d04d3664e0 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -1093,7 +1093,7 @@ connectOptions2(PGconn *conn) { ch->type = CHT_HOST_NAME; #ifdef HAVE_UNIX_SOCKETS - if (is_absolute_path(ch->host)) + if (is_unixsock_path(ch->host)) ch->type = CHT_UNIX_SOCKET; #endif } @@ -6945,7 +6945,7 @@ passwordFromFile(const char *hostname, const char *port, const char *dbname, /* 'localhost' matches pghost of '' or the default socket directory */ if (hostname == NULL || hostname[0] == '\0') hostname = DefaultHost; - else if (is_absolute_path(hostname)) + else if (is_unixsock_path(hostname)) /* * We should probably use canonicalize_path(), but then we have to -- cgit v1.2.3