From f5580882856963d1b50f9e391a8dda82d44b69a6 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Sun, 14 Aug 2022 08:46:53 +1200 Subject: Remove HAVE_UNIX_SOCKETS. Since HAVE_UNIX_SOCKETS is now defined unconditionally, remove the macro and drop a small amount of dead code. The last known systems not to have them (as far as I know at least) were QNX, which we de-supported years ago, and Windows, which now has them. If a new OS ever shows up with the POSIX sockets API but without working AF_UNIX, it'll presumably still be able to compile the code, and fail at runtime with an unsupported address family error. We might want to consider adding a HINT that you should turn off the option to use it if your network stack doesn't support it at that point, but it doesn't seem worth making the relevant code conditional at compile time. Also adjust a couple of places in the docs and comments that referred to builds without Unix-domain sockets, since there aren't any. Windows still gets a special mention in those places, though, because we don't try to use them by default there yet. Reviewed-by: Tom Lane Reviewed-by: Andres Freund Reviewed-by: Peter Eisentraut Discussion: https://postgr.es/m/CA%2BhUKG%2BL_3brvh%3D8e0BW_VfX9h7MtwgN%3DnFHP5o7X2oZucY9dg%40mail.gmail.com --- doc/src/sgml/libpq.sgml | 9 ++++----- doc/src/sgml/ref/psql-ref.sgml | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index fab602b37e7..840ca71f39d 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1070,9 +1070,8 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname specified, or is empty, is to connect to a Unix-domain socketUnix domain socket in /tmp (or whatever socket directory was specified - when PostgreSQL was built). On Windows and - on machines without Unix-domain sockets, the default is to connect to - localhost. + when PostgreSQL was built). On Windows, + the default is to connect to localhost. A comma-separated list of host names is also accepted, in which case @@ -1152,8 +1151,8 @@ postgresql://%2Fvar%2Flib%2Fpostgresql/dbname Without either a host name or host address, libpq will connect using a local - Unix-domain socket; or on Windows and on machines without Unix-domain - sockets, it will attempt to connect to localhost. + Unix-domain socket; or on Windows, it will attempt to connect to + localhost. diff --git a/doc/src/sgml/ref/psql-ref.sgml b/doc/src/sgml/ref/psql-ref.sgml index 7ba6e4efcb9..dd559d62d28 100644 --- a/doc/src/sgml/ref/psql-ref.sgml +++ b/doc/src/sgml/ref/psql-ref.sgml @@ -656,7 +656,7 @@ EOF of these options are required; there are useful defaults. If you omit the host name, psql will connect via a Unix-domain socket to a server on the local host, or via TCP/IP to localhost on - machines that don't have Unix-domain sockets. The default port number is + Windows. The default port number is determined at compile time. Since the database server uses the same default, you will not have to specify the port in most cases. The default user name is your -- cgit v1.2.3