Unrecognized exception condition "deprecated_feature" - Mailing list pgsql-bugs

From Kouber Saparev
Subject Unrecognized exception condition "deprecated_feature"
Date
Msg-id CAN4RuQvC3OGXv8bWEiRO_PQbgGeTLyw5e78q0cQEkXPSsczAYg@mail.gmail.com
Whole thread Raw
Responses Re: Unrecognized exception condition "deprecated_feature"
List pgsql-bugs
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';              
END; 
$$; 
WARNING:  Deprecated 
DO

The thing that is making this issue quite strange is that I see that string well defined in the source code (and copy/pasted it from there, as well as from the docs, yet the result remains the same).

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.

Regards,
--
Kouber Saparev

pgsql-bugs by date:

Previous
From: Michael Meskes
Date:
Subject: Re: BUG #15104: Double free in the main function in ecpg.c
Next
From: "David G. Johnston"
Date:
Subject: Re: Unrecognized exception condition "deprecated_feature"