From: John R Pierce <pierce@hogranch.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Questions on use
Date: Wed, 28 Dec 2016 11:50:49 -0800
Message-ID: <9b5bf55a-85be-e6b0-71d1-6579ea76891e@hogranch.com> (raw)
In-Reply-To: <alpine.LNX.2.11.1612281038430.2025@localhost>
References: <alpine.LNX.2.11.1612280729040.30065@localhost>
<CAKFQuwauXz=yMLifau5xkxncy9Zy77nq6d_-xB_7B8PH=67Wdw@mail.gmail.com>
<alpine.LNX.2.11.1612280841430.30065@localhost>
<51538255-cd71-41f3-3b98-c16d252c2f3f@hogranch.com>
<alpine.LNX.2.11.1612281038430.2025@localhost>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: pierce@hogranch.com
Subject: Re: Questions on use
In-Reply-To: <9b5bf55a-85be-e6b0-71d1-6579ea76891e@hogranch.com>
References: <alpine.LNX.2.11.1612280729040.30065@localhost> <CAKFQuwauXz=yMLifau5xkxncy9Zy77nq6d_-xB_7B8PH=67Wdw@mail.gmail.com> <alpine.LNX.2.11.1612280841430.30065@localhost> <51538255-cd71-41f3-3b98-c16d252c2f3f@hogranch.com> <alpine.LNX.2.11.1612281038430.2025@localhost> <9b5bf55a-85be-e6b0-71d1-6579ea76891e@hogranch.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox