Re: Capturing return value of a function

From: George Weaver <gweaver(at)shaw(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Capturing return value of a function
Date: 2007-07-16 21:27:49
Message-ID: 006a01c7c7f0$29fb1df0$6400a8c0@Dell4500
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


----- Original Message -----
From: Jasbinder Singh Bali
To: pgsql-general(at)postgresql(dot)org
Sent: Monday, July 16, 2007 3:55 PM
Subject: [GENERAL] Capturing return value of a function

<snip>

> I was wondering what would the function return if insert fails.

> I want it to return 'success' upon a successful insert and 'failure' if
> insert fails.

You can find out whether the insert was successful or not using the tools
here:

http://www.postgresql.org/docs/8.2/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS

<snip>

Regards,
George

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Ross 2007-07-16 21:41:39 psql error while restoring database: unrecognized node type: 655
Previous Message Gregory Stark 2007-07-16 21:23:03 Re: Capturing return value of a function