Re: Problem when adding an existing primary key - Mailing list pgsql-bugs

From Josh Berkus
Subject Re: Problem when adding an existing primary key
Date
Msg-id 200302021228.53812.josh@agliodbs.com
Whole thread Raw
In response to Problem when adding an existing primary key  ("Insyde" <insyde@insyde.com.br>)
List pgsql-bugs
Ricardo,

> When I try to insert via application a registry that already exists
> Postgres shows an error  "Unable to insert duplicate primary key on index
> 'index' ". I think it's an error, because I would treat this error, just
> like others.

You're getting that message becuase you are trying to insert a value into t=
he=20
PK column which is a duplicate of a value already present.  This is not=20
permitted ... definitionally, primary keys must be unique.

In other words, the above is a valid error message being sent to you becaus=
e=20
you violated a table constraint.

If there is more to the story than that, I suggest that you post your probl=
ems=20
to the PGSQL-NOVICE mailing list, where other users will help you fix your=
=20
queries.  For that matter, I believe that there are other Brazillians on so=
me=20
of the other mailing lists (you could try PGSQL-GENERAL as well), which wou=
ld=20
spare you the pain of translating your questions.

--=20
Josh Berkus
Aglio Database Solutions
San Francisco

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Complex cursor won't rewind to 0-th row
Next
From: pgsql-bugs@postgresql.org
Date:
Subject: Bug #890: only one user per process in libpq with krb5 auth