Rasmus Resen Amossen <NOSPAM(at)hey(dot)com> writes:
> I got a table with a "serial" attribute. For example
> CREATE TABLE test (
> id SERIAL NOT NULL,
> val INT
> );
> The the following insertions creates an error:
> INSERT INTO test(id,val) VALUES (1,1);
> INSERT INTO test(val) VALUES (1);
> Error:
> Cannot insert a duplicate key into unique index test_id_key
If you're going to assign IDs manually, you might want to set
the sequence generator past those values. See setval().
regards, tom lane