X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 4D0C0528AD for ; Thu, 16 Jun 2005 01:08:46 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 23995-07 for ; Thu, 16 Jun 2005 04:08:39 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id A4D475282F for ; Thu, 16 Jun 2005 01:08:38 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j5G48ZON010057; Thu, 16 Jun 2005 00:08:35 -0400 (EDT) To: David Cc: pgsql-admin@postgresql.org Subject: Re: Connecting via localhost pg-8.0.3 In-reply-to: <20050616020048.GA1912@localhost.localdomain> References: <20050615022603.GA1615@localhost.localdomain> <27553.1118805754@sss.pgh.pa.us> <20050616020048.GA1912@localhost.localdomain> Comments: In-reply-to David message dated "Wed, 15 Jun 2005 21:00:48 -0500" Date: Thu, 16 Jun 2005 00:08:35 -0400 Message-ID: <10056.1118894915@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200506/106 X-Sequence-Number: 17861 David writes: > Well, you guessed correctly. It was a configuration problem. By > inserting the line: > unix_socket_directory = '/var/run/postgresql' > into postgresql.conf, it works as expected. Well, you've still got an issue here somewhere, because if your server and client libraries came from the same build then they ought to agree on this without any help from the config file. AFAIK, Debian hasn't changed their policy about where to put the socket, so it seems like you must be using a server that didn't come from Debian. > I must confess that I was a bit unclear about the connection parameters. > I thought that (in php) "host=localhost" meant to use sockets, but this > means connect through TCP/IP over lo, correct? Correct --- "localhost" is an IP-ism referring to TCP loopback connections. In the Unix-socket world there is no name for the local machine at all, since that is the whole universe anyway ... all you need for that is a filesystem pathname. regards, tom lane