Re: [BUGS] BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code
В списке pgsql-patches по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: [BUGS] BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code |
| Дата | |
| Msg-id | 28467.1212362389@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [BUGS] BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code (Joe Conway <mail@joeconway.com>) |
| Ответы |
Re: [BUGS] BUG #4203: perform dblink() in begin/exception returns
wrong SQLSTATE code
|
| Список | pgsql-patches |
Joe Conway <mail@joeconway.com> writes:
> [ improved patch ]
Still a couple quibbles:
> + ereport(level,
> + (errcode(sqlstate),
> + errmsg(message_primary),
This *must* be errmsg("%s", message_primary), else you have big problems
with % in the text. Also, I think it's at least theoretically possible
for message_primary to be null, in which case you'd better substitute
"unknown error" or some such.
You could avoid the ugly cast-away-const by making
dblink_context_conname be const char *, no?
Since dblink_res_error isn't going to return if fail = true, seems
like you could skip the "if (!fail)" tests occurring after calls to it.
regards, tom lane
В списке pgsql-patches по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера