Full error description PDOException: SQLSTATE[22003]: Numeric value out of range: 7 ERROR: setval: value 0 is out of bounds for sequence "user_revision_vid_seq" (1..9223372036854775807): SELECT setval('user_revision_vid_seq', GREATEST(MAX(vid), :serial_value)) FROM {user_revision}; Array ( [:serial_value] => 0 ) in user_revision_install() (line 174 of /sites/all/modules/user_revision/user_revision.install). The website encountered an unexpected error. Please try again later.

Comments

Drupa1ish’s picture

Drupa1ish’s picture

According to #1512474: PDOException on PostgreSQL comment #1 and #2

Just digged a little into the code of eck and database.inc...
...the field "id" is sent to the database layer with the no-value "null", what seems to cause problems: It gets casted to type int (what means it becomes value zero). The postgre database code is not smart enough to detect that zero does not fit into the serial definition (1..9223372036854775807) - what is the leading to the above exception.

It seems that the clean way to create new serial-values is to not provide any data about that db-serial-field. Not even a "null".

The patch works with MySQL also

Fortunatelly, #2091155: Drupal db abstraction layer fixed other possible erorrs with Postgresql

Drupa1ish’s picture

Status: Active » Closed (fixed)