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 1mYTc7-0002nA-4K for pgsql-general@arkaria.postgresql.org; Thu, 07 Oct 2021 13:39:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mYTc5-0001dw-OR for pgsql-general@arkaria.postgresql.org; Thu, 07 Oct 2021 13:39:09 +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 1mYTc4-0001dI-QF for pgsql-general@lists.postgresql.org; Thu, 07 Oct 2021 13:39:09 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYTc1-0002zn-KP for pgsql-general@lists.postgresql.org; Thu, 07 Oct 2021 13:39:08 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 75D605C00EA; Thu, 7 Oct 2021 09:39:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 07 Oct 2021 09:39:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=U PPftF996cROSQxlnNiSlseIgUnEi/Mp7nbFV+mK+EQ=; b=qgBylvhs6VWm3h+yc Wqt8G+Nst0DcwokVZHKezxn/tw/MaOWSEJDBaJJa7TOUnlvrUay6+KtDgiyrqqAF wAzRuEuttUiAVAVFKMBG9vo3SL6SHHuLuRshWGjgFPxllU700XCaLX/Hw1t2AKru 9KoeZtyaY3fKaHUoikjhULUdBKgFzWnmsLnkzoYnntu1WQhADjJEUyC159bsetFE EoBq8xWcpPCcEhFncVCq2dZkqzYrTY08cWBwXC67DW23wQxWc5tZIWSydp23m3/q 9pkHHt0T6aOiDKpZ93pFqjTftoRcFRMPnR/2PmunnRCJZU6vXMJ6xWF7emJT7C3M YTBbQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=UPPftF996cROSQxlnNiSlseIgUnEi/Mp7nbFV+mK+ EQ=; b=ae8AZBX6nfQJ/HPDsOly12nRDhys1fXxjEmJc2kMqaIdOEPSK11XL5wxK Y8j1Fl5tzsEVb/KbaxMdE1HSbfPxAeTBEVMGyXfiy6ExoxJFJvvZzZQcYFGyCrzy Krn+5MjrA9N2Gp0iO0Ctf48ewhgii6D7c6YWO+MliOE0G0+oqq1W/uSkn6sotQDd 01dSZ0l2PqGsh9PYrXJgrkwlxpBHQURAuipwSD34JckpSX06h31jwJzCPDkOQHPA T5ImYAMxIWR7xHKPA3Cscb1hICMIwt9aHAjXwiSLgBADy/LmKOHHVwmAxLq9IUmF IOye3NhqKP8BmRFML7M/nnEA1iI0g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudelkedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtje ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepteejvdetff ejuedvleeifeefheeutdfhgfdvhffhhfekvdduveegvdejudefgfevnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Oct 2021 09:39:03 -0400 (EDT) Subject: Re: Misplaced double quotes in error message To: Thomas Kellerer , "pgsql-general@lists.postgresql.org" References: From: Adrian Klaver Message-ID: Date: Thu, 7 Oct 2021 06:39:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/6/21 11:17 PM, Thomas Kellerer wrote: > Hello, > > consider the following table, query and error message: > > create table t > ( > "someColumn" int > ); > > select t.someColumn > from t; > > > ERROR: column t.somecolumn does not exist > Hint: Perhaps you meant to reference the column "t.someColumn". > > > For someone proficient in SQL it's pretty clear what the error message means, > but the quotes can be misleading for someone who doesn't really understand > what's going on. FYI, errors are generically double quoted: ERROR: invalid input syntax for type integer: "one" This is not specific to identifier quoting. > > I think if the error message quoted the column name the way it should actually > be used, it would make things easier for someone not used to this, e.g.: > > Hint: Perhaps you meant to reference the column t."someColumn". > > Because when the user takes the error message literally they might be tempted > to use "t.someColumn" just to be confronted with the same error message again > which then seems even more confusing. > > > > > -- Adrian Klaver adrian.klaver@aklaver.com