Re: BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code
Дата
Msg-id 28639.1211903803@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code  ("Henry Combrinck" <henry@zen.co.za>)
Ответы Re: BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code  (Joe Conway <mail@joeconway.com>)
Список pgsql-bugs
"Henry Combrinck" <henry@zen.co.za> writes:
> Description:        perform dblink() in begin/exception returns wrong
> SQLSTATE code

> The code returned is always 42601 (syntax_error) irrespective of the actual
> error (eg, unique_violation).

Yeah, the dblink code should probably try a bit harder to propagate the
original error fields.  I'm inclined to think that it should propagate
sqlstate/message/detail/hint verbatim, and indicate the fact that this
happened on a dblink connection as CONTEXT, rather than structuring the
ereport the way it does now.  Joe, what do you think?

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: "Henry Combrinck"
Дата:
Сообщение: BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code
Следующее
От: "Tomasz Rybak"
Дата:
Сообщение: BUG #4204: COPY to table with FK has memory leak