Re: problems with transaction blocks - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: problems with transaction blocks
Date
Msg-id 20040107171025.GA12631@wolff.to
Whole thread Raw
In response to problems with transaction blocks  ("Chris Ochs" <chris@paymentonline.com>)
List pgsql-general
On Tue, Jan 06, 2004 at 16:52:12 -0800,
  Chris Ochs <chris@paymentonline.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.

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Any way to have CREATEUSER privs without having all privs?
Next
From: "scott.marlowe"
Date:
Subject: Re: Reparse PL/pgSQL Function?