Re: rotate records

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Natasha Galkina <natasha(at)platsolns(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: rotate records
Date: 2006-02-25 18:39:13
Message-ID: 20060225183913.GA75323@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Robert Treat 2006-02-25 19:17:04 Re: User groups
Previous Message brew 2006-02-25 18:33:25 Re: [GENERAL] Requesting LinuxWorld East staffers