Re: Unrecognized exception condition "deprecated_feature"

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Unrecognized exception condition "deprecated_feature"
Дата
Msg-id CAKFQuwYeV7WRO6NK8-eEO0jHLtgkSqG3QnrhrxwmHcy9U0XErQ@mail.gmail.com
обсуждение исходный текст
Ответ на Unrecognized exception condition "deprecated_feature"  (Kouber Saparev <kouber@gmail.com>)
Ответы Re: Unrecognized exception condition "deprecated_feature"
Re: Unrecognized exception condition "deprecated_feature"
Список pgsql-bugs
On Fri, Mar 9, 2018 at 11:55 AM, Kouber Saparev <kouber@gmail.com> wrote:
For some reason using an error code of 'deprecated_feature' does not work, while its equivalent '01P01' works just fine.

kouber=# DO $$ 
BEGIN 
 RAISE WARNING 'Deprecated' 
   USING ERRCODE = 'deprecated_feature'; 
END; 
$$; 
ERROR:  unrecognized exception condition "deprecated_feature" 
CONTEXT:  PL/pgSQL function inline_code_block line 3 at RAISE

kouber=# DO $$ 
BEGIN 
 RAISE WARNING 'Deprecated' 
   USING ERRCODE = '01P01';              

​[...]​
kouber@spectre:~/src/postgres$ grep -r deprecated_feature .                 
./src/backend/utils/errcodes.txt:01P01    W    ERRCODE_WARNING_DEPRECATED_FEATURE                             deprecated_feature

I am using PostgreSQL 10.1, I apologize in case it has already been fixed in 10.2 or 10.3.

​While I haven't looked at the source code or docs for this I'm wondering why you believe this is a bug in the first place.  If "01P01" is a valid and expected value for ERRCODE I would expect that the textual string label representing it would not be.​  The two are not likely to be interchangeable.  Have you found working code where this is does work as you expect?

David J.

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Kouber Saparev
Дата:
Сообщение: Unrecognized exception condition "deprecated_feature"
Следующее
От: Valery Komarov
Дата:
Сообщение: Build or update inarray GIST index very slow.