Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cMKFe-0001QV-V6 for pgsql-jdbc@arkaria.postgresql.org; Wed, 28 Dec 2016 19:51:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cMKFe-0007R6-DQ for pgsql-jdbc@arkaria.postgresql.org; Wed, 28 Dec 2016 19:51:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cMKFd-0007Qy-TN for pgsql-jdbc@postgresql.org; Wed, 28 Dec 2016 19:51:06 +0000 Received: from hogranch.com ([75.101.82.47]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cMKFa-00021t-QO for pgsql-jdbc@postgresql.org; Wed, 28 Dec 2016 19:51:04 +0000 Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id uBSJosv26708 for ; Wed, 28 Dec 2016 11:50:54 -0800 Subject: Re: Questions on use To: pgsql-jdbc@postgresql.org References: <51538255-cd71-41f3-3b98-c16d252c2f3f@hogranch.com> From: John R Pierce Message-ID: <9b5bf55a-85be-e6b0-71d1-6579ea76891e@hogranch.com> Date: Wed, 28 Dec 2016 11:50:49 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -5.0 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On 12/28/2016 10:41 AM, Rich Shepard wrote: > There's no problem from the command line, > > $ psql -h localhost emapw > psql (9.6.1) > Type "help" for help. > > emapw=# > > even without specifying the host. with psql, no -h and -h localhost are two different connection types. if you don't specify a -h, it uses a 'unix domain socket', this uses the pg_hba.conf lines that start with `local`... if you DO specify -h localhost, it uses a tcp/ip socket to localhost (typically 127.0.0.1 or ::1), these match the pg_hba.conf lines that start with `host` and encompass one or the other of those networks. note that even if your system isn't using ipv6 for its network connections, it very well could be using the ipv6 localhost ::1 (shorthand for 0000:0000:0000:0000:0000:0000:0000:0001)... -- john r pierce, recycling bits in santa cruz -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc