Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qxywr-004rdE-QS for pgsql-docs@arkaria.postgresql.org; Wed, 01 Nov 2023 00:19:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qxywq-0058nG-8A for pgsql-docs@arkaria.postgresql.org; Wed, 01 Nov 2023 00:19:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qxywo-0058n8-Mt for pgsql-docs@lists.postgresql.org; Wed, 01 Nov 2023 00:19:04 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qxywl-003MeP-94 for pgsql-docs@lists.postgresql.org; Wed, 01 Nov 2023 00:19:01 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id A85003200995; Tue, 31 Oct 2023 20:18:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 31 Oct 2023 20:18:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1698797935; x=1698884335; bh=dv MeB7Qe1qZNhwzuQmogBkOibnbVokAibWXBbacs0P0=; b=byjZaarXNd9XWWYO68 OK5YAQ/CU8NwjL7t9NtSDQOHoqjRQO6TwEULeqWnxv+qeRGhVY8qwdLmVGqsdOSN gZ/eDvbIlWmi1obg5DMYNeVRyqWAgTMHqoZs3mspDeIVTELr9DhkaeEqHUzh6UTe 5D3+DEsAiYmaTwyi0VNFFsQ+pQmOGizStAV7oTspx0S0kTeVPb1GA5utKIxlFaqR q0/F9z8gPu7BkqxU5aNtftufhJfrJoJE5aFnx7D87ecf6hmTZ7ySnXCH1B5rRec4 O4C/6C7Pi54LQsosh/ufd/Jx0VPstoYKc5K2BFt1eev6hCcXtd3M7xMnFMSgsnZS imug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1698797935; x=1698884335; bh=dvMeB7Qe1qZNh wzuQmogBkOibnbVokAibWXBbacs0P0=; b=hCFsVgiSVsaXRt7BlmdCJF4tL0XlR 4WDBa4d7h6nOVL1yLo9joSaVzvGjVh04n+JjgY3ye2RHaFq9EhfhkL3jQfamENyu P9h2sSJp+oFhl/iWlhLZvG2RSAnIg2yytetChoX08oW/4VTqa7aaQvmEDuAOUS7g N3PG0soMxCjmCjOr1MItE7aB3RLcu/hM0eUB6wsL80i/nK9D51cShCrr/vfJ8xQQ 2PsttzAANdxODKpXwMjLmOGUkAdni2gTfMjfdnWa18JozhA6XeRAVgLEW11icyBc 4tSyQm+oC7YmdFioGaUL1JOmR+NT+V+7tgL0i/h14THeRfwF99xcLGnyg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddtfedgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tdejnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepjeeigeehveejvdegkedtgeev jeeugeehleejgeegffdvhfejfeffiefgjeejvdefnecuffhomhgrihhnpehpohhsthhgrh gvshhqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 31 Oct 2023 20:18:51 -0400 (EDT) Date: Wed, 1 Nov 2023 09:18:47 +0900 From: Michael Paquier To: Alexander Lakhin Cc: Bruce Momjian , Euler Taveira , eric.mutta@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: Typo in "43.9.1. Reporting Errors and Messages"? Message-ID: References: <165931062346.271448.12881330344096283605@wrigleys.postgresql.org> <8247bd59-6c9d-b56b-94f0-6e01993473cd@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cS1F8NUiZ7pO6wdi" Content-Disposition: inline In-Reply-To: <8247bd59-6c9d-b56b-94f0-6e01993473cd@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --cS1F8NUiZ7pO6wdi Content-Type: multipart/mixed; boundary="geDe2P8CTvuhyH3/" Content-Disposition: inline --geDe2P8CTvuhyH3/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 31, 2023 at 09:00:00PM +0300, Alexander Lakhin wrote: > I don't remember details, but I think the primary reason for the change > was that "RAISE_EXCEPTION" occurred in the whole tree only once (before > 66bde49d96). Now I see, that I had chosen the wrong replacement =E2=80=94= I agree > with Euler, change to "raise_exception" would be more appropriate. Indeed, it looks like the origin of the confusion is the casing here, so changing to "raise_exception" like in the appendix sounds good to me: https://www.postgresql.org/docs/devel/errcodes-appendix.html So you mean something like the attached then? > (I've found a similar mention of ERRCODE_xxx in btree.sgml: > =C2=A0 Before doing so, the function should check the sign > =C2=A0 of offset: if it is less than zero, rai= se > =C2=A0 error ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE (22013) > =C2=A0 with error text like invalid preceding or following size in= window > =C2=A0 function. > but I think that's okay here, because that identifier supposed to be used > as-is in ereport/elog.) Yep, still this one is not that old (0a459cec96d3). -- Michael --geDe2P8CTvuhyH3/ Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="plpg-errcode-doc.patch" diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml index 83f867f91d..5977534a62 100644 --- a/doc/src/sgml/plpgsql.sgml +++ b/doc/src/sgml/plpgsql.sgml @@ -3942,7 +3942,7 @@ RAISE unique_violation USING MESSAGE = 'Duplicate user ID: ' || user_id; If no condition name nor SQLSTATE is specified in a RAISE EXCEPTION command, the default is to use - ERRCODE_RAISE_EXCEPTION (P0001). + raise_exception (P0001). If no message text is specified, the default is to use the condition name or SQLSTATE as message text. --geDe2P8CTvuhyH3/-- --cS1F8NUiZ7pO6wdi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmVBmWcACgkQnvQgOdby QH2Q0g//UwNaa+Vr/RJfPCv4WfmutW8hism6pbveH1OKQ7bgpoQYzQWYhhdAYhI/ mksFNWBrBTaIiFNfKYLPEeLwypv0L27jkiw7cGri9obi44MJh/J1XMryk40UFpTl NlM5ri/9fNxoKhNQ2Fs2f7CsqB+5NjW8hdrtlIX4TJ1r4a3lYKZBdpsmuxDZ6JNS vkprPRJHPoNjZLQhw6JmPekvCQ+Wf6xpdjWS/kgjv9P6b+EPU8Xg63bF/wnPPEEj b1gT71YysqiJcxraVmafS4WGStdzQvlYfMZAaFqJ5mn5eFNzTcaAHBSel1uJwWSD W5O2l6c9pbFH8998JK1Ict/ldzx+Lt31h2kOfWlokGsJV0XgtPEk9OuI4tl5ZAXZ arw65rm6b+hBZEwzF8fcDtgpupU80an/A8No0DYz+I4huK4hOmuUfP+tglrWBF06 2qQTAvJy+56Drkt3dQdg3tqRMugakYPxqFbs+XQMjKh9FXuxOc+Gez4o41Oz03PC Pld3UMzRgXPX5FOkPMgjxkKuU/3ou9UaH1M5oMw7wrfz4T5TR7tocve9PSKItSW3 Q3I/v1kVd5qYu7euvL3ZQguW96YZiPyRaw+PMiCal1hhhtfwDuVumkRQVup+qdAh phhC3NjM4DaFuDlzAtABZFDrZ0c13K0mjVrIdAXUDFdg9DAMJM4= =ZSDk -----END PGP SIGNATURE----- --cS1F8NUiZ7pO6wdi--