Re: CREATE SEQUENCE with RESTART option

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CREATE SEQUENCE with RESTART option
Дата
Msg-id 593745.1627492579@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CREATE SEQUENCE with RESTART option  (Fujii Masao <masao.fujii@oss.nttdata.com>)
Ответы Re: CREATE SEQUENCE with RESTART option
Список pgsql-hackers
Fujii Masao <masao.fujii@oss.nttdata.com> writes:
> On 2021/07/28 23:53, Bharath Rupireddy wrote:
>> -1. IMHO, this is something creating more confusion to the user. We
>> say that we allow both START and RESTART that RESTART is accepted as a
>> consequence of our internal option handling in gram.y. Instead, I
>> recommend throwing errorConflictingDefElem or errmsg("START and
>> RESTART are mutually exclusive options"). We do throw these errors in
>> a lot of other places for various options. Others may have better
>> thoughts though.

> Per docs, CREATE SEQUENCE conforms to the SQL standard, with some exceptions.
> So I'd agree with Michael if CREATE SEQUENCE with RESTART also conforms to
> the SQL standard, but I'd agree with Bharath otherwise.

I do not see any RESTART option in SQL:2021 11.72 <sequence generator
definition>.  Since we don't document it either, there's really no
expectation that anyone would use it.

I don't particularly think that we should document it, so I'm with Michael
that we don't need to do anything.  This is hardly the only undocumented
corner case in PG.

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Have I found an interval arithmetic bug?
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Fix around conn_duration in pgbench