Re: CREATE SEQUENCE with RESTART option

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: CREATE SEQUENCE with RESTART option
Дата
Msg-id CALj2ACWgj1+z0D4ko+60fG4VGgzyC3F47OmHM4q0amZ+TXMfBA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: CREATE SEQUENCE with RESTART option  (Suraj Kharage <suraj.kharage@enterprisedb.com>)
Ответы Re: CREATE SEQUENCE with RESTART option
Список pgsql-hackers
On Thu, Apr 8, 2021 at 3:16 PM Suraj Kharage
<suraj.kharage@enterprisedb.com> wrote:
>> > The RESTART clause in the CREATE SEQUENCE doesn't make sense
>> > to me, it should be restricted, IMO.
>
> +1
>
>>
>> Thanks! Attaching a patch that throws an error if the RESTART option
>> is specified with CREATE SEQUENCE. Please have a look and let me know
>> if the error message wording is fine or not. Is it better to include
>> the reason as to why we disallow something like "Because it may
>> override the START option." in err_detail along with the error
>> message?
>
>
> Patch looks good to me. Current error message looks ok to me.
> Do we need to add double quotes for RESTART word in the error message since it is an option?

Thanks for taking a look at the patch. Looks like the other options
are used in the error message without quotes, see
"MINVALUE (%s) is out of range for sequence data type
"START value (%s) cannot be less than MINVALUE
"RESTART value (%s) cannot be less than MINVALUE
"CACHE (%s) must be greater than zero

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Replication slot stats misgivings
Следующее
От: vignesh C
Дата:
Сообщение: Re: Replication slot stats misgivings