Search Postgresql Archives

sequence problem - many rows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have the following table
     Column       |  Type   |                            Modifiers
----------------+-------+-----------------------------------------------------------------
id | integer | not null default nextval('cachedgroupmembers_id_seq'::regclass)
groupid            | integer |
memberid         | integer |
via                    | integer |
immediatepar    | integer |
disabled           | integer | not null default 0
Indexes:
   "cachedgroupmembers_pkey" PRIMARY KEY, btree (id)
   "cachedgroupmembers2" btree (memberid)
   "cachedgroupmembers3" btree (groupid)
   "disgroumem" btree (groupid, memberid, disabled)

And the sequence for the id column:
CREATE SEQUENCE cachedgroupmembers_id_seq CACHE 1000;

Now the table is empty and I try to insert a row in this table:
INSERT INTO cachedgroupmembers(groupid) values(55);
And it works.

Next I populate the table wittt aprox 700.000 records.
And I do again  "INSERT INTO cachedgroupmembers(groupid) values(55);".
The error is : ERROR: duplicate key violates unique constraint "cachedgroupmembers_pkey"

Thank you.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux