<literal>TEMP</literal></term>
<listitem>
<para>
If specified, the sequence object is created only for this
session, and is automatically dropped on session exit. Existing
permanent sequences with the same name are not visible (in this
session) while the temporary sequence exists, unless they are
referenced with schema-qualified names.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>UNLOGGED</literal></term>
<listitem>
<para>
If specified, the sequence is created as an unlogged sequence. Changes
to unlogged sequences are not written to the write-ahead log. They are
not crash-safe: an unlogged sequence is automatically reset to its
initial state after a crash or unclean shutdown. Unlogged sequences are
also not replicated to standby servers.
</para>
<para>
Unlike unlogged tables, unlogged sequences do not offer a significant
performance advantage. This option is mainly intended for sequences
associated with unlogged tables via identity columns or serial columns.
In those cases, it usually wouldn't make sense to have the sequence
WAL-logged and replicated but not its associated table.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>IF NOT EXISTS</literal></term>
<listitem>
<para>
Do not throw an error if a relation with the same name already exists.
A notice is issued in this case. Note that there is no guarantee that
the existing relation is anything like the sequence that would have
been created — it might not even be a sequence.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">name</replaceable></term>
<listitem>
<para>
The name (optionally schema-qualified) of the sequence to be created.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">data_type</replaceable></term>
<listitem>
<para>
The optional
clause <literal>AS <replaceable class="parameter">data_type</replaceable></literal>
specifies the data type of the sequence. Valid types are
<literal>smallint</literal>, <literal>integer</literal>,
and <literal>bigint</literal>. <literal>bigint</literal> is the
default. The data type determines the default minimum and maximum
values of the sequence.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">increment</replaceable></term>
<listitem>
<para>
The optional clause <literal>INCREMENT BY <replaceable
class="parameter">increment</replaceable></literal> specifies
which value is added to the current sequence value to create a
new value. A positive value will make an ascending sequence, a
negative one a descending sequence. The default value is 1.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">minvalue</replaceable></term>
<term><literal>NO MINVALUE</literal></term>
<listitem>
<para>
The optional clause <literal>MINVALUE <replaceable
class="parameter">minvalue</replaceable></literal> determines
the minimum value a sequence can generate. If this clause is not
supplied or <option>NO MINVALUE</option> is specified, then
defaults will be used. The default for an ascending sequence is 1. The
default for a descending sequence is the minimum value of the data type.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><replaceable class="parameter">maxvalue</replaceable></term>
<term><literal>NO MAXVALUE</literal></term>
<listitem>
<para>
The optional clause <literal>MAXVALUE <replaceable
class="parameter">maxvalue</replaceable></literal> determines
the maximum value