Problem with committing the update

From: BeeBee <khinlayphyulcce(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Problem with committing the update
Date: 2012-09-13 06:49:49
Message-ID: 1347518989973-5723831.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi all,

I have a problem updating the record using store procedure (LANGUAGE
plpgsql).I have attach the query.
http://postgresql.1045698.n5.nabble.com/file/n5723831/query.txt query.txt

/SELECT id INTO STRICT temp_id from T_table_B where T_table_B.column_id =
$1 and T_table_B.status = 'False';
EXCEPTION
WHEN NO_DATA_FOUND THEN
Update T_table_A Set a_flag = True Where T_table_A.id = $1;
WHEN TOO_MANY_ROWS THEN
Update T_table_A Set a_flag = False Where T_table_A.id = $1;/

At the above query, when the first time execute the update statement, it
doesn't really update in database. Only second time then it is really
update. Seems like i need to commit the update statement? Anyway to solve?

Thanks in advance

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Problem-with-committing-the-update-tp5723831.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Sergio Calero. 2012-09-13 11:23:40 underscore pattern in a query doens't work
Previous Message Wolfe Whalen 2012-09-12 23:53:10 generate_series() with TSTZRANGE