Problem with committing the update - Mailing list pgsql-sql

From BeeBee
Subject Problem with committing the update
Date
Msg-id 1347518989973-5723831.post@n5.nabble.com
Whole thread Raw
List 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.



pgsql-sql by date:

Previous
From: David Johnston
Date:
Subject: Re: ERROR: missing FROM-clause entry for table "new"
Next
From: James Sharrett
Date:
Subject: Re: ERROR: missing FROM-clause entry for table "new"