Re: CREATE SEQUENCE with RESTART option

From: Suraj Kharage <suraj(dot)kharage(at)enterprisedb(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Amul Sul <sulamul(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: CREATE SEQUENCE with RESTART option
Date: 2021-04-08 09:46:26
Message-ID: CAF1DzPW1joY-d44yvKddBAGEVp7LOtp-hjO8FuPu0f30eQhqYA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 8, 2021 at 2:03 PM Bharath Rupireddy <
bharath(dot)rupireddyforpostgres(at)gmail(dot)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 & Regards,
Suraj kharage,

edbpostgres.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2021-04-08 09:46:38 Re: [PATCH] Add --create-only option to pg_dump/pg_dumpall
Previous Message Thomas Munro 2021-04-08 09:46:06 Re: Remove page-read callback from XLogReaderState.