pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: BeeBee <khinlayphyulcce@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Problem with committing the update
Date: Wed, 12 Sep 2012 23:49:49 -0700 (PDT)
Message-ID: <1347518989973-5723831.post@n5.nabble.com> (raw)

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.




view thread (2+ messages)  latest in thread

Message-ID: <1347518989973-5723831.post@n5.nabble.com>
Permalink:  ../1347518989973-5723831.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1347518989973-5723831.post@n5.nabble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: khinlayphyulcce@gmail.com
  Subject: Re: Problem with committing the update
  In-Reply-To: <1347518989973-5723831.post@n5.nabble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox