guys,
i inserted 1 record into my database (default
nextval('sequencename'::regclass) where (start 1 increment 1)). then i
tried to insert 1 other record twice but both those inserts failed
because of a domain check ("ERROR: value too long for type character
varying(X)". when i was finally able to insert that record the
sequence jumped 2 places. seems like it counted the failed inserts?

i had insert errors yesterday ("ERROR: invalid input syntax for
integer" "ERROR: column 'columnname' is of type date but expression is
of type integer") but they didn't cause any increment jumps. and when
i insert a record now the sequence increments just fine.

bug or nature of the beast? how to reset? btw using 8.1, got no other
sessions, no record deletes, no triggers, no rules.
jzs

http://www.postgresql.org/docs/8.1/interactive/sql-createsequence.html
http://archives.postgresql.org/pgsql-general/2001-11/msg01004.php
http://archives.postgresql.org/pgsql-admin/2002-02/msg00335.php

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to