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

From: "dandl" <david(at)andl(dot)org>
To:
Cc: "'PostgreSQL'" <pgsql-general(at)postgresql(dot)org>
Subject: How to know if SPI or some other API triggered an ERROR.
Date: 2016-05-21 10:41:37
Message-ID: 000001d1b34d$5b50f120$11f2d360$@andl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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).

The context is the implementation of a language handler (plandl for Andl) with the possibility of re-entrant calls to functions. I would like to be able to recover from Postgres errors, but that’s quite difficult if I don’t know that one has happened, particularly if it happens inside a nested call that needs to be unwound.

Any suggestions appreciated.

Regards

David M Bennett FACS

_____

Andl - A New Database Language - andl.org

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Szymon Lipiński 2016-05-21 10:49:02 Re: Thoughts on "Love Your Database"
Previous Message Chris Travers 2016-05-21 09:28:13 Re: Thoughts on "Love Your Database"