From c677f2b09f24a1a92789bcbc0ee6599cfd034f27 Mon Sep 17 00:00:00 2001 From: Amit Kapila Date: Tue, 18 Nov 2025 03:48:00 +0000 Subject: [PATCH] Doc: Use markup for sequence fields. Following commit 980a855c5c, update documentation to use for sequence columns. Previously, these were incorrectly marked up as . Author: Peter Smith Reviewed-by: Chao Li Discussion: https://postgr.es/m/CAHut+PtpDMUE3Kd1p=1ff9pw2HMbgQCpowE_0Hd6gs5v2pKfQg@mail.gmail.com --- doc/src/sgml/func/func-sequence.sgml | 8 ++++---- doc/src/sgml/ref/alter_sequence.sgml | 4 ++-- doc/src/sgml/ref/create_sequence.sgml | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/src/sgml/func/func-sequence.sgml b/doc/src/sgml/func/func-sequence.sgml index e8d42b27c21..4a2a6dc9369 100644 --- a/doc/src/sgml/func/func-sequence.sgml +++ b/doc/src/sgml/func/func-sequence.sgml @@ -67,14 +67,14 @@ Sets the sequence object's current value, and optionally - its is_called flag. The two-parameter - form sets the sequence's last_value field to the - specified value and sets its is_called field to + its is_called flag. The two-parameter + form sets the sequence's last_value field to the + specified value and sets its is_called field to true, meaning that the next nextval will advance the sequence before returning a value. The value that will be reported by currval is also set to the specified value. - In the three-parameter form, is_called can be set + In the three-parameter form, is_called can be set to either true or false. true has the same effect as the two-parameter form. If it is set diff --git a/doc/src/sgml/ref/alter_sequence.sgml b/doc/src/sgml/ref/alter_sequence.sgml index a998ccc7ead..db7b98fdf8b 100644 --- a/doc/src/sgml/ref/alter_sequence.sgml +++ b/doc/src/sgml/ref/alter_sequence.sgml @@ -207,8 +207,8 @@ ALTER SEQUENCE [ IF EXISTS ] name S The optional clause RESTART [ WITH restart ] changes the current value of the sequence. This is similar to calling the - setval function with is_called = - false: the specified value will be returned by the + setval function with is_called + = false: the specified value will be returned by the next call of nextval. Writing RESTART with no restart value is equivalent to supplying diff --git a/doc/src/sgml/ref/create_sequence.sgml b/doc/src/sgml/ref/create_sequence.sgml index 1e283f13d15..0ffcd0febd1 100644 --- a/doc/src/sgml/ref/create_sequence.sgml +++ b/doc/src/sgml/ref/create_sequence.sgml @@ -70,7 +70,7 @@ SELECT * FROM name; to examine the parameters and current state of a sequence. In particular, - the last_value field of the sequence shows the last value + the last_value field of the sequence shows the last value allocated by any session. (Of course, this value might be obsolete by the time it's printed, if other sessions are actively doing nextval calls.) @@ -295,7 +295,7 @@ SELECT * FROM name; used for a sequence object that will be used concurrently by multiple sessions. Each session will allocate and cache successive sequence values during one access to the sequence object and - increase the sequence object's last_value accordingly. + increase the sequence object's last_value accordingly. Then, the next cache-1 uses of nextval within that session simply return the preallocated values without touching the sequence object. So, any @@ -319,7 +319,7 @@ SELECT * FROM name; class="parameter">cache setting greater than one you should only assume that the nextval values are all distinct, not that they are generated purely sequentially. Also, - last_value will reflect the latest value reserved by + last_value will reflect the latest value reserved by any session, whether or not it has yet been returned by nextval.