Hi,
I wrote a function which should update a table field.
However, i would like somehow to control that update was done.
for that i was thinking to return a boolean : true is update was done, false
if an error happened.
however, i can i do that ? I mean how can i know if UPDATE has been
correctly executed ?
here is my function :
CREATE OR REPLACE FUNCTION sp_a_005("login" "varchar", pwd "varchar")
RETURNS boolean AS
$BODY$
DECLARE
BEGIN
UPDATE accounts
SET account_pwd = $2
WHERE account_login = $1;
RETURN;
END;
--
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.1.4
Apache 2.0.58
PHP 5