Re: How to know if SPI or some other API triggered an ERROR.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "dandl" <david(at)andl(dot)org>
Cc: "'PostgreSQL'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to know if SPI or some other API triggered an ERROR.
Date: 2016-05-21 14:01:22
Message-ID: 55568.1463839282@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"dandl" <david(at)andl(dot)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 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John DeSoi 2016-05-21 14:09:13 .bash_profile replaced on software updates
Previous Message Chris Travers 2016-05-21 12:05:49 Re: Thoughts on "Love Your Database"