The seqence is set incorrectly so when I add a new role I get:

* warning: pg_query() [function.pg-query]: Query failed: ERROR: duplicate key violates unique constraint "role_pkey" in /var/www/blah/includes/database.pgsql.inc on line 125.
* user warning: query: INSERT INTO role (name) VALUES ('blah') in /var/www/blah/includes/database.pgsql.inc on line 144.

The error is:
blah=# select * from role;
rid | name
-----+--------------------
1 | anonymous user
2 | authenticated user
(2 rows)

blah# select last_value from role_rid_seq ;
last_value
------------
1
(1 row)

This seq should start at 3.

The fix is:
SELECT setval('role_rid_seq', 3);

Comments

bdragon’s picture

Status: Needs review » Closed (duplicate)

Marking as duplicate of http://drupal.org/node/171536 .