Re: rotate records - Mailing list pgsql-general

From Michael Fuhr
Subject Re: rotate records
Date
Msg-id 20060225183913.GA75323@winnie.fuhr.org
Whole thread Raw
In response to Re: rotate records  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
On Sat, Feb 25, 2006 at 10:12:38AM -0700, Michael Fuhr wrote:
> > If it is not correct, how can I rotate the records in the table?
>
> One way would be to use a trigger to delete records having the same
> event_id as the record being inserted.

I should mention that with the example I posted you can still get
duplicate key violations if enough concurrent transactions insert
into the table at the same time.  I'll have to think a little more
about the best way to avoid that.

--
Michael Fuhr

pgsql-general by date:

Previous
From: brew@theMode.com
Date:
Subject: Re: Requesting LinuxWorld East staffers
Next
From: Robert Treat
Date:
Subject: Re: User groups