SPI API and exceptions

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: SPI API and exceptions
Date: 2012-12-28 08:07:05
Message-ID: 1356682025.20017.4.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

SPI was invented before there was proper exception handling, so it
communicates errors by return values. This makes programming with SPI
either prone to errors of omission, or very ugly (ultimately, the
standard reasons why exceptions were invented).

So I was pondering whether we could introduce exceptions to SPI in some
way. I'm not sure how. We could invent an entirely separate set of
functions, or do some tricks in the header that things before
differently depending on some #define. Any ideas?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2012-12-28 08:07:48 Re: Performance Improvement by reducing WAL for Update Operation
Previous Message Tom Lane 2012-12-28 06:09:41 Re: fix bgworkers in EXEC_BACKEND