Re: [HACKERS] support for NEXT VALUE FOR expression

2016-08-16 Thread Tom Lane
Peter Eisentraut writes: > Here is a patch for implementing the NEXT VALUE FOR expression. This is > the SQL-standard conforming version of our nextval() function, and it's > also used by Oracle, MS SQL, DB2. BTW, several of the earlier threads complained of needing to make NEXT a fully-reserved

Re: [HACKERS] support for NEXT VALUE FOR expression

2016-08-16 Thread Tom Lane
Thomas Munro writes: > On Wed, Aug 17, 2016 at 3:52 PM, Tom Lane wrote: >> We discussed this before and concluded that NEXT VALUE FOR is in fact >> *not* an exact semantic equivalent of nextval(): >> https://www.postgresql.org/message-id/14790.1083955136%40sss.pgh.pa.us > And also again 10 years

Re: [HACKERS] support for NEXT VALUE FOR expression

2016-08-16 Thread Thomas Munro
On Wed, Aug 17, 2016 at 3:52 PM, Tom Lane wrote: > Peter Eisentraut writes: >> Here is a patch for implementing the NEXT VALUE FOR expression. This is >> the SQL-standard conforming version of our nextval() function, and it's >> also used by Oracle, MS SQL, DB2. Example: > > We discussed this b

Re: [HACKERS] support for NEXT VALUE FOR expression

2016-08-16 Thread Tom Lane
Peter Eisentraut writes: > Here is a patch for implementing the NEXT VALUE FOR expression. This is > the SQL-standard conforming version of our nextval() function, and it's > also used by Oracle, MS SQL, DB2. Example: We discussed this before and concluded that NEXT VALUE FOR is in fact *not* a

[HACKERS] support for NEXT VALUE FOR expression

2016-08-16 Thread Peter Eisentraut
Here is a patch for implementing the NEXT VALUE FOR expression. This is the SQL-standard conforming version of our nextval() function, and it's also used by Oracle, MS SQL, DB2. Example: SELECT NEXT VALUE FOR foo_seq; The second patch changes the serial column to use this new expression for its