How to handle error message in PG_CATCH

Поиск
Список
Период
Сортировка
От Zdenek Kotala
Тема How to handle error message in PG_CATCH
Дата
Msg-id 47CD1253.3090508@sun.com
обсуждение исходный текст
Ответы Re: How to handle error message in PG_CATCH  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
I'm working on implementing pg_check functions. Because I want to test 
whole table I need catch a error and handle it myself. I use following 
construct:



PG_TRY();
{...ereport(ERROR, (errmsg("Error test")));...
}
PG_CATCH();
{errcontext("Context error");        EmitErrorReport();        FlushErrorState();
}
PG_END_TRY();

At the end I got following message:

ERROR:  Error test
CONTEXT:  Context error
server sent data ("D" message) without prior row description ("T" message)

and also nothing appears in a log file. Similar concept is used in
autovacuum.c.

Any idea what is wrong?
    Thanks for help Zdenek


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

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: Re: Replacing the corrupt "global" folder with older one
Следующее
От: "Heikki Linnakangas"
Дата:
Сообщение: Re: "could not open relation 1663/16384/16584: No such file or directory" in a specific combination of transactions with temp tables