mirror of
https://github.com/postgres/postgres.git
synced 2025-11-19 13:42:17 +03:00
Doc: Use <structfield> markup for sequence fields.
Following commit 980a855c5c, update documentation to use <structfield> for
sequence columns. Previously, these were incorrectly marked up as <literal>.
Author: Peter Smith <smithpb2250@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CAHut+PtpDMUE3Kd1p=1ff9pw2HMbgQCpowE_0Hd6gs5v2pKfQg@mail.gmail.com
This commit is contained in:
@@ -67,14 +67,14 @@
|
|||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
Sets the sequence object's current value, and optionally
|
Sets the sequence object's current value, and optionally
|
||||||
its <literal>is_called</literal> flag. The two-parameter
|
its <structfield>is_called</structfield> flag. The two-parameter
|
||||||
form sets the sequence's <literal>last_value</literal> field to the
|
form sets the sequence's <structfield>last_value</structfield> field to the
|
||||||
specified value and sets its <literal>is_called</literal> field to
|
specified value and sets its <structfield>is_called</structfield> field to
|
||||||
<literal>true</literal>, meaning that the next
|
<literal>true</literal>, meaning that the next
|
||||||
<function>nextval</function> will advance the sequence before
|
<function>nextval</function> will advance the sequence before
|
||||||
returning a value. The value that will be reported
|
returning a value. The value that will be reported
|
||||||
by <function>currval</function> is also set to the specified value.
|
by <function>currval</function> is also set to the specified value.
|
||||||
In the three-parameter form, <literal>is_called</literal> can be set
|
In the three-parameter form, <structfield>is_called</structfield> can be set
|
||||||
to either <literal>true</literal>
|
to either <literal>true</literal>
|
||||||
or <literal>false</literal>. <literal>true</literal> has the same
|
or <literal>false</literal>. <literal>true</literal> has the same
|
||||||
effect as the two-parameter form. If it is set
|
effect as the two-parameter form. If it is set
|
||||||
|
|||||||
@@ -207,8 +207,8 @@ ALTER SEQUENCE [ IF EXISTS ] <replaceable class="parameter">name</replaceable> S
|
|||||||
The optional clause <literal>RESTART [ WITH <replaceable
|
The optional clause <literal>RESTART [ WITH <replaceable
|
||||||
class="parameter">restart</replaceable> ]</literal> changes the
|
class="parameter">restart</replaceable> ]</literal> changes the
|
||||||
current value of the sequence. This is similar to calling the
|
current value of the sequence. This is similar to calling the
|
||||||
<function>setval</function> function with <literal>is_called</literal> =
|
<function>setval</function> function with <structfield>is_called</structfield>
|
||||||
<literal>false</literal>: the specified value will be returned by the
|
= <literal>false</literal>: the specified value will be returned by the
|
||||||
<emphasis>next</emphasis> call of <function>nextval</function>.
|
<emphasis>next</emphasis> call of <function>nextval</function>.
|
||||||
Writing <literal>RESTART</literal> with no <replaceable
|
Writing <literal>RESTART</literal> with no <replaceable
|
||||||
class="parameter">restart</replaceable> value is equivalent to supplying
|
class="parameter">restart</replaceable> value is equivalent to supplying
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ SELECT * FROM <replaceable>name</replaceable>;
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
to examine the parameters and current state of a sequence. In particular,
|
to examine the parameters and current state of a sequence. In particular,
|
||||||
the <literal>last_value</literal> field of the sequence shows the last value
|
the <structfield>last_value</structfield> field of the sequence shows the last value
|
||||||
allocated by any session. (Of course, this value might be obsolete
|
allocated by any session. (Of course, this value might be obsolete
|
||||||
by the time it's printed, if other sessions are actively doing
|
by the time it's printed, if other sessions are actively doing
|
||||||
<function>nextval</function> calls.)
|
<function>nextval</function> calls.)
|
||||||
@@ -295,7 +295,7 @@ SELECT * FROM <replaceable>name</replaceable>;
|
|||||||
used for a sequence object that will be used concurrently by
|
used for a sequence object that will be used concurrently by
|
||||||
multiple sessions. Each session will allocate and cache successive
|
multiple sessions. Each session will allocate and cache successive
|
||||||
sequence values during one access to the sequence object and
|
sequence values during one access to the sequence object and
|
||||||
increase the sequence object's <literal>last_value</literal> accordingly.
|
increase the sequence object's <structfield>last_value</structfield> accordingly.
|
||||||
Then, the next <replaceable class="parameter">cache</replaceable>-1
|
Then, the next <replaceable class="parameter">cache</replaceable>-1
|
||||||
uses of <function>nextval</function> within that session simply return the
|
uses of <function>nextval</function> within that session simply return the
|
||||||
preallocated values without touching the sequence object. So, any
|
preallocated values without touching the sequence object. So, any
|
||||||
@@ -319,7 +319,7 @@ SELECT * FROM <replaceable>name</replaceable>;
|
|||||||
class="parameter">cache</replaceable> setting greater than one you
|
class="parameter">cache</replaceable> setting greater than one you
|
||||||
should only assume that the <function>nextval</function> values are all
|
should only assume that the <function>nextval</function> values are all
|
||||||
distinct, not that they are generated purely sequentially. Also,
|
distinct, not that they are generated purely sequentially. Also,
|
||||||
<literal>last_value</literal> will reflect the latest value reserved by
|
<structfield>last_value</structfield> will reflect the latest value reserved by
|
||||||
any session, whether or not it has yet been returned by
|
any session, whether or not it has yet been returned by
|
||||||
<function>nextval</function>.
|
<function>nextval</function>.
|
||||||
</para>
|
</para>
|
||||||
|
|||||||
Reference in New Issue
Block a user