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 1qxt29-0046Ny-Hz for pgsql-docs@arkaria.postgresql.org; Tue, 31 Oct 2023 18:00:09 +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 1qxt28-003etW-8i for pgsql-docs@arkaria.postgresql.org; Tue, 31 Oct 2023 18:00:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qxt27-003etN-Tt for pgsql-docs@lists.postgresql.org; Tue, 31 Oct 2023 18:00:08 +0000 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qxt25-0041lA-0n for pgsql-docs@lists.postgresql.org; Tue, 31 Oct 2023 18:00:07 +0000 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-50931355d48so1620214e87.3 for ; Tue, 31 Oct 2023 11:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698775203; x=1699380003; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Jj4qr18jpWIMbFaW/LJ9qKxAqFtitJskzvXMWT266is=; b=QeIFnV9LrSuDUCJFVDUJCz4hBKz1aFGTpdCgovr7aeXdBDb3cYxk+/tvvHqirFBKUw Q06+jJ2uErTv4ICqqoyDxxcIwbsrb9NmlvNiIf+KgcE67Y9on6LEILw2uBl4iZduELtb m4L7bRCGgqpv08agmhZ3t3Cqdw7sf7zgV7Ift3sBVqGn1uDfMZfahqCHL4m8PZDLwXpd HYBADLOfm8xZcS6JpglGxebuxMIjC8y80dmt1yDLFqNZUN51oiQvkVspnHcws/axm1g8 rAmer7pQK+qM4SCMjR41kY26fSCm1jMpz8oaxGSttKr6TS3uzemRi0a8A/cVKf1Z567P xRSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698775203; x=1699380003; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Jj4qr18jpWIMbFaW/LJ9qKxAqFtitJskzvXMWT266is=; b=W40dqXthYhsrW066jbHGXxm9A09BRTjwd5p9h6P4y4oPRPZpcM8KsyP5Bs+nZ/e6jp ckGCd/uNClrPQpFFeVhgpNiD81PPMcTPyRq3ejgFiC0N5cx4y3m8jw8qfQIrifOI19P0 lGEXHEJrzRfvNnKwY1SCMy6izcqflJ7Kr0XyG6kBaecYPTHszyBG3PFfON8+NVDExLXq 2C0hl2BznpBhFjPpT1hoeEovIe0afWjR0tWo5pOeJpJPf3zF1hPxjSiclyjPCvGI/K/i QJA7qk9SSeiluzJ8d9PjGP5TfK70VPYT4PhZt/azTWeUfOGZYOP43FxcELWAtcVe1WjT pF+A== X-Gm-Message-State: AOJu0YxV2f7q8jinA0dtgo8KmaL+BNXUfWHa0ghhbDpAoym9yrnUQPDc 8euMSK43Pv1FjlxGraemNYk= X-Google-Smtp-Source: AGHT+IGNk3C3TGaxYxfb1BZeuBSIcoAKWRS+X9GblBxFgIS/XpNh0mzHUqk6B2+LB813rkDs4emU3g== X-Received: by 2002:ac2:4d93:0:b0:507:b074:ecd4 with SMTP id g19-20020ac24d93000000b00507b074ecd4mr9893186lfe.7.1698775203038; Tue, 31 Oct 2023 11:00:03 -0700 (PDT) Received: from [1.0.0.7] ([178.155.28.40]) by smtp.gmail.com with ESMTPSA id bi20-20020a0565120e9400b004fb7848bacbsm273006lfb.46.2023.10.31.11.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 31 Oct 2023 11:00:02 -0700 (PDT) Message-ID: <8247bd59-6c9d-b56b-94f0-6e01993473cd@gmail.com> Date: Tue, 31 Oct 2023 21:00:00 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: Typo in "43.9.1. Reporting Errors and Messages"? Content-Language: en-US To: Bruce Momjian , Euler Taveira Cc: eric.mutta@gmail.com, pgsql-docs@lists.postgresql.org, Michael Paquier References: <165931062346.271448.12881330344096283605@wrigleys.postgresql.org> From: Alexander Lakhin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Bruce, 31.10.2023 17:52, Bruce Momjian wrote: > >> It is referring to the internal constant (see src/backend/utils/errcodes.h). It >> was like you are proposing and it was changed in >> 66bde49d96a9ddacc49dcbdf1b47b5bd6e31ead5. Reading the original thread, there is >> no explanation why it was changed. Refer to internal names is not good for a >> user-oriented text. I think it would be better to use the condition name (in >> lowercase) like it is referred to in [1]. I mean, change >> ERRCODE_RAISE_EXCEPTION to raise_exception. >> >> [1] https://www.postgresql.org/docs/current/errcodes-appendix.html > Alexander, Michael, can you explain why this commit removed ERRCODE_: > > commit 66bde49d96 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 — I agree with Euler, change to "raise_exception" would be more appropriate. (I've found a similar mention of ERRCODE_xxx in btree.sgml:   Before doing so, the function should check the sign   of offset: if it is less than zero, raise   error ERRCODE_INVALID_PRECEDING_OR_FOLLOWING_SIZE (22013)   with error text like invalid preceding or following size in window   function. but I think that's okay here, because that identifier supposed to be used as-is in ereport/elog.) Best regards, Alexander