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 1lzLke-0002uh-GI for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Jul 2021 16:10:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lzLkb-0006eq-PZ for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Jul 2021 16:10:45 +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 1lzLka-0006ei-Mr for pgsql-hackers@lists.postgresql.org; Fri, 02 Jul 2021 16:10:45 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lzLkT-00008L-R0 for pgsql-hackers@postgresql.org; Fri, 02 Jul 2021 16:10:43 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.west.internal (Postfix) with ESMTP id 363ED3200945; Fri, 2 Jul 2021 12:10:33 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 02 Jul 2021 12:10:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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= fm3; bh=z8CzLktmiPpC6E1X2FEnTHRTNwSUTN5U3ptnPCY15Ic=; b=RQ1evO3P GRuE6fyw2vqNAADX9A3GKDwyNWtuyOxf/BwgO7oraJt+QORLMzcVT4pagiDDXstS uEfJb6ID6PBU/yGy+1Q3M54A65dV9fYNzFVEW5Hf4F/ogOO6K8yBHIb37D/gGlPg xgSIqznwP6DXjtJ1iM8qAkD3vV/HPoffMmPPoF4YN8aA7VSMkLRju5VUyJ6jBVNU hczF8P7iYG3k3aydyi9b+Lbrbq98Z3uveB34RmX1lfDccfX7JxKxroclRyRKcc9q t4eIbpV7V4LTC3A+ofEQCmu46gdbKJwWOdVsHHDAePpuaYeh0smdOZ5TGzTJ5BsP 3i1ZqPqZjja7Fw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeikedgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedujeevjeffjeevuddutedvkeeiueeitddvieelfeekveej udefgeeuvdejhfeuleenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 2 Jul 2021 12:10:32 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 03D842A0A5C; Fri, 2 Jul 2021 12:10:30 -0400 (-04) Date: Fri, 2 Jul 2021 12:10:29 -0400 From: Alvaro Herrera To: Peter Eisentraut Cc: pgsql-hackers Subject: Re: wrong relkind error messages Message-ID: <202107021610.fv2n3ehw4yu7@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <01d4fd55-d4fe-5afc-446c-a7f99e043f3d@enterprisedb.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021-Jun-24, Peter Eisentraut wrote: > There might be room for some wordsmithing in a few places, but generally I > think this is complete. This looks good to me. I am +0.1 on your proposal of "cannot have triggers" vs Michael's "cannot create triggers", but really I could go with either. Michael's idea has the disadvantage that if the user fails to see the trailing "s" in "triggers" they could get the idea that it's possible to create some other trigger; that seems impossible to miss with your wording. But it's not that bad either. It seemed odd to me at first that errdetail_relkind_not_supported() returns int, but I realized that it's a trick to let you write "return errdetail()" so you don't have to have "break" which would require one extra line. Looks fine. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/