]> granicus.if.org Git - postgresql/commitdiff
Revert to our pre-7.4 behavior of identifying Unix-socket connections in
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Sep 2003 20:18:51 +0000 (20:18 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 12 Sep 2003 20:18:51 +0000 (20:18 +0000)
ps status as '[local]', not as 'localhost' as the code has been doing
recently.  That's too easily confused with TCP loopback connections,
and there is no good reason to change the behavior anyway.

src/backend/libpq/ip.c

index ddb81a0dffff0c77bced6b453812657aa4896615..aaf6ddbe750cb9734bf76776e0c1b2555260f0cb 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/libpq/ip.c,v 1.22 2003/09/08 00:56:13 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/libpq/ip.c,v 1.23 2003/09/12 20:18:51 tgl Exp $
  *
  * This file and the IPV6 implementation were initially provided by
  * Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design
@@ -252,7 +252,7 @@ getnameinfo_unix(const struct sockaddr_un * sa, int salen,
 
        if (node)
        {
-               ret = snprintf(node, nodelen, "%s", "localhost");
+               ret = snprintf(node, nodelen, "%s", "[local]");
                if (ret == -1 || ret > nodelen)
                        return EAI_MEMORY;
        }