NEXT VALUE FOR <sequence>

From: Thomas Munro <munro(at)ip9(dot)org>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: NEXT VALUE FOR <sequence>
Date: 2014-10-01 16:28:46
Message-ID: CADLWmXUY2oo4XObQWF3yPUSK=5uEiSV=eTyLrnu=RzteOy+3Lg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

SQL:2003 introduced the function NEXT VALUE FOR <sequence>. Google
tells me that at least DB2, SQL Server and a few niche databases
understand it so far. As far as I can tell there is no standardised
equivalent of currval and setval (but I only have access to second
hand information about the standard, like articles and the manuals of
other products).

Here is a starter patch to add it. To avoid a shift/reduce conflict,
I had to reclassify the keyword NEXT. I admit that I don't fully
understand the consequences of that change! Please let me know if you
think this could fly.

Best regards,
Thomas Munro

Attachment Content-Type Size
next-value-for-sequence.patch text/x-patch 4.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Wieck 2014-10-01 17:17:17 Re: pg_receivexlog and replication slots
Previous Message Ilya Kosmodemiansky 2014-10-01 16:19:05 Dynamic LWLock tracing via pg_stat_lwlock (proof of concept)