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

Re: Return Value on UPDATE trigger

From: derrick(at)grifflink(dot)com
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Return Value on UPDATE trigger
Date: 2004-09-21 03:05:42
Message-ID: 030701c49f87$e1efb180$0200a8c0@main (view raw or flat)
Thread:
Lists: pgsql-novice
RAISE EXCEPTION 'Your specific error message';
    works just great.

----- Original Message ----- 
From: <derrick(at)grifflink(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Sent: Monday, September 20, 2004 1:09 PM
Subject: [NOVICE] Return Value on UPDATE trigger


> On a table update, I want to check for certain conditions in a trigger
> function, and if a condition is met, NOT ALLOW the update.  Not a big
> problem...I can accomplish that.
>
> My question is this:  How can I send a message back to the calling
> application telling the user that the update was denied or failed, and for
> the user to try again?  Basically, I need a way to send a return value
back
> to the application (a 0 or a 1) when a trigger function says so.
>
> Any ideas?
>
> Thanks,
> Derrick
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faqs/FAQ.html
>


In response to

pgsql-novice by date

Next:From: Martin AtukundaDate: 2004-09-21 12:05:51
Subject: Re: ECPG threads
Previous:From: Tom LaneDate: 2004-09-20 23:13:29
Subject: Re: oracle 9i to postgres 7.4.5

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group