Re: problems with transaction blocks

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Chris Ochs <chris(at)paymentonline(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: problems with transaction blocks
Date: 2004-01-07 17:10:25
Message-ID: 20040107171025.GA12631@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Jan 06, 2004 at 16:52:12 -0800,
Chris Ochs <chris(at)paymentonline(dot)com> wrote:
> I want to do a series of inserts within a single transaction block, but with
> postgresql if one insert fails, the whole block is aborted. Is there any
> way to get around this behavior so that postgresql won't abort the entire
> transaction if a single insert returns an error?

Currently there is no provision for recovery from error by the application
inside a transaction. What you can do is have the application check for
problems before trying the insert. Depending on the problems you expect,
you might be able to avoid trying an insert which will fail in almost
all cases.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc G. Fournier 2004-01-07 17:18:37 The script kiddies are busy again ...
Previous Message D. Dante Lorenso 2004-01-07 16:57:38 Find original number of rows before applied LIMIT/OFFSET?