@@ -9820,6 +9820,27 @@ nextval('foo'::text) <lineannotation><literal>foo</literal> is looked up at
98209820 execute <function>nextval</function> concurrently, each will safely receive
98219821 a distinct sequence value.
98229822 </para>
9823+
9824+ <para>
9825+ If a sequence object has been created with default parameters,
9826+ successive <function>nextval</function> calls will return successive
9827+ values beginning with 1. Other behaviors can be obtained by using
9828+ special parameters in the <xref linkend="sql-createsequence"> command;
9829+ see its command reference page for more information.
9830+ </para>
9831+
9832+ <important>
9833+ <para>
9834+ To avoid blocking concurrent transactions that obtain numbers from the
9835+ same sequence, a <function>nextval</function> operation is never
9836+ rolled back; that is, once a value has been fetched it is considered
9837+ used, even if the transaction that did the
9838+ <function>nextval</function> later aborts. This means that aborted
9839+ transactions might leave unused <quote>holes</quote> in the sequence
9840+ of assigned values.
9841+ </para>
9842+ </important>
9843+
98239844 </listitem>
98249845 </varlistentry>
98259846
@@ -9883,31 +9904,18 @@ SELECT setval('foo', 42, false); <lineannotation>Next <function>nextval</> wi
98839904 The result returned by <function>setval</function> is just the value of its
98849905 second argument.
98859906 </para>
9907+ <important>
9908+ <para>
9909+ Because sequences are non-transactional, changes made by
9910+ <function>setval</function> are not undone if the transaction rolls
9911+ back.
9912+ </para>
9913+ </important>
98869914 </listitem>
98879915 </varlistentry>
98889916 </variablelist>
98899917 </para>
98909918
9891- <para>
9892- If a sequence object has been created with default parameters,
9893- successive <function>nextval</function> calls will return successive values
9894- beginning with 1. Other behaviors can be obtained by using
9895- special parameters in the <xref linkend="sql-createsequence"> command;
9896- see its command reference page for more information.
9897- </para>
9898-
9899- <important>
9900- <para>
9901- To avoid blocking concurrent transactions that obtain numbers from the
9902- same sequence, a <function>nextval</function> operation is never rolled back;
9903- that is, once a value has been fetched it is considered used, even if the
9904- transaction that did the <function>nextval</function> later aborts. This means
9905- that aborted transactions might leave unused <quote>holes</quote> in the
9906- sequence of assigned values. <function>setval</function> operations are never
9907- rolled back, either.
9908- </para>
9909- </important>
9910-
99119919 </sect1>
99129920
99139921