Re: BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code
- From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
- To: "Henry Combrinck" <henry(at)zen(dot)co(dot)za>
- Cc: pgsql-bugs(at)postgresql(dot)org, Joe Conway <mail(at)joeconway(dot)com>
- Subject: Re: BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code
- Date: Tue, 27 May 2008 11:56:43 -0400
- Message-id: <28639.1211903803@sss.pgh.pa.us> <text/plain>
"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?
regards, tom lane
Home |
Main Index |
Thread Index