Hi,
It looks like we do allow $subject which has following behaviour:
create sequence myseq restart 200; --> sequence is starting from
restart value overriding start value
create sequence myseq start 100 restart 200; --> sequence is starting
from restart value overriding start value
create sequence myseq start 100 restart; --> sequence is starting from
start value no overriding of start value occurs
create sequence myseq restart; --> sequence is starting from default
start value no overriding of start value occurs
While we have documented the "restart" option behaviour for ALTER
SEQUENCE, we have no mention of it in the CREATE SEQUENCE docs page.
Do we need to document the above behaviour for CREATE SEQUENCE?
Alternatively, do we need to throw an error if the user is not
supposed to use the "restart" option with CREATE SEQUENCE?
IMO, allowing the "restart" option for CREATE SEQUENCE doesn't make
sense when we have the "start" option, so it's better to throw an
error.
Thoughts?
With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com