Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBSOX-00074v-Es for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Apr 2018 21:56:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fBSOV-0002Er-Ct for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Apr 2018 21:56:07 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBSOV-0002Eg-3K for pgsql-bugs@lists.postgresql.org; Wed, 25 Apr 2018 21:56:07 +0000 Received: from sender-pp-092.zoho.com ([135.84.80.237]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fBSOS-0006tK-7F for pgsql-bugs@lists.postgresql.org; Wed, 25 Apr 2018 21:56:05 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=date:from:to:cc:message-id:in-reply-to:references:subject:mime-version:content-type:user-agent; b=OXSMN1PWm+VcGV3Gr7LSriIsCYK4/lZATzPfomBphwvnsfUle9IJ1Pzcv/2nULfnk9GSOD7X0Xcc B5j1F6NfqVenhisKZrWTof5yc1RHcnm8CSnf6ekI8cuuj5TyGdzF Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1524693360453402.65802594764614; Wed, 25 Apr 2018 14:56:00 -0700 (PDT) Received: from [50.38.82.1] by mail.zoho.com with HTTP;Wed, 25 Apr 2018 14:56:00 -0700 (PDT) Date: Wed, 25 Apr 2018 14:56:00 -0700 From: jake To: "David G. Johnston" Cc: "pgsql-bugs@lists.postgresql.org" Message-Id: <162fece5f43.c55f9f2c21063.5048374418404228247@zoho.com> In-Reply-To: References: <152454331410.19803.86605614092680300@wrigleys.postgresql.org> <162f93f6c75.cdd696776295.5991878161692757736@zoho.com> <162fa45b1f0.e784e91e8344.4158165001514423492@zoho.com> <162facd1147.ba69cee29221.2693379920764956968@zoho.com> <162fb1131d6.12ac3be2b9673.5239359614834465495@zoho.com> Subject: Re: BUG #15168: "pg_isready -d" effectively ignores given database name MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_52231_2023907878.1524693360451" X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_52231_2023907878.1524693360451 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Thank you again. You're right that checking for database x's existence, while logged into database x, is pointless. I didn't mention that for that command I'd be using the default postgres database. But again, you're right about what's simple/better and what's not. In fact, just today, I discovered that there may be an even simpler solution for our scenario: have Yesod deal with postgres altogether -- no script from us. But that's outside the scope of this thread. Back to scope: I simply vote that the '-d' option of pg_isready be deprecated in favor of a dedicated db_exists utility, rather than change existing spec, for the reasons you gave. Jake T. ------=_Part_52231_2023907878.1524693360451 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable =
Thank you again. You're right that checking for database= x's existence, while logged into database x, is pointless. I didn't mentio= n that for that command I'd be using the default postgres database.
But again, you're right about what's simple/better and what's not.

In fact, just today, I discovered that there ma= y be an even simpler solution for our scenario: have Yesod deal with postgr= es altogether -- no script from us. But that's outside the scope of this th= read.

Back to scope: I simply vote that the '-= d' option of pg_isready be deprecated in favor of a dedicated db_exists uti= lity, rather than change existing spec, for the reasons you gave.
=

Jake T.


------=_Part_52231_2023907878.1524693360451--