pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem with committing the update
2+ messages / 2 participants
[nested] [flat]
* Problem with committing the update
@ 2012-09-13 06:49 BeeBee <khinlayphyulcce@gmail.com>
2012-09-15 01:54 ` Re: Problem with committing the update Jasen Betts <jasen@xnet.co.nz>
0 siblings, 1 reply; 2+ messages in thread
From: BeeBee @ 2012-09-13 06:49 UTC (permalink / raw)
To: 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.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Problem with committing the update
2012-09-13 06:49 Problem with committing the update BeeBee <khinlayphyulcce@gmail.com>
@ 2012-09-15 01:54 ` Jasen Betts <jasen@xnet.co.nz>
0 siblings, 0 replies; 2+ messages in thread
From: Jasen Betts @ 2012-09-15 01:54 UTC (permalink / raw)
To: pgsql-sql
On 2012-09-13, BeeBee <khinlayphyulcce@gmail.com> wrote:
> Hi all,
>
> I have a problem updating the record using store procedure (LANGUAGE
> plpgsql).I have attach the query.
it all looks good to me.
--
⚂⚃ 100% natural
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2012-09-15 01:54 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-09-13 06:49 Problem with committing the update BeeBee <khinlayphyulcce@gmail.com>
2012-09-15 01:54 ` Jasen Betts <jasen@xnet.co.nz>
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