Re: Typo in "43.9.1. Reporting Errors and Messages"?
От | Euler Taveira |
---|---|
Тема | Re: Typo in "43.9.1. Reporting Errors and Messages"? |
Дата | |
Msg-id | e222845e-8ee4-4aba-8dab-dc59827c61c6@www.fastmail.com обсуждение исходный текст |
Ответ на | Typo in "43.9.1. Reporting Errors and Messages"? (PG Doc comments form <noreply@postgresql.org>) |
Ответы |
Re: Typo in "43.9.1. Reporting Errors and Messages"?
|
Список | pgsql-docs |
On Sun, Jul 31, 2022, at 8:37 PM, PG Doc comments form wrote:
Towards the end of the "43.9.1. Reporting Errors and Messages" section (herewe have the following sentence:> If no condition name nor SQLSTATE is specified in a RAISE EXCEPTIONcommand, the default is to use ERRCODE_RAISE_EXCEPTION (P0001).Looking at the list of error codes (here"ERRCODE_RAISE_EXCEPTION (P0001)" is a typo and should remove "ERRCODE_" andsimply read "RAISE_EXCEPTION (P0001)" or perhaps "ERRCODE ='RAISE_EXCEPTION'" since that's how the default behaviour would be writtenin a RAISE statement.
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.
В списке pgsql-docs по дате отправления: