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? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers