Re: Kind of error-handler in a pgsql function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: DI Hasenöhrl <i(dot)hasenoehrl(at)aon(dot)at>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Kind of error-handler in a pgsql function
Date: 2001-07-05 00:38:25
Message-ID: 1517.994293505@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

=?iso-8859-1?Q?DI_Hasen=F6hrl?= <i(dot)hasenoehrl(at)aon(dot)at> writes:
> I want to know the result of an insert or update, because I call these func=
> tions from an Access form and the next steps of the program depend on these=
> results.

See the FOUND variable (if you just want to test zero or not-zero rows
processed) or the SET DIAGNOSTICS statement to get the row count.

There is no way to trap an error inside a plpgsql function, however.

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Alex Pilosov 2001-07-05 03:12:03 Re: Kind of error-handler in a pgsql function
Previous Message DI Hasenöhrl 2001-07-04 19:37:13 Kind of error-handler in a pgsql function