Обсуждение: Wrong increments of Sequence

Поиск
Список
Период
Сортировка

Wrong increments of Sequence

От
RPK
Дата:
I have created a sequence with minimum value=1 and increment=1. But whenever
I enter a record in a table and use nextval('seqstudentmaster') to insert
new studentid, it is incremented by 20. How to set it to increment by 1?
--
View this message in context: http://www.nabble.com/Wrong-increments-of-Sequence-tf3496141.html#a9765151
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


Re: Wrong increments of Sequence

От
Andreas Kretschmer
Дата:
RPK <rpk.general@gmail.com> schrieb:

>
> I have created a sequence with minimum value=1 and increment=1. But whenever
> I enter a record in a table and use nextval('seqstudentmaster') to insert
> new studentid, it is incremented by 20. How to set it to increment by 1?

Can you show us an example and the definition for the sequence? It is
possible that there are other connections to this database,
other transactions? You know, a ROLLBACK doesn't rollback the
sequence-increment?


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°