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 1kahaa-0000jq-Rp for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Nov 2020 15:54:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kahaZ-000096-Nd for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Nov 2020 15:54:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kahaY-00008z-N6 for pgsql-hackers@lists.postgresql.org; Thu, 05 Nov 2020 15:54:14 +0000 Received: from [66.111.4.27] (helo=out3-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kahaV-0003fa-Di for pgsql-hackers@postgresql.org; Thu, 05 Nov 2020 15:54:13 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 9A0365C01DB; Thu, 5 Nov 2020 10:54:00 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 05 Nov 2020 10:54:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=zdQVQwQq7jardFJ23 dOtVobRAkyEr3tKF2GFxK6cyss=; b=gTelcRB2fhr3fLzXC4r6/kg+UCW645lKr vS2Ghp4oIkvE0lEyW7FXBaHc9vuH0Gk7cVGzhlGJ3nfAl3mX8klmGWRIqu046SOv xgxuDBANYRmdYuBbc6574T1fgTdHv03d5xyAG8w6O37oovt27FOkPrYnMAWBjzcY pGkeyyThmCJtbmX1TDejT/G+xFbUZA4AOv2yWaJDq9FlmLXfMfzT+3M4q7Bz1pPa juG0iokmpaCd3MgCrmLoIkGZBDpbvpBL+p1TQ5f0YWDiXdIyDU98mlWVIFzwFHJA qAUWk3VA8x2kjzUwsSWM/lmI4ekyAhpsGShzwUBtY3XsVOegIqysw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddtjedgkedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggujggfsehttdertddtredvnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpeevgfelveegueejgefhgeetgefhgeehieefheehleetteei udeiiefhgffgheffteenucfkphepudeltddrleehrdduledrudegkeenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghl vhhhrdhnohdqihhprdhorhhg X-ME-Proxy: Received: from perhan.alvh.no-ip.org (unknown [190.95.19.148]) by mail.messagingengine.com (Postfix) with ESMTPA id C7C1E306005F; Thu, 5 Nov 2020 10:53:59 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id BF8062A1005; Thu, 5 Nov 2020 12:53:56 -0300 (-03) Date: Thu, 5 Nov 2020 12:53:56 -0300 From: Alvaro Herrera To: Isaac Morland Cc: Euler Taveira , Peter Eisentraut , pgsql-hackers Subject: Re: redundant error messages Message-ID: <20201105155356.GA17113@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.27 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Nov-05, Isaac Morland wrote: > In principle, the client knows the database name. In practice, if it's > coming from PGDATABASE or via a service configuration, one may be confused > about the database; having the error message be explicit will avoid many > problems. I can easily imagine that "unable to connect to database" would > be mystifying, whereas "unable to connect to database foo" would elicit the > response, "wait, I'm trying to connect to what now?" leading much more > quickly to a resolution. Also consider cases like running something via cron, where the person reading the error output does not necessarily know what command is being run: it might be hidden inside a script. It's often very helpful to have object names in error messages, even if for the normal usage it seems that the object being operated on is very obvious by just looking at the command.