From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: fabiogibon@gmail.com
Subject: BUG #16048: SQLSTATE 22P05 is not captured in exception clause
Date: Fri, 11 Oct 2019 14:03:35 +0000
Message-ID: <16048-ff86833b63f1a0a2@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 16048
Logged by: Fabio Henrique Gibon
Email address: fabiogibon@gmail.com
PostgreSQL version: 12.0
Operating system: Windows
Description:
Hi,
I have a database using LATIN1 (and I can't change it), so, when the
user informar a invalid character it is not captured in exception clause.
See a short sample:
DO $$
DECLARE
v varchar;
BEGIN
v := 'ABCŸ';
EXCEPTION
WHEN others THEN
RAISE INFO 'Error State: %', SQLSTATE;
END$$;
I tried in old versions (9.0, 9.6,...) and the result is the same. The error
is propagated, disregarding the exception treatement.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, fabiogibon@gmail.com
Subject: Re: BUG #16048: SQLSTATE 22P05 is not captured in exception clause
In-Reply-To: <16048-ff86833b63f1a0a2@postgresql.org>
References: <16048-ff86833b63f1a0a2@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox