Re: CREATE SEQUENCE with RESTART option

2021-07-28 Thread Michael Paquier
On Wed, Jul 28, 2021 at 01:16:19PM -0400, Tom Lane wrote: > I do not see any RESTART option in SQL:2021 11.72 definition>. Since we don't document it either, there's really no > expectation that anyone would use it. Okay, good point. I was not aware of that. > I don't particularly think that w

Re: CREATE SEQUENCE with RESTART option

2021-07-28 Thread Tom Lane
Fujii Masao 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 thr

Re: CREATE SEQUENCE with RESTART option

2021-07-28 Thread Fujii Masao
On 2021/07/28 23:53, Bharath Rupireddy wrote: On Wed, Jul 28, 2021 at 11:50 AM Michael Paquier wrote: On Mon, Jul 26, 2021 at 04:57:53PM +0900, Michael Paquier wrote: FWIW, like Ashutosh upthread, my vote would be to do nothing here in terms of behavior changes as this is just breaking a b

Re: CREATE SEQUENCE with RESTART option

2021-07-28 Thread Bharath Rupireddy
On Wed, Jul 28, 2021 at 11:50 AM Michael Paquier wrote: > > On Mon, Jul 26, 2021 at 04:57:53PM +0900, Michael Paquier wrote: > > FWIW, like Ashutosh upthread, my vote would be to do nothing here in > > terms of behavior changes as this is just breaking a behavior for the > > sake of breaking it, s

Re: CREATE SEQUENCE with RESTART option

2021-07-27 Thread Michael Paquier
On Mon, Jul 26, 2021 at 04:57:53PM +0900, Michael Paquier wrote: > FWIW, like Ashutosh upthread, my vote would be to do nothing here in > terms of behavior changes as this is just breaking a behavior for the > sake of breaking it, so there are chances that this is going to piss > some users that re

Re: CREATE SEQUENCE with RESTART option

2021-07-26 Thread Michael Paquier
On Sat, Jul 24, 2021 at 09:56:40PM +0530, Bharath Rupireddy wrote: > LGTM. PSA v2 patch. FWIW, like Ashutosh upthread, my vote would be to do nothing here in terms of behavior changes as this is just breaking a behavior for the sake of breaking it, so there are chances that this is going to piss s

Re: CREATE SEQUENCE with RESTART option

2021-07-24 Thread Bharath Rupireddy
On Sat, Jul 24, 2021 at 3:20 AM Cary Huang wrote: > The following review has been posted through the commitfest application: > make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: tested, passed > Documentation:tested, passed >

Re: CREATE SEQUENCE with RESTART option

2021-07-23 Thread Cary Huang
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed Hi I have applied and run your patch, which works fine in my

Re: CREATE SEQUENCE with RESTART option

2021-04-08 Thread Bharath Rupireddy
On Thu, Apr 8, 2021 at 3:16 PM Suraj Kharage 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 lo

Re: CREATE SEQUENCE with RESTART option

2021-04-08 Thread Suraj Kharage
On Thu, Apr 8, 2021 at 2:03 PM Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.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 sp

Re: CREATE SEQUENCE with RESTART option

2021-04-08 Thread Bharath Rupireddy
On Thu, Apr 8, 2021 at 10:09 AM Amul Sul wrote: > > On Wed, Apr 7, 2021 at 6:52 PM Bharath Rupireddy > wrote: > > > > On Wed, Apr 7, 2021 at 6:04 PM Ashutosh Bapat > > wrote: > > > At best CREATE SEQUENCE START ... RESTART ... can be a shorthand > > > for CREATE SEQUENCE ... START; ALTER SE

Re: CREATE SEQUENCE with RESTART option

2021-04-07 Thread Amul Sul
On Wed, Apr 7, 2021 at 6:52 PM Bharath Rupireddy wrote: > > On Wed, Apr 7, 2021 at 6:04 PM Ashutosh Bapat > wrote: > > At best CREATE SEQUENCE START ... RESTART ... can be a shorthand > > for CREATE SEQUENCE ... START; ALTER SEQUENCE ... RESTART run back to > > back. So it looks useful but i

Re: CREATE SEQUENCE with RESTART option

2021-04-07 Thread Bharath Rupireddy
On Wed, Apr 7, 2021 at 6:04 PM Ashutosh Bapat wrote: > At best CREATE SEQUENCE START ... RESTART ... can be a shorthand > for CREATE SEQUENCE ... START; ALTER SEQUENCE ... RESTART run back to > back. So it looks useful but in rare cases. I personally feel that let's not mix up START and REST

Re: CREATE SEQUENCE with RESTART option

2021-04-07 Thread Ashutosh Bapat
On Wed, Apr 7, 2021 at 3:56 PM Bharath Rupireddy wrote: > > 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; --> sequ

CREATE SEQUENCE with RESTART option

2021-04-07 Thread Bharath Rupireddy
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 sequ