Re: exception handling in plpgsql

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Roberto Assis <rezende_assis(at)yahoo(dot)com(dot)br>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: exception handling in plpgsql
Date: 2006-05-25 22:42:15
Message-ID: 20060525224215.GA73000@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, May 25, 2006 at 10:25:37PM +0000, Roberto Assis wrote:
> Hello folks, supose I already have an user called bob, with this
> function below I was expecting to see something like this:
> -------------------------------------------------------------------------------
> SELECT my_create_user('bob','bobpass');
> ERROR: <Some string like XXXXX>:<Some text>
> -------------------------------------------------------------------------------
> If I try to make another user bob.
> But instead the function doesn't compile.
> Reading the manual it seemed that this should work.

What's the exact error you get? What version of PostgreSQL are you
using? SQLSTATE and SQLERRM are available only since 8.1.

--
Michael Fuhr

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2006-05-26 05:02:58 Re: SQL Question - S/B Good...
Previous Message Roberto Assis 2006-05-25 22:25:37 exception handling in plpgsql