Re: LibPQ doesn't say host=* translates to localhost - Mailing list pgsql-bugs

From Tom Lane
Subject Re: LibPQ doesn't say host=* translates to localhost
Date
Msg-id 1860173.1719520971@sss.pgh.pa.us
Whole thread Raw
In response to LibPQ doesn't say host=* translates to localhost  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
"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



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: LibPQ doesn't say host=* translates to localhost
Next
From: Laurenz Albe
Date:
Subject: Re: BUG #18500: Detaching a partition with an index manually attached to the parent's index triggers Assert