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
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your Subscription:
http://mail.postgresql.org/mj/mj_wwwusr?domain=postgresql.org&extra=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:
- [HACKERS] How to handle error message in PG_CATCH Zdenek Kotala
- Re: [HACKERS] How to handle error message in PG_CATCH Alvaro Herrera
- Re: [HACKERS] How to handle error message in PG_CA... Zdenek Kotala
- Re: [HACKERS] How to handle error message in P... Tom Lane
- Re: [HACKERS] How to handle error message ... Zdenek Kotala
