Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sMvxM-005iF1-8C for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Jun 2024 20:43:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sMvxI-00DD4x-CS for pgsql-bugs@arkaria.postgresql.org; Thu, 27 Jun 2024 20:42:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sMvxI-00DD4l-4D for pgsql-bugs@lists.postgresql.org; Thu, 27 Jun 2024 20:42:56 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sMvxF-003sSp-Uo for pgsql-bugs@lists.postgresql.org; Thu, 27 Jun 2024 20:42:55 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 45RKgpaf1860174; Thu, 27 Jun 2024 16:42:51 -0400 From: Tom Lane To: "David G. Johnston" cc: PostgreSQL Bug List Subject: Re: LibPQ doesn't say host=* translates to localhost In-reply-to: References: Comments: In-reply-to "David G. Johnston" message dated "Thu, 27 Jun 2024 12:56:40 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1860172.1719520971.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 27 Jun 2024 16:42:51 -0400 Message-ID: <1860173.1719520971@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "David G. Johnston" writes: > The documentation [0] doesn't say this should work and general networkin= g > knowledge leads me to believe it wouldn't [1]. > PGHOST=3D'*' 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 se= rvname provided, or not known The POSIX spec for getaddrinfo(3) doesn't suggest it should work, either. regards, tom lane