X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AFB24D85EC for ; Wed, 31 Aug 2005 14:04:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93273-03 for ; Wed, 31 Aug 2005 17:04:41 +0000 (GMT) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.203]) by svr1.postgresql.org (Postfix) with ESMTP id 6DD1ED8578 for ; Wed, 31 Aug 2005 14:04:40 -0300 (ADT) Received: by zproxy.gmail.com with SMTP id z6so960406nzd for ; Wed, 31 Aug 2005 10:04:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pv8YWvCDhI874G1Cjpa682Ub9hdULSgC6kTjB2QXocnTgpgeqYIjZJevkb73bidcsZYdXtodd89ARgbCwN5+bCsxkwCQEs/JogbquE8tFbnBSOEcEVqAHf+8sfyyau+L8aSm8FBrakmOnvkBWnr/5LS3t9CxqSWbXIFCbR5CIf4= Received: by 10.36.224.80 with SMTP id w80mr575736nzg; Wed, 31 Aug 2005 10:04:41 -0700 (PDT) Received: by 10.36.247.45 with HTTP; Wed, 31 Aug 2005 10:04:40 -0700 (PDT) Message-ID: Date: Wed, 31 Aug 2005 14:04:41 -0300 From: Cleber Nardelli To: Marko Ristola Subject: Re: Transactions and SavePoints Cc: pgsql-odbc@postgresql.org In-Reply-To: <4315DB11.8050300@kolumbus.fi> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20050831115735.91661.qmail@web53206.mail.yahoo.com> <4315DB11.8050300@kolumbus.fi> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.054 required=5 tests=[AWL=0.030, RCVD_BY_IP=0.024] X-Spam-Level: X-Archive-Number: 200508/252 X-Sequence-Number: 5891 Marko, debtor for the aid that you have given me. =20 My problem in the truth nor is SAVEPOINT and ROLLBACK You the SAVEPOINT. = =20 My problem is that when an error is generated during the execution of commands inside of a transaction driver automatically it makes a ROLLBACK of all the executed commands until then and ai I do not obtain to execute the ROLLBACK You the SAVEPOINT therefore the block of the transaction already does not exist more. Yours truly Cleber 2005/8/31, Marko Ristola : >=20 > Hi >=20 > I tried to write SAVEPOINT SQL support into PsqlODBC in Summer. >=20 > I was able to implement some suport for savepoint creation, savepoint > rollback and savepoint RELEASE. >=20 > I didn't understand, how the query results should behave at savepoint > rollbacks. >=20 > You can find more information about my thoughts about savepoint > implementation on this list ealier this year, or with Google. >=20 > Main design issue was, that SAVEPOINT tracking must be implemented > into PSQLODBC. >=20 > That's what I implemented: > - Linked list of all defined savepoints. > - Maintain the list during SAVEPOINT maintenance functions. >=20 > Savepoint command parsing speed was 600000 commands per second, > that I wrote (UTF-8). With UCS-4 , without a state machine, it was > 300000 commands per second. The subsystem's speed was okay. >=20 > I implemented a full PostgreSQL SQL SAVEPOINT support with > the Bison/Flex parser, because it is easy, but that part is > not at all easy to integrate into an existing PsqlODBC driver. >=20 > Are you interested in a patch for the mergeable part of the savepoint > support? >=20 > Regards, > Marko Ristola >=20 > Carlos Henrique Reimer wrote: >=20 > > Is there a ODBC flavor than can implement ROLLBACK TO SAVEPOINT? > > > > Marko Ristola wrote: > > > Unfortunately SAVEPOINTs are not implemented in PsqlODBC yet. > > > > > > > > >ROLLBACK TO SAVEPOINT -case is easy to fix, but the full > > >implementation is hard to make correctly for psqlodbc, at least for me= . > > > > > >Marko Ristola > > > > > >>Cleber Nardelli wrote: > > >> > > >> > > >>Hello. > > >>I am using the Driver odbc for access to postgresql. I have a > > referring problem to the cancellation of the transaction when > > >>some error > > >>is found at the moment of the execution of the same one. I try to > > execute this sql command: > > >> > > >> > > >>BEGIN TRANSACTION; > > >> DELETE FROM TABL1 WHERE ID =3D 1; > > >> INSERT INTO TABL1 VALUES (1,1); > > >> SAVEPOINT SVPT; > > >> INSERT INTO TABL1 VALUES (1,1); > > >> ROLLBACK TO SAVEPOINT SPVT; > > >>COMMIT; > > >> > > >>When I try to insert as register it accuses to error with key > > duplicate. Ok. But I do not want to cancel the transaction I I need to > > only continue > > >>with the same one skirting this error. For this reason I am using > > >>SavePoints but it generates the error: > > >>"ERROR: ROLLBACK TO SAVEPOINT may only be used in transaction blocks" > > >> > > >>Necessary of the your help. I thank > > >> > > >>Yours truly > > >> > > > > -----------------------------------------------------------------------= - > > Yahoo! Acesso Gr=E1tis > > <%20http://us.rd.yahoo.com/mail/br/taglines/*http://br.acesso.yahoo.com= />: > > Internet r=E1pida e gr=E1tis. Instale o discador agora! > > <%20http://us.rd.yahoo.com/mail/br/taglines/*http://br.acesso.yahoo.com= /> >=20 >=20 >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 3: Have you checked our extensive FAQ? >=20 > http://www.postgresql.org/docs/faq >=20 --=20 Cleber Nardelli IPM Automa=E7=E3o e Consultoria 9998-8670