Re: LibPQ doesn't say host=* translates to localhost
Tom Lane <tgl@sss.pgh.pa.us>
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>
Date: 2024-06-27T20:42:51Z
Lists: 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