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