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 B1B7ED6E0B for ; Wed, 31 Aug 2005 00:39:11 -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 72470-04 for ; Wed, 31 Aug 2005 03:39:09 +0000 (GMT) Received: from fep32-app.kolumbus.fi (fep32-0.kolumbus.fi [193.229.0.63]) by svr1.postgresql.org (Postfix) with ESMTP id 9526BD87A4 for ; Wed, 31 Aug 2005 00:39:07 -0300 (ADT) Received: from [192.168.1.103] (really [84.230.132.204]) by fep32-app.kolumbus.fi with ESMTP id <20050831033904.XGBK13434.fep32-app.kolumbus.fi@[192.168.1.103]> for ; Wed, 31 Aug 2005 06:39:04 +0300 Message-ID: <43152657.1090806@kolumbus.fi> Date: Wed, 31 Aug 2005 06:39:03 +0300 From: Marko Ristola User-Agent: Debian Thunderbird 1.0.2 (X11/20050817) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: [Fwd: Re: Transactions and SavePoints] Content-Type: multipart/mixed; boundary="------------040608010300050707040104" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.144 required=5 tests=[AWL=0.093, FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200508/234 X-Sequence-Number: 5873 This is a multi-part message in MIME format. --------------040608010300050707040104 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I sent this off list, so I send this into this list also. Marko Ristola --------------040608010300050707040104 Content-Type: message/rfc822; name="Re: [ODBC] Transactions and SavePoints" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Re: [ODBC] Transactions and SavePoints" Message-ID: <43152603.8020707@kolumbus.fi> Date: Wed, 31 Aug 2005 06:37:39 +0300 From: Marko Ristola User-Agent: Debian Thunderbird 1.0.2 (X11/20050817) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Cleber Nardelli Subject: Re: [ODBC] Transactions and SavePoints References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 = 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 > > > --------------040608010300050707040104--