"Ian Harding" <ianh@tpchd.org> writes:
> I can just create this particular sequence with minvalue 0 start 1, but I am wondering what is the downside to this
beingthe default? Alternatively, is there a way to make setval accept a value that is $start - $increment as seems to
happenon creation?
There's a separate bit in the sequence state that causes it not to
advance on first call; this allows the initial state to be $start
and not $start - $increment (which might underflow).
In recent PG versions you can manipulate the no-advance flag with
a 3-parameter setval() call.
regards, tom lane