Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: spi and error messages



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



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group