Content-Length: 257424 | pFad | http://github.com/postgrespro/postgres_cluster/commit/700bab9c49e7476f5be372a4fc0ea7b526c622a0

90 Support monotonic sequences · postgrespro/postgres_cluster@700bab9 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/700bab9c49e7476f5be372a4fc0ea7b526c622a0

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy