| От | Tom Lane |
|---|---|
| Тема | Re: sqlstate 22P06 is a warning in an error's clothing |
| Дата | |
| Msg-id | 16455.1194714110@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | sqlstate 22P06 is a warning in an error's clothing (Abhijit Menon-Sen <ams@oryx.com>) |
| Список | pgsql-hackers |
Abhijit Menon-Sen <ams@oryx.com> writes:
> The server logs "WARNING: nonstandard use of \\ in a string literal at
> character 44", but the message comes with sqlstate code 22P06, which is
> in an error class ("Data exception"). So my application thinks it's an
> error, and is unhappy.
If you are trying to tell errors from warnings, why are you not looking
first at PQresultStatus (or equivalent in other client APIs)?
I think reassigning the message to another sqlstate will break more
clients than it fixes. It's not the only problematic case either, eg
ereport(NOTICE, (errcode(ERRCODE_NAME_TOO_LONG), errmsg("identifier
\"%s\"will be truncated to \"%.*s\"", ident, len, ident)));
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера