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

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



The following bug has been logged online:

Bug reference:      4203
Logged by:          Henry Combrinck
Email address:      henry(at)zen(dot)co(dot)za
PostgreSQL version: 8.2.6 and 8.3.1
Operating system:   Linux
Description:        perform dblink() in begin/exception returns wrong
SQLSTATE code
Details: 

Apologies if this is the wrong forum to report this (perhaps it needs to go
to the dblink() maintainer?)

In a function on a machine using 8.2.6, the following returns a strange
SQLSTATE code:

begin
  perform dblink ('host=other_machine ...',
        'insert into table...');
exception when others then
  raise notice 'SQLSTATE: %', SQLSTATE;
end;

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



Home | Main Index | Thread Index

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