From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: PostgreSQL Bug List <pgsql-bugs@lists.postgresql.org>
Subject: Re: LibPQ doesn't say host=* translates to localhost
Date: Thu, 27 Jun 2024 16:42:51 -0400
Message-ID: <1860173.1719520971@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwbCeu4X7vwV7SZ8cGUycmKRxGE8YGmPGJof8tP8jgKWfw@mail.gmail.com>
References: <CAKFQuwbCeu4X7vwV7SZ8cGUycmKRxGE8YGmPGJof8tP8jgKWfw@mail.gmail.com>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> The documentation [0] doesn't say this should work and general networking
> knowledge leads me to believe it wouldn't [1].
> PGHOST='*' psql postgres
> psql (17beta1)
Seems to be an undocumented glibc-ism. That works for me on RHEL8,
but not on macOS:
$ psql -h '*'
psql: error: could not translate host name "*" to address: nodename nor servname provided, or not known
The POSIX spec for getaddrinfo(3) doesn't suggest it should
work, either.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: LibPQ doesn't say host=* translates to localhost
In-Reply-To: <1860173.1719520971@sss.pgh.pa.us>
* 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