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