pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <inoue@tpf.co.jp>
To: Renato.Gondim@SoftwareExpress.com.br
Cc: pgsql-odbc@postgresql.org
Subject: Re: Meaning of Level of rollback on errors
Date: Thu, 01 Jun 2006 09:09:02 +0900
Message-ID: <447E301E.3080900@tpf.co.jp> (raw)
In-Reply-To: <001001c684f2$4a37a2b0$3c35a8c0@MRENATO>
References: <001001c684f2$4a37a2b0$3c35a8c0@MRENATO>

Renato Gondim wrote:
> Hi folks,
> 
> I've just faced a situation here at work. Our application runs on Oracle,
> SqlServer, Sybase and PostGreSql. The problem was when a primary key
> violation occurs: after the error, the application tries to find the
> register, but if the ODBC is configured as "Transaction" on "Level of
> rollback on errors", nothing is returned from the select. After a research,
> I found out that I must use "Statement" , but I'd like to know what happen
> when this configuration is set, because the application must start / finish
> the transaction. I'm tried "Nop: don't rollback anything", cause make more
> sense for me: don't do anything, let the application control the
> transactions, but using it, the application can't continue and make more
> statements.

Level of rollback on errors.
1. Transaction
    Rollback the current transaction entirely on errors. This was the unique
    behavior of old drivers becauase PG has no savepoint functionality until
    8.0.

2. Statement
    Rollback the current (ODBC) statement on errors (in case of 8.0 or later
    version servers). The driver calls a SAVEPOINT command just before starting
    each (ODBC) statement and automatically ROLLBACK to the savepoint on errors
    or RELEASE it on success. If you expect Oracle-like automatic per statement
    rollback, please use this level.

3. Nop
    You can(have to) call some SAVEPOINT commands and rollback to a savepoint
    on errors by yourself. Please note you have to rollback the current
    transcation or ROLLBACK to a savepoint on errors (by yourself) to continue
    the application.

regards,
Hiroshi Inoue



view thread (2+ messages)

Message-ID: <447E301E.3080900@tpf.co.jp>
Permalink:  ../447E301E.3080900@tpf.co.jp/
Also on:    postgresql.org/message-id/447E301E.3080900@tpf.co.jp

 · 

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 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: inoue@tpf.co.jp, Renato.Gondim@SoftwareExpress.com.br
  Subject: Re: Meaning of Level of rollback on errors
  In-Reply-To: <447E301E.3080900@tpf.co.jp>
  References: <001001c684f2$4a37a2b0$3c35a8c0@MRENATO> <447E301E.3080900@tpf.co.jp>

* 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