Re: transaction - Mailing list pgsql-sql

From Bruno Wolff III
Subject Re: transaction
Date
Msg-id 20040421020010.GA19910@wolff.to
Whole thread Raw
In response to transaction  ("H.J. Sanders" <hjs@worldonline.nl>)
List pgsql-sql
On Tue, Apr 20, 2004 at 21:14:48 +0200, "H.J. Sanders" <hjs@worldonline.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.


pgsql-sql by date:

Previous
From: ow
Date:
Subject: Follow-up: FK constraint performance
Next
From: "Vincent Ladlad"
Date:
Subject: staggered query?