Re: Abort state on duplicated PKey in transactions - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Abort state on duplicated PKey in transactions
Date
Msg-id 20010908190818.D17777@svana.org
Whole thread Raw
In response to Abort state on duplicated PKey in transactions  (Haroldo Stenger <hstenger@adinet.com.uy>)
List pgsql-general
On Fri, Sep 07, 2001 at 04:29:45PM -0500, Haroldo Stenger wrote:
> I'm aware that savepoints and nested transactions will be implemented in
> future versions, but how to solve the problem before that starts
> working?

The usual way is to generate your primarys keys from a sequence. Then you
never get duplicate values and so the inserts never fail.

This may not apply in your situation...
--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> Magnetism, electricity and motion are like a three-for-two special offer:
> if you have two of them, the third one comes free.

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Problem w/ dumping huge table and no disk space
Next
From: Tod McQuillin
Date:
Subject: Re: Problem w/ dumping huge table and no disk space