Re: transaction

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "H(dot)J(dot) Sanders" <hjs(at)worldonline(dot)nl>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: transaction
Date: 2004-04-21 02:00:10
Message-ID: 20040421020010.GA19910@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Tue, Apr 20, 2004 at 21:14:48 +0200,
"H.J. Sanders" <hjs(at)worldonline(dot)nl> wrote:
>
> Hello list.
>
> We are migrating from Informix to PSQL.
>
> In Informix we used to do:
>
> - BEGIN WORK
>
> - INSERT ROW
>
> - IF FAILED THEN UPDATE ROW
>
> - COMMIT WORK
>
>
> In PSQL this does not seem to work because after the first error (the
> insert)
> everything is omitted.
>
> Has someone found a solution for this (we have 1000's of this type).

This question has come up a few times over the last year and there isn't
a great answer. Locking the table is a simple solution, but can lead to
problems because of contention.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Vincent Ladlad 2004-04-21 02:53:16 staggered query?
Previous Message David B 2004-04-20 23:24:32 Syntax for cmd to EXEC...how many quotes?