On Wed, May 30, 2007 at 09:33:40AM +0200, Bart Degryse wrote: > In general how should I catch the error message generated if one > of the spi functions (spi_exec_query, spi_query, spi_fetchrow, > spi_prepare,...) fails?
In PL/Perl functions you can use eval to catch errors just as you would in an ordinary Perl script: eval { do something }; if ($@) { handle the error } -- Michael Fuhr ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate