Re: How to know if SPI or some other API triggered an ERROR. - Mailing list pgsql-general

From Tom Lane
Subject Re: How to know if SPI or some other API triggered an ERROR.
Date
Msg-id 55568.1463839282@sss.pgh.pa.us
Whole thread Raw
In response to How to know if SPI or some other API triggered an ERROR.  ("dandl" <david@andl.org>)
Responses Re: How to know if SPI or some other API triggered an ERROR.  ("dandl" <david@andl.org>)
List pgsql-general
"dandl" <david@andl.org> writes:
> The question is whether there is any way to know that some Postgres API call such as SPI (or others) did not return
butinstead 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


pgsql-general by date:

Previous
From: Chris Travers
Date:
Subject: Re: Thoughts on "Love Your Database"
Next
From: John DeSoi
Date:
Subject: .bash_profile replaced on software updates