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 1m1OsI-0004G9-9U for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Jul 2021 07:55:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1OsH-0002Eb-6u for pgsql-hackers@arkaria.postgresql.org; Thu, 08 Jul 2021 07:55: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 1m1OsG-0002Dv-VH for pgsql-hackers@lists.postgresql.org; Thu, 08 Jul 2021 07:55:08 +0000 Received: from forward3-smtp.messagingengine.com ([66.111.4.237]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1OsC-0003uv-MB for pgsql-hackers@postgresql.org; Thu, 08 Jul 2021 07:55:08 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailforward.nyi.internal (Postfix) with ESMTP id 4DAE7194032E; Thu, 8 Jul 2021 03:55:02 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 08 Jul 2021 03:55:02 -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:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=zCUg9g2V0APQ5NPaXzAsSqwbNoI30HRNie0w71W3a oo=; b=ahBnuEm90fmvwOqrvIJTbXfhwU9JmYXDBJRgHY2ng87TcPASW4eGaFaHV HGMKhpCnHCSc3elzUUrCXi+lmkMYhc5bXv6GsOF/MaM7t0PaRNgARe1WevUnpG4V v9WUFWhdbYo1H7td6z3rBAfOsNTtCqh3KzlqdoDyVSJ6rnzyqEHLsIwzorybYBan 5LjAJ7sNScvVZR9E3EWm0mtWbMSZfKHhwextNkixYhRHuF2d1GvjG3J2QPccSYSO Pi9eIt1Sn5SJgK9YnHe+09mfwjXed/ZqgExWJ8y4evFDwy7EK74y2+AXycraKTvI GVmC096HSXh7CKwhSCXHsjRkG8b7g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrtdefgdduudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepleevheehueeiudeiteei tdekueetleefteejffeiffdugedvffdvffdtiedvueeknecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Jul 2021 03:55:01 -0400 (EDT) Subject: Re: wrong relkind error messages To: Alvaro Herrera Cc: pgsql-hackers References: <202107021610.fv2n3ehw4yu7@alvherre.pgsql> From: Peter Eisentraut Message-ID: <08b1063f-5341-c30e-6789-b523dd0e9e29@enterprisedb.com> Date: Thu, 8 Jul 2021 09:54:58 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <202107021610.fv2n3ehw4yu7@alvherre.pgsql> 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 02.07.21 18:10, Alvaro Herrera wrote: > 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. Thanks, committed.