From: | "dandl" <david(at)andl(dot)org> |
---|---|
To: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
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-22 01:31:51 |
Message-ID: | 002201d1b3c9$b88a12f0$299e38d0$@andl.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks. Yes, I have seen those around and kind of wondered.
It looks like it can only be used in a "C" context. Should do what I need,
if I can find the right place to put it.
Regards
David M Bennett FACS
Andl - A New Database Language - andl.org
> -----Original Message-----
> From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
> Sent: Sunday, 22 May 2016 12:01 AM
> To: dandl <david(at)andl(dot)org>
> Cc: 'PostgreSQL' <pgsql-general(at)postgresql(dot)org>
> Subject: Re: [GENERAL] How to know if SPI or some other API triggered an
> ERROR.
>
> "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
From | Date | Subject | |
---|---|---|---|
Next Message | Tory M Blue | 2016-05-22 05:27:08 | 9.5 CentOS 7 setting PGDATA for systemctl |
Previous Message | John R Pierce | 2016-05-22 00:07:29 | Re: PostgreSql Doubt |