Search Postgresql Archives
get value after updating table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: pgsql-general@xxxxxxxxxxxxxx
- Subject: get value after updating table
- From: "Alain Roger" <raf.news@xxxxxxxxx>
- Date: Mon, 26 Mar 2007 21:38:07 +0200
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=o2c0WbOOI/qJ2j67ILEesjvuUJXeeC+gHvK3QY2KTTg2U2J6lUeDU+rd7/3cruXder2qFG/HKynt0x4DPIMdjB3jHJC5NcLYjMOhLrLBFOtPfMeyQJX2mXTsd33s+hQAtUn7K/2maOfu74g+Vl1XbhulLknwPYBYbh60W8TDqK0=
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
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]
[Postgresql Jobs]
[Postgresql Admin]
[Postgresql Performance]
[Linux Clusters]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[PHP Books]
[PHP Databases]
[Postgresql & PHP]
[Yosemite]