Skip to content

Commit 700bab9

Browse files
committed
Support monotonic sequences
1 parent d7e9e02 commit 700bab9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/commands/sequence.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,8 @@ void AdjustSequence(Oid relid, int64 next)
882882
{
883883
Assert(next >= seq->min_value && next <= seq->max_value);
884884

885+
next = last + elm->increment*((next - last + elm->increment)/elm->increment);
886+
885887
/* Set the currval() state only if iscalled = true */
886888
if (seq->is_called)
887889
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy