"dandl" <david@xxxxxxxx> writes: > The question is whether there is any way to know that some Postgres API call such as SPI (or others) did not return but instead triggered an elog(ERROR). I think what you're looking for is to set up a PG_TRY/PG_CATCH block to intercept the error as the stack is being unwound. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general