From: zhaoxin <zhaox@necas.nec.com.cn>
To: Ludek Finstrle <luf@pzkagis.cz>
Cc: pgsql-odbc@postgresql.org
Subject: Re: some question about SavePoint ?
Date: Mon, 23 Jan 2006 11:27:06 +0800
Message-ID: <43D44D0A.3000902@necas.nec.com.cn> (raw)
In-Reply-To: <20060120111644.GA19170@soptik.pzkagis.cz>
References: <43CF0B0B.6000101@necas.nec.com.cn>
<20060119111957.GA31571@soptik.pzkagis.cz>
<43D0410C.9000900@necas.nec.com.cn>
<20060120111644.GA19170@soptik.pzkagis.cz>
Ludek Finstrle wrote:
>>>There is some common known bugs in 08.01.0102 in implicit rollback.
>>>Do you try latest development snapshot?
>>>Maybe 08.01.0106 could better fit you. I don't know. We have some report
>>>about similar problem (but reporter doesn't mentioned his psqlodbc
>>>version).
>>
>>Do you mean that in 08.01.0106 I must not use the Savepoint to ignore
>>some error ?? When error occurred in 08.01.0106, It can be continued to
>>execute SQL without executing rollback first ???
>
>
> There is some changes with implicit rollback in autocommit = on. I don't
You mean I can use autocommit = on and begin a transaction manually???
Is the implicit rollback to rollback all before ???
> know your situation exactly so it should or shouldn't help you.
> The answer is:
> Maybe yes. You have to try.
>
My situation is like this , can you help me :
1.set autocommit = off ;
2.for(i=0;i<len;i++){
insert into test(c1,c2) values(i,'a');
if dupkey error occur then
update test set c2 = 'b';--error:rollback first???
else {
rollback and return;
}
}
3.commit;
I want to do like this:
1. set autocommit = off ;
2. for(i=0;i<len;i++){
savepoint sp;
insert into test(c1,c2) values(i,'a');
release savepoint sp;
if dupkey error occur then
rollback to sp;
update test set c2 = 'b';
else{
rollback and return;
}
}
3.commit;
Can I use another way to implenment this ? (don't use the savepoint)
thanks.
Regards,
zhao
>
>>What I want is to ignore some error returned ,and coninue to execute my
>>SQL , do I have another way ?
>
>
> Yes, you have. You could send us your mylog output and we could take
> a look at your problem. But you could be sure we don't study 08.01.0102
> mylog output becouse there are changes in development snapshots.
>
> The best way is try tha latest development snapshot (08.01.0107). We're
> going to release new "stable" version based ont 08.01.0107 in relative
> short time. So if you want have easier life with new stable release you
> may try the 08.01.0107 and report problem if there is one.
>
> Regards,
>
> Luf
>
--
以上、よろしくお願いいたします。
---------------------------------------------------------
Zhao Xin
NEC-CAS Software Laboratories Co.,Ltd.
Tel : 8233-4433-425
Telnet : 8-0086-22-425
E-mail: zhaox@necas.nec.com.cn
--------------------------------------------------------
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: zhaox@necas.nec.com.cn, luf@pzkagis.cz
Subject: Re: some question about SavePoint ?
In-Reply-To: <43D44D0A.3000902@necas.nec.com.cn>
References: <43CF0B0B.6000101@necas.nec.com.cn> <20060119111957.GA31571@soptik.pzkagis.cz> <43D0410C.9000900@necas.nec.com.cn> <20060120111644.GA19170@soptik.pzkagis.cz> <43D44D0A.3000902@necas.nec.com.cn>
* 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