summaryrefslogtreecommitdiff
path: root/doc/src/sgml/ref/create_sequence.sgml
diff options
context:
space:
mode:
authorTom Lane2002-04-23 02:07:16 +0000
committerTom Lane2002-04-23 02:07:16 +0000
commit0c1fe3d2b99a658b2fe03e27338e819b52357cf3 (patch)
tree42198cbcc6ede7a854ff7d77e6b117c98337abf9 /doc/src/sgml/ref/create_sequence.sgml
parent5dd1c713d063eb949039254f10defdc0c7d5f66d (diff)
Update SQL-command reference pages for schema features.
Diffstat (limited to 'doc/src/sgml/ref/create_sequence.sgml')
-rw-r--r--doc/src/sgml/ref/create_sequence.sgml17
1 files changed, 14 insertions, 3 deletions
diff --git a/doc/src/sgml/ref/create_sequence.sgml b/doc/src/sgml/ref/create_sequence.sgml
index 1199ee4b64d..5df6618bfa8 100644
--- a/doc/src/sgml/ref/create_sequence.sgml
+++ b/doc/src/sgml/ref/create_sequence.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_sequence.sgml,v 1.26 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_sequence.sgml,v 1.27 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -43,7 +43,8 @@ CREATE [ TEMPORARY | TEMP ] SEQUENCE <replaceable class="parameter">seqname</rep
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.
+ (in this session) while the temporary sequence exists, unless
+ they are referenced with schema-qualified names.
</para>
</listitem>
</varlistentry>
@@ -52,7 +53,7 @@ CREATE [ TEMPORARY | TEMP ] SEQUENCE <replaceable class="parameter">seqname</rep
<term><replaceable class="parameter">seqname</replaceable></term>
<listitem>
<para>
- The name of a sequence to be created.
+ The name (optionally schema-qualified) of a sequence to be created.
</para>
</listitem>
</varlistentry>
@@ -229,6 +230,16 @@ ERROR: DefineSequence: MINVALUE (<replaceable class="parameter">min</replaceabl
</para>
<para>
+ If a schema name is given then the sequence is created in the
+ specified schema. Otherwise it is created in the current schema (the one
+ at the front of the search path; see <literal>CURRENT_SCHEMA()</>).
+ TEMP sequences exist in a special schema, so a schema name may not be
+ given when creating a TEMP sequence.
+ The sequence name must be distinct from the name of any other sequence,
+ table, index, or view in the same schema.
+ </para>
+
+ <para>
After a sequence is created, you use the functions
<function>nextval</function>,
<function>currval</function> and