Re: sequence last_value - Mailing list pgsql-novice

From Josh Berkus
Subject Re: sequence last_value
Date
Msg-id web-146834@davinci.ethosmedia.com
Whole thread Raw
In response to sequence last_value  ("Duncan Adams (DNS)" <duncan.adams@vcontractor.co.za>)
List pgsql-novice
Duncan,

>
> wireman=# insert into loc values (1,1,'HELP');
> ERROR:  Cannot insert a duplicate key into unique index loc_pkey

Try this instead:

INSERT INTO loc ( building_key, floor, ref )
VALUES (1, 1, 'Help');

Explicit column naming in INSERTs is always a good idea.

Also, upgrading to 7.1.3 would be a good idea, although unrelated to
your problem.

Finally, SERIAL and NEXTVAL sequences do not work properly in older
versions of pgODBC, if you're using a WIndows client.  Upgrading to the
new pgAdmin will solve this.

-Josh Berkus


pgsql-novice by date:

Previous
From: "Duncan Adams (DNS)"
Date:
Subject: sequence last_value
Next
From: nandalal gunaratne
Date:
Subject: installation problem -please help