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

Return Value on UPDATE trigger

From: derrick(at)grifflink(dot)com
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Return Value on UPDATE trigger
Date: 2004-09-20 19:09:18
Message-ID: 028901c49f45$5413f390$0200a8c0@main (view raw or flat)
Thread:
Lists: pgsql-novice
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


In response to

  • Backups at 2004-09-20 18:41:53 from Eduardo Vázquez Rodríguez

Responses

pgsql-novice by date

Next:From: Kent AndersonDate: 2004-09-20 20:13:52
Subject: Stored Procedures
Previous:From: Eduardo Vázquez RodríguezDate: 2004-09-20 18:41:53
Subject: Backups

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