Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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



Tom Lane wrote:
"Henry Combrinck" <henry(at)zen(dot)co(dot)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?

Sounds reasonable. Do you think this is a bug fix or an 8.4 enhancement? I will try to take a closer look at the specific fix this weekend.

Joe




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group