Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oUH6L-0000FP-Mm for pgsql-general@arkaria.postgresql.org; Sat, 03 Sep 2022 00:33:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oUH6K-00061f-Iw for pgsql-general@arkaria.postgresql.org; Sat, 03 Sep 2022 00:33:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oUH6K-00061U-6X for pgsql-general@lists.postgresql.org; Sat, 03 Sep 2022 00:33:32 +0000 Received: from mail-oa1-x2e.google.com ([2001:4860:4864:20::2e]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oUH6H-0000EP-UB for pgsql-general@lists.postgresql.org; Sat, 03 Sep 2022 00:33:31 +0000 Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-11f4e634072so8640940fac.13 for ; Fri, 02 Sep 2022 17:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=TjcImfSO+Zx7e7NSfq0BNL/BKKcQuInVJbbvR502heA=; b=jOdBiYxrFsQxipGVRu2gCJKucYFT8Ugpcvz94S0ZkZhpn/YNPEN7+LyjYYSS4/5kmB PdUff4agF4qltK3wqJl3x6TDXKRRy9z9+O+VVq3Iy5UOae6N5tJBrDeyCWo4TG6Rk4oa JaakeV581kRHO0rNEc1hf01sR6S/p8Kkz80gotsEeANYTc/TDckjIbO3vzExnt2B1vnK oZ3CvXs9TOiSxQzNXDp9xf6vPY7l73mR02YnwZa89BkzZJRsSXFMNdPgFv6doPvrUtrL lBYQDkLrBB1onT+sPG9fOHumkqN3IkX+tBJTs37zmRggxgjwWY+h8JNyiMZcDifIMcmn qwqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=TjcImfSO+Zx7e7NSfq0BNL/BKKcQuInVJbbvR502heA=; b=hS3YxgrYXkDpWhKA5g5+BSIYv4MuNJhoVUZ6yMERwVSl5toHxzSkzONq7cJLZDSzMU h6AXmrU+wZqqcppXZpmLUmgHzzIzzp7CfMGE8XTO3lsaEAWxj06mxe6GX1+AK+5yebg2 C8QIHxxamQ5sXbqTa+uPfso5L8HMyl2OcyQG3RLg+3wLYcRMpf59ZJe0nd83s5BwOV7w D1J0jez6w/W6lJ9wuEVmdRtFclaNyCG0W0yexY7XUOj2kK+cwtO6THDPbJ5l+q1W3w5I l/rTcM6hi2HRNh+dBeh77BIVPBnXPmUF+IFGyq6QMbky6dfLYHJwaJwN2WwwtmijvlKr AT6A== X-Gm-Message-State: ACgBeo0sFwt1qCByYFdxGPa7BVCTpzC6JTU+yMyytZHnjkfWqw90GdMn 6ki79xPyZvJKxmcKZjc0CieGa6f2cRo= X-Google-Smtp-Source: AA6agR4WRdZYcIrU9DoM0O98bVvHOCsQ07k+4GdWb1BAIhuSxPlg4kiUkIkyartXrg+LJwxBgkqXvw== X-Received: by 2002:aca:3081:0:b0:343:3bf6:ff70 with SMTP id w123-20020aca3081000000b003433bf6ff70mr3038004oiw.54.1662165207589; Fri, 02 Sep 2022 17:33:27 -0700 (PDT) Received: from [192.168.88.10] (ip68-11-68-85.no.no.cox.net. [68.11.68.85]) by smtp.googlemail.com with ESMTPSA id g4-20020a544f84000000b0034378294973sm1652294oiy.30.2022.09.02.17.33.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Sep 2022 17:33:27 -0700 (PDT) Message-ID: <3698b162-8146-cc59-0da4-390d2c6f8189@gmail.com> Date: Fri, 2 Sep 2022 19:33:26 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: Determine if a user and database are available Content-Language: en-US To: pgsql-general@lists.postgresql.org References: <1229132.1662157263@sss.pgh.pa.us> From: Ron In-Reply-To: <1229132.1662157263@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 9/2/22 17:21, Tom Lane wrote: > Jeffrey Walton writes: >> I have another beginner question. I am trying to use pg_isready to >> determine if a database and user are present. The program seems to >> always succeed, even when I delete the user or the database. > That's a feature actually. The intended use of pg_isready is to > find out if the server is alive, not whether any particular user > or database name is correct. Then what's the point of the --username=USERNAME connection option? -- Angular momentum makes the world go 'round.