Ron Johnson wrote:
# select * from projects;
project_id | username | project_name
- ------------+----------+--------------
1 | foo |
2 | bar |
(2 rows)
dupe_filenames=# insert into projects (project_name, username )
dupe_filenames-# values ('foo', 'bar');
ERROR: duplicate key violates unique constraint "projects_pkey"
And you didn't insert records with those numbers by hand (not using the
sequence)? It seems your sequence is a bit behind, which only happens if
you don't always use it to generate your ids.
I suggest you check your sequence values and update it to the highest
value in use if it's too low. You should only need to do that once.
--
Alban Hertroys
[EMAIL PROTECTED]
magproductions b.v.
T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede
// Integrate Your World //
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org