Re: Questions on use

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Questions on use
Date: 2016-12-28 19:50:49
Message-ID: 9b5bf55a-85be-e6b0-71d1-6579ea76891e@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Rich Shepard 2016-12-28 19:55:21 Re: Questions on use
Previous Message Rich Shepard 2016-12-28 18:41:16 Re: Questions on use