aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-04-23 02:07:16 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-04-23 02:07:16 +0000
commit0c1fe3d2b99a658b2fe03e27338e819b52357cf3 (patch)
tree42198cbcc6ede7a854ff7d77e6b117c98337abf9 /doc/src
parent5dd1c713d063eb949039254f10defdc0c7d5f66d (diff)
downloadpostgresql-0c1fe3d2b99a658b2fe03e27338e819b52357cf3.tar.gz
postgresql-0c1fe3d2b99a658b2fe03e27338e819b52357cf3.zip
Update SQL-command reference pages for schema features.
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/ref/alter_database.sgml14
-rw-r--r--doc/src/sgml/ref/alter_table.sgml191
-rw-r--r--doc/src/sgml/ref/analyze.sgml5
-rw-r--r--doc/src/sgml/ref/cluster.sgml4
-rw-r--r--doc/src/sgml/ref/comment.sgml10
-rw-r--r--doc/src/sgml/ref/copy.sgml4
-rw-r--r--doc/src/sgml/ref/create_aggregate.sgml18
-rw-r--r--doc/src/sgml/ref/create_constraint.sgml7
-rw-r--r--doc/src/sgml/ref/create_domain.sgml25
-rw-r--r--doc/src/sgml/ref/create_function.sgml18
-rw-r--r--doc/src/sgml/ref/create_index.sgml12
-rw-r--r--doc/src/sgml/ref/create_operator.sgml16
-rw-r--r--doc/src/sgml/ref/create_sequence.sgml17
-rw-r--r--doc/src/sgml/ref/create_table.sgml25
-rw-r--r--doc/src/sgml/ref/create_table_as.sgml20
-rw-r--r--doc/src/sgml/ref/create_type.sgml24
-rw-r--r--doc/src/sgml/ref/create_view.sgml24
-rw-r--r--doc/src/sgml/ref/delete.sgml4
-rw-r--r--doc/src/sgml/ref/drop_aggregate.sgml8
-rw-r--r--doc/src/sgml/ref/drop_domain.sgml4
-rw-r--r--doc/src/sgml/ref/drop_function.sgml6
-rw-r--r--doc/src/sgml/ref/drop_index.sgml4
-rw-r--r--doc/src/sgml/ref/drop_operator.sgml6
-rw-r--r--doc/src/sgml/ref/drop_rule.sgml5
-rw-r--r--doc/src/sgml/ref/drop_sequence.sgml4
-rw-r--r--doc/src/sgml/ref/drop_table.sgml14
-rw-r--r--doc/src/sgml/ref/drop_trigger.sgml6
-rw-r--r--doc/src/sgml/ref/drop_type.sgml4
-rw-r--r--doc/src/sgml/ref/drop_view.sgml8
-rw-r--r--doc/src/sgml/ref/insert.sgml4
-rw-r--r--doc/src/sgml/ref/lock.sgml4
-rw-r--r--doc/src/sgml/ref/reindex.sgml5
-rw-r--r--doc/src/sgml/ref/select.sgml15
-rw-r--r--doc/src/sgml/ref/select_into.sgml16
-rw-r--r--doc/src/sgml/ref/truncate.sgml4
-rw-r--r--doc/src/sgml/ref/update.sgml4
-rw-r--r--doc/src/sgml/ref/vacuum.sgml6
-rw-r--r--doc/src/sgml/reference.sgml6
38 files changed, 366 insertions, 205 deletions
diff --git a/doc/src/sgml/ref/alter_database.sgml b/doc/src/sgml/ref/alter_database.sgml
index b1aa34262a1..a7e81d22d9a 100644
--- a/doc/src/sgml/ref/alter_database.sgml
+++ b/doc/src/sgml/ref/alter_database.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_database.sgml,v 1.1 2002/03/01 22:45:07 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_database.sgml,v 1.2 2002/04/23 02:07:15 tgl Exp $
PostgreSQL documentation
-->
@@ -28,15 +28,16 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> RESET <replacea
<command>ALTER DATABASE</command> is used to change the session
default of a run-time configuration variable for a
<productname>PostgreSQL</productname> database. Whenever a new
- session is subsequently started, <literal>SET
+ session is subsequently started in that database, <literal>SET
<replaceable>variable</replaceable> TO
<replaceable>value</replaceable></literal> is effectively executed
- before the start of the session.
+ before the start of the session. The database-specific default
+ overrides whatever setting is present in <filename>postgresql.conf</>
+ or has been received from the postmaster.
</para>
<para>
- Only a database owner can change the session defaults for a
- database. Superusers can change the session defaults of any
+ Only a superuser or the database owner can change the session defaults for a
database.
</para>
@@ -113,7 +114,8 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable> RESET <replacea
<para>
Using <xref linkend="sql-alteruser" endterm="sql-alteruser-title">,
it is also possible to tie a session default to a specific user
- rather than a database.
+ rather than a database. User-specific settings override database-specific
+ ones if there is a conflict.
</para>
</refsect1>
diff --git a/doc/src/sgml/ref/alter_table.sgml b/doc/src/sgml/ref/alter_table.sgml
index 6c9c01c8853..b131a11638a 100644
--- a/doc/src/sgml/ref/alter_table.sgml
+++ b/doc/src/sgml/ref/alter_table.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.42 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/alter_table.sgml,v 1.43 2002/04/23 02:07:15 tgl Exp $
PostgreSQL documentation
-->
@@ -24,23 +24,22 @@ PostgreSQL documentation
ALTER TABLE [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ * ]
ADD [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> <replaceable class="PARAMETER">type</replaceable> [ <replaceable class="PARAMETER">column_constraint</replaceable> [ ... ] ]
ALTER TABLE [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ * ]
- ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> { SET DEFAULT <replaceable
- class="PARAMETER">value</replaceable> | DROP DEFAULT }
+ ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> { SET DEFAULT <replaceable class="PARAMETER">value</replaceable> | DROP DEFAULT }
ALTER TABLE [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ * ]
ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> { SET | DROP } NOT NULL
ALTER TABLE [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ * ]
ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET STATISTICS <replaceable class="PARAMETER">integer</replaceable>
ALTER TABLE [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ * ]
- ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET STORAGE {PLAIN | EXTERNAL | EXTENDED | MAIN}
+ ALTER [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN }
ALTER TABLE [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ * ]
RENAME [ COLUMN ] <replaceable class="PARAMETER">column</replaceable> TO <replaceable
- class="PARAMETER">newcolumn</replaceable>
+ class="PARAMETER">new_column</replaceable>
ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
RENAME TO <replaceable class="PARAMETER">new_table</replaceable>
ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
ADD <replaceable class="PARAMETER">table_constraint_definition</replaceable>
ALTER TABLE [ ONLY ] <replaceable class="PARAMETER">table</replaceable>
- DROP CONSTRAINT <replaceable class="PARAMETER">constraint</replaceable> { RESTRICT | CASCADE }
+ DROP CONSTRAINT <replaceable class="PARAMETER">constraint_name</replaceable> { RESTRICT | CASCADE }
ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
OWNER TO <replaceable class="PARAMETER">new_owner</replaceable>
</synopsis>
@@ -58,7 +57,7 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
<term><replaceable class="PARAMETER"> table </replaceable></term>
<listitem>
<para>
- The name of an existing table to alter.
+ The name (possibly schema-qualified) of an existing table to alter.
</para>
</listitem>
</varlistentry>
@@ -82,7 +81,7 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
</varlistentry>
<varlistentry>
- <term><replaceable class="PARAMETER"> newcolumn </replaceable></term>
+ <term><replaceable class="PARAMETER"> new_column </replaceable></term>
<listitem>
<para>
New name for an existing column.
@@ -103,7 +102,16 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
<term><replaceable class="PARAMETER"> table_constraint_definition </replaceable></term>
<listitem>
<para>
- New table constraint for the table
+ New table constraint for the table.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="PARAMETER"> constraint_name </replaceable></term>
+ <listitem>
+ <para>
+ Name of an existing constraint to drop.
</para>
</listitem>
</varlistentry>
@@ -162,44 +170,124 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
</title>
<para>
<command>ALTER TABLE</command> changes the definition of an existing table.
- The <literal>ADD COLUMN</literal> form adds a new column to the table
- using the same syntax as <xref linkend="SQL-CREATETABLE" endterm="SQL-CREATETABLE-TITLE">.
- The <literal>ALTER COLUMN SET/DROP DEFAULT</literal> forms
- allow you to set or remove the default for the column. Note that defaults
- only apply to subsequent <command>INSERT</command> commands; they do not
- cause rows already in the table to change.
- The <literal>ALTER COLUMN SET/DROP NOT NULL</literal> forms allow you to
- change whether a column is marked to allow NULL values or to reject NULL
- values.
- The <literal>ALTER COLUMN SET STATISTICS</literal> form allows you to
- set the statistics-gathering target for subsequent
- <xref linkend="sql-analyze" endterm="sql-analyze-title"> operations.
- The <literal>ALTER COLUMN SET STORAGE</literal> form allows the
- column storage mode to be set. This controls whether this column is
- held inline or in a supplementary table, and whether the data
- should be compressed or not. <literal>PLAIN</literal> must be used
- for fixed-length values such as <literal>INTEGER</literal> and is
- inline, uncompressed. <literal>MAIN</literal> is for inline,
- compressible data. <literal>EXTERNAL</literal> is for external,
- uncompressed data and <literal>EXTENDED</literal> is for external,
- compressed data. The use of <literal>EXTERNAL</literal> will make
- substring operations on a column faster, at the penalty of
- increased storage space.
- The <literal>RENAME</literal> clause causes the name of a table,
- column, index, sequence or view to change without changing any of the
- data. The data will remain of the same type and size after the
- command is executed.
- The ADD <replaceable class="PARAMETER">table_constraint_definition</replaceable> clause
- adds a new constraint to the table using the same syntax as <xref
- linkend="SQL-CREATETABLE" endterm="SQL-CREATETABLE-TITLE">.
- The DROP CONSTRAINT <replaceable class="PARAMETER">constraint</replaceable> clause
- drops all constraints on the table (and its children) that match <replaceable class="PARAMETER">constraint</replaceable>.
- The OWNER clause changes the owner of the table, index, sequence or view to the
- user <replaceable class="PARAMETER">new user</replaceable>.
+ There are several sub-forms:
</para>
+ <variablelist>
+
+ <varlistentry>
+ <term>ADD COLUMN</term>
+ <listitem>
+ <para>
+ This form adds a new column to the table using the same syntax as
+ <xref linkend="SQL-CREATETABLE" endterm="SQL-CREATETABLE-TITLE">.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>SET/DROP DEFAULT</term>
+ <listitem>
+ <para>
+ These forms set or remove the default value for a column. Note
+ that defaults only apply to subsequent <command>INSERT</command>
+ commands; they do not cause rows already in the table to change.
+ Defaults may also be created for views, in which case they are
+ inserted into <command>INSERT</> statements on the view before
+ the view's ON INSERT rule is applied.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>SET/DROP NOT NULL</term>
+ <listitem>
+ <para>
+ These forms change whether a column is marked to allow NULL
+ values or to reject NULL values. You may only <literal>SET NOT NULL</>
+ when the table contains no NULLs in the column.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>SET STATISTICS</term>
+ <listitem>
+ <para>
+ This form
+ sets the per-column statistics-gathering target for subsequent
+ <xref linkend="sql-analyze" endterm="sql-analyze-title"> operations.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>SET STORAGE</term>
+ <listitem>
+ <para>
+ This form sets the storage mode for a column. This controls whether this
+ column is held inline or in a supplementary table, and whether the data
+ should be compressed or not. <literal>PLAIN</literal> must be used
+ for fixed-length values such as <literal>INTEGER</literal> and is
+ inline, uncompressed. <literal>MAIN</literal> is for inline,
+ compressible data. <literal>EXTERNAL</literal> is for external,
+ uncompressed data and <literal>EXTENDED</literal> is for external,
+ compressed data. <literal>EXTENDED</literal> is the default for all
+ datatypes that support it. The use of <literal>EXTERNAL</literal> will
+ make substring operations on a TEXT column faster, at the penalty of
+ increased storage space.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>RENAME</term>
+ <listitem>
+ <para>
+ The <literal>RENAME</literal> forms change the name of a table
+ (or an index, sequence, or view) or the name of an individual column in
+ a table. There is no effect on the stored data.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>ADD <replaceable class="PARAMETER">table_constraint_definition</replaceable></term>
+ <listitem>
+ <para>
+ This form adds a new constraint to a table using the same syntax as
+ <xref linkend="SQL-CREATETABLE" endterm="SQL-CREATETABLE-TITLE">.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>DROP CONSTRAINT</term>
+ <listitem>
+ <para>
+ This form drops constraints on a table (and its children).
+ Currently, constraints on tables are not required to have unique
+ names, so there may be more than one constraint matching the specified
+ name. All such constraints will be dropped.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>OWNER</term>
+ <listitem>
+ <para>
+ This form changes the owner of the table, index, sequence or view to the
+ specified user.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+
<para>
- You must own the table in order to change its schema.
+ You must own the table to use <command>ALTER TABLE</>; except for
+ <command>ALTER TABLE OWNER</>, which may only be executed by a superuser.
</para>
<refsect2 id="R2-SQL-ALTERTABLE-3">
@@ -216,16 +304,20 @@ ALTER TABLE <replaceable class="PARAMETER">table</replaceable>
<para>
In the current implementation of <literal>ADD COLUMN</literal>,
default and NOT NULL clauses for the new column are not supported.
+ The new column always comes into being with all values NULL.
You can use the <literal>SET DEFAULT</literal> form
- of <command>ALTER TABLE</command> to set the default later.
+ of <command>ALTER TABLE</command> to set the default afterwards.
(You may also want to update the already existing rows to the
- new default value, using <xref linkend="sql-update" endterm="sql-update-title">.)
+ new default value, using
+ <xref linkend="sql-update" endterm="sql-update-title">.)
+ If you want to mark the column non-null, use the <literal>SET NOT NULL</>
+ form after you've entered non-null values for the column in all rows.
</para>
<para>
In DROP CONSTRAINT, the RESTRICT keyword is required, although
dependencies are not yet checked. The CASCADE option is unsupported.
- Currently DROP CONSTRAINT drops only CHECK constraints.
+ Currently DROP CONSTRAINT only handles CHECK constraints.
To remove a PRIMARY or UNIQUE constraint, drop the
relevant index using the <xref linkend="SQL-DROPINDEX" endterm="sql-dropindex-title"> command.
To remove FOREIGN KEY constraints you need to recreate
@@ -243,16 +335,15 @@ DROP TABLE temp;
</para>
<para>
- You must own the table in order to change it.
Changing any part of the schema of a system
catalog is not permitted.
- The <citetitle>PostgreSQL User's Guide</citetitle> has further
- information on inheritance.
</para>
<para>
Refer to <command>CREATE TABLE</command> for a further description
of valid arguments.
+ The <citetitle>PostgreSQL User's Guide</citetitle> has further
+ information on inheritance.
</para>
</refsect2>
</refsect1>
diff --git a/doc/src/sgml/ref/analyze.sgml b/doc/src/sgml/ref/analyze.sgml
index 7c92bb614fa..5fbef560dec 100644
--- a/doc/src/sgml/ref/analyze.sgml
+++ b/doc/src/sgml/ref/analyze.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/analyze.sgml,v 1.7 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/analyze.sgml,v 1.8 2002/04/23 02:07:15 tgl Exp $
PostgreSQL documentation
-->
@@ -46,7 +46,8 @@ ANALYZE [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> [ (<rep
<term><replaceable class="PARAMETER">table</replaceable></term>
<listitem>
<para>
- The name of a specific table to analyze. Defaults to all tables.
+ The name (possibly schema-qualified) of a specific table to
+ analyze. Defaults to all tables in the current database.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/cluster.sgml b/doc/src/sgml/ref/cluster.sgml
index 8bd948ef588..c8499ca0581 100644
--- a/doc/src/sgml/ref/cluster.sgml
+++ b/doc/src/sgml/ref/cluster.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/cluster.sgml,v 1.15 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/cluster.sgml,v 1.16 2002/04/23 02:07:15 tgl Exp $
PostgreSQL documentation
-->
@@ -46,7 +46,7 @@ CLUSTER <replaceable class="PARAMETER">indexname</replaceable> ON <replaceable c
<term><replaceable class="PARAMETER">table</replaceable></term>
<listitem>
<para>
- The name of a table.
+ The name (possibly schema-qualified) of a table.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/comment.sgml b/doc/src/sgml/ref/comment.sgml
index 27d4f3f016e..ae6092f1a2d 100644
--- a/doc/src/sgml/ref/comment.sgml
+++ b/doc/src/sgml/ref/comment.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.17 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/comment.sgml,v 1.18 2002/04/23 02:07:15 tgl Exp $
PostgreSQL documentation
-->
@@ -44,11 +44,13 @@ COMMENT ON
<variablelist>
<varlistentry>
- <term><replaceable class="PARAMETER">object_name, table_name,
- column_name, agg_name, func_name, op, rule_name, trigger_name</replaceable></term>
+ <term><replaceable class="PARAMETER">object_name,
+ table_name.column_name, agg_name, func_name, op, rule_name, trigger_name</replaceable></term>
<listitem>
<para>
- The name of the object to be be commented.
+ The name of the object to be be commented. Names of tables,
+ indexes, sequences, views, types, domains, functions, aggregates,
+ and operators may be schema-qualified.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/copy.sgml b/doc/src/sgml/ref/copy.sgml
index a2bbd1c0aaf..95958e95807 100644
--- a/doc/src/sgml/ref/copy.sgml
+++ b/doc/src/sgml/ref/copy.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.29 2002/03/22 19:20:37 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/copy.sgml,v 1.30 2002/04/23 02:07:15 tgl Exp $
PostgreSQL documentation
-->
@@ -56,7 +56,7 @@ COPY [ BINARY ] <replaceable class="parameter">table</replaceable> [ WITH OIDS ]
<term><replaceable class="parameter">table</replaceable></term>
<listitem>
<para>
- The name of an existing table.
+ The name (possibly schema-qualified) of an existing table.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/create_aggregate.sgml b/doc/src/sgml/ref/create_aggregate.sgml
index babbaedbc43..0c326b6f8db 100644
--- a/doc/src/sgml/ref/create_aggregate.sgml
+++ b/doc/src/sgml/ref/create_aggregate.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_aggregate.sgml,v 1.18 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_aggregate.sgml,v 1.19 2002/04/23 02:07:15 tgl Exp $
PostgreSQL documentation
-->
@@ -41,7 +41,8 @@ CREATE AGGREGATE <replaceable class="PARAMETER">name</replaceable> ( BASETYPE =
<term><replaceable class="PARAMETER">name</replaceable></term>
<listitem>
<para>
- The name of an aggregate function to create.
+ The name (optionally schema-qualified) of an aggregate function to
+ create.
</para>
</listitem>
</varlistentry>
@@ -164,11 +165,18 @@ CREATE
can be used to provide the desired features.
</para>
<para>
+ If a schema name is given (for example, <literal>CREATE AGGREGATE
+ myschema.myagg ...</>) then the aggregate function 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()</>).
+ </para>
+ <para>
An aggregate function is identified by its name and input data type.
- Two aggregates can have the same name if they operate on different
- input types. The
+ Two aggregates in the same schema can have the same name if they operate on
+ different input types. The
name and input data type of an aggregate must also be distinct from
- the name and input data type of every ordinary function.
+ the name and input data type(s) of every ordinary function in the same
+ schema.
</para>
<para>
An aggregate function is made from one or two ordinary
diff --git a/doc/src/sgml/ref/create_constraint.sgml b/doc/src/sgml/ref/create_constraint.sgml
index 76d41fd345f..c5af73ad42a 100644
--- a/doc/src/sgml/ref/create_constraint.sgml
+++ b/doc/src/sgml/ref/create_constraint.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_constraint.sgml,v 1.6 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_constraint.sgml,v 1.7 2002/04/23 02:07:15 tgl Exp $
PostgreSQL documentation
-->
@@ -56,7 +56,8 @@ CREATE CONSTRAINT TRIGGER <replaceable class="parameter">name</replaceable>
<term><replaceable class="PARAMETER">relation</replaceable></term>
<listitem>
<para>
- Table name of the triggering relation.
+ The name (possibly schema-qualified) of the relation in which
+ the triggering events occur.
</para>
</listitem>
</varlistentry>
@@ -118,7 +119,7 @@ CREATE CONSTRAINT
Description
</title>
<para>
- <command>CREATE CONSTRAINT TRIGGER</command> is used from inside of
+ <command>CREATE CONSTRAINT TRIGGER</command> is used within
<command>CREATE/ALTER TABLE</command> and by
<application>pg_dump</application> to create the special triggers for
referential integrity.
diff --git a/doc/src/sgml/ref/create_domain.sgml b/doc/src/sgml/ref/create_domain.sgml
index 222d49da5d1..6a8401a62b3 100644
--- a/doc/src/sgml/ref/create_domain.sgml
+++ b/doc/src/sgml/ref/create_domain.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_domain.sgml,v 1.4 2002/03/20 19:43:28 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_domain.sgml,v 1.5 2002/04/23 02:07:15 tgl Exp $
PostgreSQL documentation
-->
@@ -47,7 +47,7 @@ where <replaceable class="PARAMETER">constraint</replaceable> is:
<term><replaceable class="parameter">domainname</replaceable></term>
<listitem>
<para>
- The name of a domain to be created.
+ The name (optionally schema-qualified) of a domain to be created.
</para>
</listitem>
</varlistentry>
@@ -56,7 +56,8 @@ where <replaceable class="PARAMETER">constraint</replaceable> is:
<term><replaceable class="PARAMETER">data_type</replaceable></term>
<listitem>
<para>
- The data type of the domain. This may include array specifiers.
+ The underlying data type of the domain. This may include array
+ specifiers.
Refer to the <citetitle>User's Guide</citetitle> for further
information about data types and arrays.
</para>
@@ -167,12 +168,18 @@ CREATE DOMAIN
</title>
<para>
- <command>CREATE DOMAIN</command> allows the user to register a new user data
- domain with PostgreSQL for use in the current data base. The
- user who defines a domain becomes its owner.
- <replaceable class="parameter">domainname</replaceable> is
- the name of the new type and must be unique within the
- types and domains defined for this database.
+ <command>CREATE DOMAIN</command> allows the user to register a new
+ data domain with <productname>PostgreSQL</> for use in the
+ current data base. The user who defines a domain becomes its owner.
+ </para>
+
+ <para>
+ If a schema name is given (for example, <literal>CREATE DOMAIN
+ myschema.mydomain ...</>) then the domain 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()</>).
+ The domain name must be unique among the types and domains existing
+ in its schema.
</para>
<para>
diff --git a/doc/src/sgml/ref/create_function.sgml b/doc/src/sgml/ref/create_function.sgml
index 9c47721dc54..18961336531 100644
--- a/doc/src/sgml/ref/create_function.sgml
+++ b/doc/src/sgml/ref/create_function.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.36 2002/04/11 19:59:55 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_function.sgml,v 1.37 2002/04/23 02:07:15 tgl Exp $
-->
<refentry id="SQL-CREATEFUNCTION">
@@ -44,9 +44,14 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
<listitem>
<para>
- The name of a function to create. The name need not be unique,
- because functions may be overloaded, but functions with the
- same name must have different argument types.
+ The name of a function to create. If a schema name is included,
+ then the function 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()</>).
+ The name of the new function must not match any existing function
+ with the same argument types in the same schema. However, functions of
+ different argument types may share a name (this is called
+ <firstterm>overloading</>).
</para>
</listitem>
</varlistentry>
@@ -332,8 +337,9 @@ CREATE [ OR REPLACE ] FUNCTION <replaceable class="parameter">name</replaceable>
</title>
<para>
A function that has one parameter and is named the same as its output
- datatype is considered to be a <firstterm>type coercion function</>:
- it can be invoked to convert a value of its input datatype into a value
+ datatype (including the schema name) is considered to be a <firstterm>type
+ coercion function</>: it can be invoked to convert a value of its input
+ datatype into a value
of its output datatype. For example,
<programlisting>
SELECT CAST(42 AS text);
diff --git a/doc/src/sgml/ref/create_index.sgml b/doc/src/sgml/ref/create_index.sgml
index b59fd6bd28a..637d4965a40 100644
--- a/doc/src/sgml/ref/create_index.sgml
+++ b/doc/src/sgml/ref/create_index.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.29 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_index.sgml,v 1.30 2002/04/23 02:07:15 tgl Exp $
PostgreSQL documentation
-->
@@ -56,7 +56,9 @@ CREATE [ UNIQUE ] INDEX <replaceable class="parameter">index_name</replaceable>
<term><replaceable class="parameter">index_name</replaceable></term>
<listitem>
<para>
- The name of the index to be created.
+ The name of the index to be created. No schema name can be included
+ here; the index is always created in the same schema as its parent
+ table.
</para>
</listitem>
</varlistentry>
@@ -65,7 +67,7 @@ CREATE [ UNIQUE ] INDEX <replaceable class="parameter">index_name</replaceable>
<term><replaceable class="parameter">table</replaceable></term>
<listitem>
<para>
- The name of the table to be indexed.
+ The name (possibly schema-qualified) of the table to be indexed.
</para>
</listitem>
</varlistentry>
@@ -270,11 +272,11 @@ ERROR: Cannot create index: 'index_name' already exists.
<para>
All functions and operators used in an index definition must be
- <firstterm>cacheable</>, that is, their results must depend only on
+ <firstterm>immutable</>, that is, their results must depend only on
their input arguments and never on any outside influence (such as
the contents of another table or the current time). This restriction
ensures that the behavior of the index is well-defined. To use a
- user-defined function in an index, remember to mark the function cacheable
+ user-defined function in an index, remember to mark the function immutable
when you create it.
</para>
diff --git a/doc/src/sgml/ref/create_operator.sgml b/doc/src/sgml/ref/create_operator.sgml
index beaf292fb08..b1371140f1e 100644
--- a/doc/src/sgml/ref/create_operator.sgml
+++ b/doc/src/sgml/ref/create_operator.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_operator.sgml,v 1.27 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_operator.sgml,v 1.28 2002/04/23 02:07:15 tgl Exp $
PostgreSQL documentation
-->
@@ -46,6 +46,8 @@ CREATE OPERATOR <replaceable>name</replaceable> ( PROCEDURE = <replaceable class
<listitem>
<para>
The operator to be defined. See below for allowable characters.
+ The name may be schema-qualified, for example
+ <literal>CREATE OPERATOR myschema.+ (...)</>.
</para>
</listitem>
</varlistentry>
@@ -200,6 +202,18 @@ CREATE
The user who defines an operator becomes its owner.
</para>
<para>
+ If a schema name is given then the operator 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()</>).
+ </para>
+ <para>
+ Two operators in the same schema can have the same name if they operate on
+ different data types. This is called <firstterm>overloading</>. The
+ system will attempt to pick the intended operator based on the actual
+ input data types when there is ambiguity.
+ </para>
+
+ <para>
The operator <replaceable class="parameter">name</replaceable>
is a sequence of up to <symbol>NAMEDATALEN</>-1 (31 by default) characters
from the following list:
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
diff --git a/doc/src/sgml/ref/create_table.sgml b/doc/src/sgml/ref/create_table.sgml
index 671a49d7390..936fe1ba3cc 100644
--- a/doc/src/sgml/ref/create_table.sgml
+++ b/doc/src/sgml/ref/create_table.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.53 2002/03/22 19:20:40 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table.sgml,v 1.54 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -55,16 +55,26 @@ and <replaceable class="PARAMETER">table_constraint</replaceable> is:
</para>
<para>
+ If a schema name is given (for example, <literal>CREATE TABLE
+ myschema.mytable ...</>) then the table 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 tables exist in a special schema, so a schema name may not be
+ given when creating a TEMP table.
+ The table name must be distinct from the name of any other table,
+ sequence, index, or view in the same schema.
+ </para>
+
+ <para>
<command>CREATE TABLE</command> also automatically creates a data
type that represents the tuple type (structure type) corresponding
to one row of the table. Therefore, tables cannot have the same
- name as any existing data type.
+ name as any existing data type in the same schema.
</para>
<para>
A table cannot have more than 1600 columns. (In practice, the
- effective limit is lower because of tuple-length constraints). A
- table cannot have the same name as a system catalog table.
+ effective limit is lower because of tuple-length constraints).
</para>
<para>
@@ -97,8 +107,9 @@ and <replaceable class="PARAMETER">table_constraint</replaceable> is:
<para>
If specified, the table is created as a temporary table.
Temporary tables are automatically dropped at the end of a
- session. Existing persistent tables with the same name are not
- visible to the current session while the temporary table exists.
+ session. Existing permanent tables with the same name are not
+ visible to the current session while the temporary table exists,
+ unless they are referenced with schema-qualified names.
Any indexes created on a temporary table are automatically
temporary as well.
</para>
@@ -115,7 +126,7 @@ and <replaceable class="PARAMETER">table_constraint</replaceable> is:
<term><replaceable class="PARAMETER">table_name</replaceable></term>
<listitem>
<para>
- The name of the table to be created.
+ The name (optionally schema-qualified) of the table to be created.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/create_table_as.sgml b/doc/src/sgml/ref/create_table_as.sgml
index b18e9cdccf2..d027ff506f2 100644
--- a/doc/src/sgml/ref/create_table_as.sgml
+++ b/doc/src/sgml/ref/create_table_as.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.9 2001/12/08 03:24:35 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_table_as.sgml,v 1.10 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -42,8 +42,8 @@ CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name</replace
creating a view, but it is really quite different: it creates a new
table and evaluates the query just once to fill the new table
initially. The new table will not track subsequent changes to the
- source tables of the query. In contrast, a view re-evaluates the
- underlying <command>SELECT</command> statements whenever it is
+ source tables of the query. In contrast, a view re-evaluates its
+ defining <command>SELECT</command> statement whenever it is
queried.
</para>
</refsect1>
@@ -57,15 +57,7 @@ CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name</replace
<listitem>
<para>
If specified, the table is created as a temporary table.
- Temporary tables are automatically dropped at the end of a
- session. Existing persistent tables with the same name are not
- visible to the current session while the temporary table exists.
- Any indexes created on a temporary table are automatically
- temporary as well.
- </para>
-
- <para>
- The <literal>LOCAL</literal> word is optional.
+ Refer to <xref linkend="sql-createtable"> for details.
</para>
</listitem>
</varlistentry>
@@ -74,9 +66,7 @@ CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE <replaceable>table_name</replace
<term><replaceable>table_name</replaceable></term>
<listitem>
<para>
- The name of the new table to be created. This table must not
- already exist. However, a temporary table can be created that
- has the same name as an existing permanent table.
+ The name (optionally schema-qualified) of the table to be created.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/create_type.sgml b/doc/src/sgml/ref/create_type.sgml
index 922497255bd..82847df7d76 100644
--- a/doc/src/sgml/ref/create_type.sgml
+++ b/doc/src/sgml/ref/create_type.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.27 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_type.sgml,v 1.28 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -48,7 +48,7 @@ CREATE TYPE <replaceable class="parameter">typename</replaceable> ( INPUT = <rep
<term><replaceable class="parameter">typename</replaceable></term>
<listitem>
<para>
- The name of a type to be created.
+ The name (optionally schema-qualified) of a type to be created.
</para>
</listitem>
</varlistentry>
@@ -208,12 +208,18 @@ CREATE
</title>
<para>
- <command>CREATE TYPE</command> allows the user to register a new user data
- type with PostgreSQL for use in the current data base. The
- user who defines a type becomes its owner.
- <replaceable class="parameter">typename</replaceable> is
- the name of the new type and must be unique within the
- types defined for this database.
+ <command>CREATE TYPE</command> allows the user to register a new data
+ type with <productname>PostgreSQL</> for use in the current data base.
+ The user who defines a type becomes its owner.
+ </para>
+
+ <para>
+ If a schema name is given then the type 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()</>).
+ The type name must be distinct from the name of any existing type or
+ domain in the same schema. (Because tables have associated datatypes,
+ type names also must not conflict with table names in the same schema.)
</para>
<para>
@@ -361,7 +367,7 @@ CREATE
accessed like <literal>point[0]</> and <literal>point[1]</>.
Note that
this facility only works for fixed-length types whose internal form
- is exactly a sequence of N identical fields. A subscriptable
+ is exactly a sequence of N identical fixed-length fields. A subscriptable
variable-length type must have the generalized internal representation
used by <literal>array_in</> and <literal>array_out</>.
For historical reasons (i.e., this is clearly wrong but it's far too
diff --git a/doc/src/sgml/ref/create_view.sgml b/doc/src/sgml/ref/create_view.sgml
index f40bee7d2a3..f7fa744366a 100644
--- a/doc/src/sgml/ref/create_view.sgml
+++ b/doc/src/sgml/ref/create_view.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_view.sgml,v 1.16 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/create_view.sgml,v 1.17 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -39,7 +39,7 @@ class="PARAMETER">column name list</replaceable> ) ] AS SELECT <replaceable clas
<term><replaceable class="parameter">view</replaceable></term>
<listitem>
<para>
- The name of a view to be created.
+ The name (optionally schema-qualified) of a view to be created.
</para>
</listitem>
</varlistentry>
@@ -57,10 +57,11 @@ class="PARAMETER">column name list</replaceable> ) ] AS SELECT <replaceable clas
<term><replaceable class="parameter">query</replaceable></term>
<listitem>
<para>
- An SQL query which will provide the columns and rows of the view.
+ An SQL query (that is, a <command>SELECT</> statement)
+ which will provide the columns and rows of the view.
</para>
<para>
- Refer to the SELECT statement for more information
+ Refer to <xref linkend="sql-select"> for more information
about valid arguments.
</para>
</listitem>
@@ -132,10 +133,19 @@ CREATE VIEW vista AS SELECT text 'Hello World'
Description
</title>
<para>
- <command>CREATE VIEW</command> will define a view of a table.
+ <command>CREATE VIEW</command> will define a view of a query.
The view is not physically materialized. Instead, a query
- rewrite retrieve rule is automatically generated to support
- retrieve operations on views.
+ rewrite rule (an <literal>ON SELECT</> rule) is automatically generated to
+ support SELECT operations on views.
+ </para>
+
+ <para>
+ If a schema name is given (for example, <literal>CREATE VIEW
+ myschema.myview ...</>) then the view 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()</>).
+ The view name must be distinct from the name of any other view, table,
+ sequence, or index in the same schema.
</para>
<refsect2 id="R2-SQL-CREATEVIEW-3">
diff --git a/doc/src/sgml/ref/delete.sgml b/doc/src/sgml/ref/delete.sgml
index ac5c699cf8e..e821d5e3cb1 100644
--- a/doc/src/sgml/ref/delete.sgml
+++ b/doc/src/sgml/ref/delete.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/delete.sgml,v 1.15 2001/12/08 03:24:35 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/delete.sgml,v 1.16 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -38,7 +38,7 @@ DELETE FROM [ ONLY ] <replaceable class="PARAMETER">table</replaceable> [ WHERE
<term><replaceable class="parameter">table</replaceable></term>
<listitem>
<para>
- The name of an existing table.
+ The name (optionally schema-qualified) of an existing table.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/drop_aggregate.sgml b/doc/src/sgml/ref/drop_aggregate.sgml
index 307e1ff2761..b39daaaeb9e 100644
--- a/doc/src/sgml/ref/drop_aggregate.sgml
+++ b/doc/src/sgml/ref/drop_aggregate.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_aggregate.sgml,v 1.16 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_aggregate.sgml,v 1.17 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -37,7 +37,7 @@ DROP AGGREGATE <replaceable class="PARAMETER">name</replaceable> ( <replaceable
<term><replaceable class="parameter">name</replaceable></term>
<listitem>
<para>
- The name of an existing aggregate function.
+ The name (optionally schema-qualified) of an existing aggregate function.
</para>
</listitem>
</varlistentry>
@@ -45,7 +45,7 @@ DROP AGGREGATE <replaceable class="PARAMETER">name</replaceable> ( <replaceable
<term><replaceable class="parameter">type</replaceable></term>
<listitem>
<para>
- The input data type of an existing aggregate function,
+ The input data type of the aggregate function,
or <literal>*</literal> if the function accepts any input type.
(Refer to the <citetitle>PostgreSQL User's Guide</citetitle> for
further information about data types.)
@@ -101,7 +101,7 @@ ERROR: RemoveAggregate: aggregate '<replaceable class="parameter">name</replacea
Description
</title>
<para>
- <command>DROP AGGREGATE</command> will remove all references to an existing
+ <command>DROP AGGREGATE</command> will delete an existing
aggregate definition. To execute this command the current
user must be the owner of the aggregate.
</para>
diff --git a/doc/src/sgml/ref/drop_domain.sgml b/doc/src/sgml/ref/drop_domain.sgml
index 63eb0dc057e..0a74649f95d 100644
--- a/doc/src/sgml/ref/drop_domain.sgml
+++ b/doc/src/sgml/ref/drop_domain.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_domain.sgml,v 1.4 2002/03/20 19:43:28 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_domain.sgml,v 1.5 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -39,7 +39,7 @@ DROP DOMAIN <replaceable class="PARAMETER">domainname</replaceable> [, ...] [ C
<term><replaceable class="PARAMETER">domainname</replaceable></term>
<listitem>
<para>
- The name of an existing domain.
+ The name (optionally schema-qualified) of an existing domain.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/drop_function.sgml b/doc/src/sgml/ref/drop_function.sgml
index 2f226e725f8..14c6f451c98 100644
--- a/doc/src/sgml/ref/drop_function.sgml
+++ b/doc/src/sgml/ref/drop_function.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_function.sgml,v 1.18 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_function.sgml,v 1.19 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -37,7 +37,7 @@ DROP FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceable
<term><replaceable class="parameter">name</replaceable></term>
<listitem>
<para>
- The name of an existing function.
+ The name (optionally schema-qualified) of an existing function.
</para>
</listitem>
</varlistentry>
@@ -45,7 +45,7 @@ DROP FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceable
<term><replaceable class="parameter">type</replaceable></term>
<listitem>
<para>
- The type of the function's parameters.
+ The type of a parameter of the function.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/drop_index.sgml b/doc/src/sgml/ref/drop_index.sgml
index 7eb4565ea58..99336704cf1 100644
--- a/doc/src/sgml/ref/drop_index.sgml
+++ b/doc/src/sgml/ref/drop_index.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_index.sgml,v 1.13 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_index.sgml,v 1.14 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -37,7 +37,7 @@ DROP INDEX <replaceable class="PARAMETER">index_name</replaceable> [, ...]
<term><replaceable class="PARAMETER">index_name</replaceable></term>
<listitem>
<para>
- The name of an index to remove.
+ The name (optionally schema-qualified) of an index to remove.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/drop_operator.sgml b/doc/src/sgml/ref/drop_operator.sgml
index a53434009c6..5383d3bea34 100644
--- a/doc/src/sgml/ref/drop_operator.sgml
+++ b/doc/src/sgml/ref/drop_operator.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.14 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.15 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -38,7 +38,7 @@ DROP OPERATOR <replaceable class="PARAMETER">id</replaceable> ( <replaceable cla
<term><replaceable class="parameter">id</replaceable></term>
<listitem>
<para>
- The identifier of an existing operator.
+ The identifier (optionally schema-qualified) of an existing operator.
</para>
</listitem>
</varlistentry>
@@ -156,7 +156,7 @@ ERROR: RemoveOperator: right unary operator '<replaceable class="PARAMETER">oper
for information on how to create operators.
</para>
<para>
- It is the user's responsibility to remove any access methods and
+ It is the user's responsibility to remove any access method
operator classes that rely on the deleted operator.
</para>
</refsect2>
diff --git a/doc/src/sgml/ref/drop_rule.sgml b/doc/src/sgml/ref/drop_rule.sgml
index 2719d292dc4..1596b460c40 100644
--- a/doc/src/sgml/ref/drop_rule.sgml
+++ b/doc/src/sgml/ref/drop_rule.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_rule.sgml,v 1.13 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_rule.sgml,v 1.14 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -45,7 +45,8 @@ DROP RULE <replaceable class="PARAMETER">name</replaceable> ON <replaceable clas
<term><replaceable class="parameter">relation</replaceable></term>
<listitem>
<para>
- The name of the relation the rule applies to.
+ The name (optionally schema-qualified) of the relation the rule
+ applies to.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/drop_sequence.sgml b/doc/src/sgml/ref/drop_sequence.sgml
index fa8494e7ef2..669d4962a57 100644
--- a/doc/src/sgml/ref/drop_sequence.sgml
+++ b/doc/src/sgml/ref/drop_sequence.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_sequence.sgml,v 1.12 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_sequence.sgml,v 1.13 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -37,7 +37,7 @@ DROP SEQUENCE <replaceable class="PARAMETER">name</replaceable> [, ...]
<term><replaceable class="PARAMETER">name</replaceable></term>
<listitem>
<para>
- The name of a sequence.
+ The name (optionally schema-qualified) of a sequence.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/drop_table.sgml b/doc/src/sgml/ref/drop_table.sgml
index 0850e1d942f..20de8b484ca 100644
--- a/doc/src/sgml/ref/drop_table.sgml
+++ b/doc/src/sgml/ref/drop_table.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_table.sgml,v 1.13 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_table.sgml,v 1.14 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -37,7 +37,7 @@ DROP TABLE <replaceable class="PARAMETER">name</replaceable> [, ...]
<term><replaceable class="PARAMETER">name</replaceable></term>
<listitem>
<para>
- The name of an existing table to drop.
+ The name (optionally schema-qualified) of an existing table to drop.
</para>
</listitem>
</varlistentry>
@@ -88,14 +88,18 @@ ERROR: table "<replaceable class="parameter">name</replaceable>" does not exist
</title>
<para>
<command>DROP TABLE</command> removes tables from the database.
- Only its owner may destroy a table. A table
- may be emptied of rows, but not destroyed, by using <command>DELETE</command>.
+ Only its owner may destroy a table. A table may be emptied of rows, but not
+ destroyed, by using <command>DELETE</command>.
</para>
<para>
If a table being destroyed has secondary indexes on it,
they will be removed first. The removal of just a
secondary index will not affect the contents of the underlying table.
</para>
+ <para>
+ <command>DROP TABLE</command> will also remove any rules or triggers
+ that exist for the target table.
+ </para>
<refsect2 id="R2-SQL-DROPTABLE-3">
<refsect2info>
@@ -166,7 +170,7 @@ DROP TABLE <replaceable class="parameter">table</replaceable> { RESTRICT | CASCA
</variablelist>
<tip>
<para>
- At present, to remove a referenced view you must drop
+ At present, to remove a referencing view you must drop
it explicitly.
</para>
</tip>
diff --git a/doc/src/sgml/ref/drop_trigger.sgml b/doc/src/sgml/ref/drop_trigger.sgml
index c8b69813ce5..30c92605497 100644
--- a/doc/src/sgml/ref/drop_trigger.sgml
+++ b/doc/src/sgml/ref/drop_trigger.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_trigger.sgml,v 1.10 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_trigger.sgml,v 1.11 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -46,7 +46,7 @@ DROP TRIGGER <replaceable class="PARAMETER">name</replaceable> ON <replaceable c
<term><replaceable class="PARAMETER">table</replaceable></term>
<listitem>
<para>
- The name of a table.
+ The name (optionally schema-qualified) of a table.
</para>
</listitem>
</varlistentry>
@@ -97,7 +97,7 @@ ERROR: DropTrigger: there is no trigger <replaceable class="PARAMETER">name</rep
Description
</title>
<para>
- <command>DROP TRIGGER</command> will remove all references to an existing
+ <command>DROP TRIGGER</command> will remove an existing
trigger definition. To execute this command the current
user must be the owner of the table for which the trigger is defined.
</para>
diff --git a/doc/src/sgml/ref/drop_type.sgml b/doc/src/sgml/ref/drop_type.sgml
index 07d7f2f804d..9d88fc85b96 100644
--- a/doc/src/sgml/ref/drop_type.sgml
+++ b/doc/src/sgml/ref/drop_type.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_type.sgml,v 1.15 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_type.sgml,v 1.16 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -37,7 +37,7 @@ DROP TYPE <replaceable class="PARAMETER">typename</replaceable> [, ...]
<term><replaceable class="PARAMETER">typename</replaceable></term>
<listitem>
<para>
- The name of an existing type.
+ The name (optionally schema-qualified) of an existing type.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/drop_view.sgml b/doc/src/sgml/ref/drop_view.sgml
index 1cddf8ec51e..5d168628fdb 100644
--- a/doc/src/sgml/ref/drop_view.sgml
+++ b/doc/src/sgml/ref/drop_view.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_view.sgml,v 1.12 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_view.sgml,v 1.13 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -38,7 +38,7 @@ DROP VIEW <replaceable class="PARAMETER">name</replaceable> [, ...]
<term><replaceable class="PARAMETER">name</replaceable></term>
<listitem>
<para>
- The name of an existing view.
+ The name (optionally schema-qualified) of an existing view.
</para>
</listitem>
</varlistentry>
@@ -103,7 +103,7 @@ ERROR: view <replaceable class="parameter">name</replaceable> does not exist
Notes
</title>
<para>
- Refer to <command>CREATE VIEW</command>
+ Refer to <xref linkend="sql-createview">
for information on how to create views.
</para>
</refsect2>
@@ -181,7 +181,7 @@ DROP VIEW <replaceable class="parameter">view</replaceable> { RESTRICT | CASCADE
Notes
</title>
<para>
- At present, to remove a referenced view from a
+ At present, to remove a referencing view from a
<productname>PostgreSQL</productname> database,
you must drop it explicitly.
</para>
diff --git a/doc/src/sgml/ref/insert.sgml b/doc/src/sgml/ref/insert.sgml
index 7788d91cf26..bd3aa6f438f 100644
--- a/doc/src/sgml/ref/insert.sgml
+++ b/doc/src/sgml/ref/insert.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/insert.sgml,v 1.16 2001/12/08 03:24:37 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/insert.sgml,v 1.17 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -37,7 +37,7 @@ INSERT INTO <replaceable class="PARAMETER">table</replaceable> [ ( <replaceable
<term><replaceable class="PARAMETER">table</replaceable></term>
<listitem>
<para>
- The name of an existing table.
+ The name (optionally schema-qualified) of an existing table.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/lock.sgml b/doc/src/sgml/ref/lock.sgml
index 2af4e3f41d5..a5191fb20d4 100644
--- a/doc/src/sgml/ref/lock.sgml
+++ b/doc/src/sgml/ref/lock.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/lock.sgml,v 1.31 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/lock.sgml,v 1.32 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -45,7 +45,7 @@ where <replaceable class="PARAMETER">lockmode</replaceable> is one of:
<term><replaceable class="PARAMETER">name</replaceable></term>
<listitem>
<para>
- The name of an existing table to lock.
+ The name (optionally schema-qualified) of an existing table to lock.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/reindex.sgml b/doc/src/sgml/ref/reindex.sgml
index bfacbd6f1ce..95830ebd420 100644
--- a/doc/src/sgml/ref/reindex.sgml
+++ b/doc/src/sgml/ref/reindex.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v 1.10 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/reindex.sgml,v 1.11 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -63,7 +63,8 @@ REINDEX { TABLE | DATABASE | INDEX } <replaceable class="PARAMETER">name</replac
<term><replaceable class="PARAMETER">name</replaceable></term>
<listitem>
<para>
- The name of the specific table/database/index to be be reindexed.
+ The name of the specific table/database/index to be reindexed.
+ Table and index names may be schema-qualified.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/select.sgml b/doc/src/sgml/ref/select.sgml
index fe81252a44e..9c203f5e57f 100644
--- a/doc/src/sgml/ref/select.sgml
+++ b/doc/src/sgml/ref/select.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.53 2002/03/27 19:19:23 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/select.sgml,v 1.54 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -119,12 +119,13 @@ where <replaceable class="PARAMETER">from_item</replaceable> can be:
<term><replaceable class="PARAMETER">table_name</replaceable></term>
<listitem>
<para>
- The name of an existing table or view. If ONLY is specified, only that
- table is scanned. If ONLY is not specified, the table and all its
- descendant tables (if any) are scanned. * can be appended to the
- table name to indicate that descendant tables are to be scanned,
- but in the current version, this is the default behavior.
- (In releases before 7.1, ONLY was the default behavior.)
+ The name (optionally schema-qualified) of an existing table or view.
+ If <literal>ONLY</> is specified, only that table is scanned. If
+ <literal>ONLY</> is not specified, the table and all its descendant
+ tables (if any) are scanned. <literal>*</> can be appended to the
+ table name to indicate that descendant tables are to be scanned, but
+ in the current version, this is the default behavior. (In releases
+ before 7.1, <literal>ONLY</> was the default behavior.)
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/select_into.sgml b/doc/src/sgml/ref/select_into.sgml
index 438eb575024..13a80622683 100644
--- a/doc/src/sgml/ref/select_into.sgml
+++ b/doc/src/sgml/ref/select_into.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/select_into.sgml,v 1.17 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/select_into.sgml,v 1.18 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -60,13 +60,8 @@ where <replaceable class="PARAMETER">from_item</replaceable> can be:
<term>TEMP</term>
<listitem>
<para>
- If TEMPORARY or TEMP is specified,
- the output table is created only within this session, and is
- automatically dropped on session exit.
- Existing permanent tables with the same name are not visible
- (in this session) while the temporary table exists.
- Any indexes created on a temporary table are automatically
- temporary as well.
+ If specified, the table is created as a temporary table.
+ Refer to <xref linkend="sql-createtable"> for details.
</para>
</listitem>
</varlistentry>
@@ -75,10 +70,7 @@ where <replaceable class="PARAMETER">from_item</replaceable> can be:
<term><replaceable class="PARAMETER">new_table</replaceable></term>
<listitem>
<para>
- The name of the new table to be created.
- This table must not already exist. However, a temporary table
- can be created that has the same name as an existing permanent
- table.
+ The name (optionally schema-qualified) of the table to be created.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/truncate.sgml b/doc/src/sgml/ref/truncate.sgml
index 5ef060c600b..a3888b7d320 100644
--- a/doc/src/sgml/ref/truncate.sgml
+++ b/doc/src/sgml/ref/truncate.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/truncate.sgml,v 1.6 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/truncate.sgml,v 1.7 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -38,7 +38,7 @@ TRUNCATE [ TABLE ] <replaceable class="PARAMETER">name</replaceable>
<term><replaceable class="PARAMETER">name</replaceable></term>
<listitem>
<para>
- The name of the table to be truncated.
+ The name (optionally schema-qualified) of the table to be truncated.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/update.sgml b/doc/src/sgml/ref/update.sgml
index baf13a6ac87..439e11be4bb 100644
--- a/doc/src/sgml/ref/update.sgml
+++ b/doc/src/sgml/ref/update.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/update.sgml,v 1.18 2001/12/08 03:24:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/update.sgml,v 1.19 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -40,7 +40,7 @@ UPDATE [ ONLY ] <replaceable class="PARAMETER">table</replaceable> SET <replacea
<term><replaceable class="PARAMETER">table</replaceable></term>
<listitem>
<para>
- The name of an existing table.
+ The name (optionally schema-qualified) of an existing table.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/ref/vacuum.sgml b/doc/src/sgml/ref/vacuum.sgml
index 80ddc4d2c4d..310dd4004f7 100644
--- a/doc/src/sgml/ref/vacuum.sgml
+++ b/doc/src/sgml/ref/vacuum.sgml
@@ -1,5 +1,5 @@
<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.24 2002/04/21 19:02:39 thomas Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.25 2002/04/23 02:07:16 tgl Exp $
PostgreSQL documentation
-->
@@ -73,8 +73,8 @@ VACUUM [ FULL ] [ FREEZE ] [ VERBOSE ] ANALYZE [ <replaceable class="PARAMETER">
<term><replaceable class="PARAMETER">table</replaceable></term>
<listitem>
<para>
- The name of a specific table to vacuum. Defaults to all tables
- in the current database.
+ The name (optionally schema-qualified) of a specific table to
+ vacuum. Defaults to all tables in the current database.
</para>
</listitem>
</varlistentry>
diff --git a/doc/src/sgml/reference.sgml b/doc/src/sgml/reference.sgml
index 41d419dd2ea..f1e4a238113 100644
--- a/doc/src/sgml/reference.sgml
+++ b/doc/src/sgml/reference.sgml
@@ -1,5 +1,5 @@
<!-- reference.sgml
-$Header: /cvsroot/pgsql/doc/src/sgml/reference.sgml,v 1.25 2002/04/04 04:25:44 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/reference.sgml,v 1.26 2002/04/23 02:07:15 tgl Exp $
PostgreSQL Reference Manual
-->
@@ -17,8 +17,8 @@ PostgreSQL Reference Manual
<para>
The entries in this <citetitle>Reference Manual</citetitle> are
- meant to provide in reasonable length an authorative, complete, and
- formal summary about the respective subjects. More information
+ meant to provide in reasonable length an authoritative, complete, and
+ formal summary about their respective subjects. More information
about the use of <productname>PostgreSQL</productname>, in
narrative, tutorial, or example form, may be found in other parts
of the <productname>PostgreSQL</productname> documentation set.