Re: BUG #16048: SQLSTATE 22P05 is not captured in exception clause
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: BUG #16048: SQLSTATE 22P05 is not captured in exception clause |
| Дата | |
| Msg-id | 16177.1570803560@sss.pgh.pa.us обсуждение |
| Ответ на | BUG #16048: SQLSTATE 22P05 is not captured in exception clause (PG Bug reporting form <noreply@postgresql.org>) |
| Список | pgsql-bugs |
PG Bug reporting form <noreply@postgresql.org> writes:
> 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$$;
Sorry, that's not a bug, and you're going to have to find some other
way to deal with the issue. This error will be thrown while trying to
convert the incoming query string to the database encoding, long before
anything in the server would be able to recognize that this even is a
DO command, let alone is one containing an exception clause.
Exception clauses don't work for syntax errors either, for largely
similar reasons.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера