pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Chip Gobs <chip.gobs@noaa.gov>
Cc: pgsql-sql@postgresql.org
Subject: Re: Implicit Transactions
Date: Mon, 20 Sep 2004 08:34:27 -0400 (EDT)
Message-ID: <200409201234.i8KCYRK07220@candle.pha.pa.us> (raw)
In-Reply-To: <414AF83E.AFA00204@noaa.gov>

Chip Gobs wrote:
> 
> We are porting from Informix to  PostgreSQL 7.4.5 and have noticed the
> following behavior.
> 
> If we try to OPEN a CURSOR  for an invalid SELECT statement in ECPG, we
> get an error, as expected.  However, if we then
> attempt to OPEN another CURSOR  for a valid statement, we get an error
> that says we are in a failed transaction.   At that point, no statement
> will succeed.   The only way we have found to get out of this state is
> to ROLLBACK explicitly.
> 
> We are not using explicit transactions.  My understanding is that PG
> should be rolling back failed statements when we are not in an
> explicit transaction.
> 
> Do we have an incorrect setting, a misunderstanding of how it is
> supposed to work, or a bug? Could anyone enlighten me?

ecpg defaults to open transaction by default.  There is a command to
change that in ecpg or during compile I think.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



view thread (2+ messages)

Message-ID: <200409201234.i8KCYRK07220@candle.pha.pa.us>
Permalink:  ../200409201234.i8KCYRK07220@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200409201234.i8KCYRK07220@candle.pha.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pgman@candle.pha.pa.us, chip.gobs@noaa.gov
  Subject: Re: Implicit Transactions
  In-Reply-To: <200409201234.i8KCYRK07220@candle.pha.pa.us>

* 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