or last set by <command>ALTER SEQUENCE START WITH</command>.
</para>
<para>
In contrast to a <function>setval</function> call,
a <literal>RESTART</literal> operation on a sequence is transactional
and blocks concurrent transactions from obtaining numbers from the
same sequence. If that's not the desired mode of
operation, <function>setval</function> should be used.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">cache</replaceable></term>
<listitem>
<para>
The clause <literal>CACHE <replaceable
class="parameter">cache</replaceable></literal> enables
sequence numbers to be preallocated and stored in memory for
faster access. The minimum value is 1 (only one value can be
generated at a time, i.e., no cache). If unspecified, the old
cache value will be maintained.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>SET { LOGGED | UNLOGGED }</literal></term>
<listitem>
<para>
This form changes the sequence from unlogged to logged or vice-versa
(see <xref linkend="sql-createsequence"/>). It cannot be applied to a
temporary sequence.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>OWNED BY</literal> <replaceable class="parameter">table_name</replaceable>.<replaceable class="parameter">column_name</replaceable></term>
<term><literal>OWNED BY NONE</literal></term>
<listitem>
<para>
The <literal>OWNED BY</literal> option causes the sequence to be
associated with a specific table column, such that if that column
(or its whole table) is dropped, the sequence will be automatically
dropped as well. If specified, this association replaces any
previously specified association for the sequence. The specified
table must have the same owner and be in the same schema as the
sequence.
Specifying <literal>OWNED BY NONE</literal> removes any existing
association, making the sequence <quote>free-standing</quote>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">new_owner</replaceable></term>
<listitem>
<para>
The user name of the new owner of the sequence.
</para>