Re: NEXT VALUE FOR sequence

2018-02-21 Thread Laurenz Albe
Ashutosh Bapat wrote: > On Tue, Feb 20, 2018 at 8:39 PM, Laurenz Albe > wrote: > > Tom Lane wrote: > > > Laurenz Albe writes: > > > > The SQL standard has the expression "NEXT VALUE FOR asequence" to do > > > > what we traditionally do with "nextval('asequence')". > > > > This is an attempt to i

Re: NEXT VALUE FOR sequence

2018-02-21 Thread Ashutosh Bapat
On Tue, Feb 20, 2018 at 8:39 PM, Laurenz Albe wrote: > Tom Lane wrote: >> Laurenz Albe writes: >> > The SQL standard has the expression "NEXT VALUE FOR asequence" to do >> > what we traditionally do with "nextval('asequence')". >> > This is an attempt to implement this on top of the recently intr

Re: NEXT VALUE FOR sequence

2018-02-20 Thread Laurenz Albe
Tom Lane wrote: > Laurenz Albe writes: > > The SQL standard has the expression "NEXT VALUE FOR asequence" to do > > what we traditionally do with "nextval('asequence')". > > This is an attempt to implement this on top of the recently introduced > > NextValueExpr node. > > This has been proposed r

Re: NEXT VALUE FOR sequence

2018-02-19 Thread Tom Lane
Laurenz Albe writes: > The SQL standard has the expression "NEXT VALUE FOR asequence" to do > what we traditionally do with "nextval('asequence')". > This is an attempt to implement this on top of the recently introduced > NextValueExpr node. This has been proposed repeatedly, and rejected repeat

Re: NEXT VALUE FOR sequence

2018-02-19 Thread Daniel Verite
Laurenz Albe wrote: > The SQL standard has the expression "NEXT VALUE FOR asequence" to do > what we traditionally do with "nextval('asequence')". The behavior mandated by the standard is that several invocations of NEXT VALUE on the same sequence on the same output row must produce the s