Re: Can't add records - Mailing list pgsql-novice

From von Schwerdtner, Thomas (GXS, FPI)
Subject Re: Can't add records
Date
Msg-id 3D808EC801AED111B0100008C75D5DDC13E453ED@roc05bxgeisge.is.ge.com
Whole thread Raw
In response to Can't add records  (Setyo Nugroho <snugroho@gmx.net>)
List pgsql-novice

>
> Wrote a small program using Qt. After some tests with another
> database,
> usingthe very same program, I found something erroneous in my
> program.
> - editing & deleting records: OK
> - adding records: NO
> I got this eror message:
>
> "QPSQL:unable to create query.
> Error: cannot insert a duplicate key into unique index route_pkey."
<snip/>

This usually means that your insert command is attempting to duplicate a value in a sequence, which for your table looks to be the route_id column.

-Tom

pgsql-novice by date:

Previous
From: Rory Campbell-Lange
Date:
Subject: Re: return column id from insert
Next
From: "YC Nyon"
Date:
Subject: Re: SQL statement to copy a result set to create another table