Re: Unrecognized exception condition "deprecated_feature"
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: Kouber Saparev <kouber@gmail.com>,
Postgres Bug <pgsql-bugs@postgresql.org>
Date: 2018-03-09T22:44:15Z
Lists: pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> 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.
> 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.
This isn't specific to ERRCODE_WARNING_DEPRECATED_FEATURE; if you look
at generate-plerrcodes.pl you'll see it only collects error codes, not
warning codes, for use in plpgsql's mapping table. It's documented, too:
Appendix A says
(Note that PL/pgSQL does not recognize warning, as opposed to error,
condition names; those are classes 00, 01, and 02.)
I'm not entirely sure why we have this errcode at all, as it doesn't
seem to be used anywhere.
regards, tom lane
Commits
-
Install errcodes.txt for use by extensions.
- 1fd869066863 11.0 landed
-
Adjust input routines for float4, float8 and oid to reject the empty string
- 975e27377aad 8.1.0 cited
-
Emit a warning when an empty string is input to the oid, float4, and
- 2146bfc869bf 8.0.0 cited