CREATE SEQUENCE with RESTART option

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема CREATE SEQUENCE with RESTART option
Дата
Msg-id CALj2ACV=AC6jHwobX-mqL-jBs6qhqzppD0tCmp8vHiLDrFRuyQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: CREATE SEQUENCE with RESTART option
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Yet another fast GiST build
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Why is specifying oids = false multiple times in create table is silently ignored?