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

Поиск
Список
Период
Сортировка
От Henry Combrinck
Тема BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code
Дата
Msg-id 200805271513.m4RFDQ9a004292@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      4203
Logged by:          Henry Combrinck
Email address:      henry@zen.co.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).

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4196: Backend crash possible with psql
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4203: perform dblink() in begin/exception returns wrong SQLSTATE code