Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TC3FI-00013J-D4 for pgsql-sql@postgresql.org; Thu, 13 Sep 2012 06:49:52 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TC3FH-0007YG-BD for pgsql-sql@postgresql.org; Thu, 13 Sep 2012 06:49:51 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1TC3FF-0007VU-Vd for pgsql-sql@postgresql.org; Wed, 12 Sep 2012 23:49:49 -0700 Date: Wed, 12 Sep 2012 23:49:49 -0700 (PDT) From: BeeBee To: pgsql-sql@postgresql.org Message-ID: <1347518989973-5723831.post@n5.nabble.com> Subject: Problem with committing the update MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 0.0 (/) X-Archive-Number: 201209/40 X-Sequence-Number: 36842 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.