Cannot insert a duplicate key into unique index

From: <kynn(at)panix(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Cannot insert a duplicate key into unique index
Date: 2004-02-19 04:06:11
Message-ID: 200402190406.i1J46BP26112@panix3.panix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I'm trying to debug some problem in my database that is resulting in
an error of the form "Cannot insert a duplicate key into unique
index". The insert statement that is producing this error does not
include a value for the pkey field in question (this field is of type
SERIAL). I imagine that somehow the counter associated with this
field got messed up, so that it is mistakenly generating a value that
has been used already. How can I straighten it out?

Thanks!

kj

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Noel 2004-02-19 04:18:45 Re: Cannot insert a duplicate key into unique index
Previous Message Christian Pöcher 2004-02-19 00:26:05 Re: Big databases vs small databases