mirror of
https://github.com/postgres/postgres.git
synced 2025-05-22 00:02:02 -04:00
Last round of reference page editing.
This commit is contained in:
parent
ac5fdea687
commit
d1b4327d02
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/declare.sgml,v 1.23 2003/04/29 03:21:28 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/declare.sgml,v 1.24 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,222 +8,23 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DECLARE-TITLE">DECLARE</refentrytitle>
|
<refentrytitle id="SQL-DECLARE-TITLE">DECLARE</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DECLARE</refname>
|
||||||
DECLARE
|
<refpurpose>define a cursor</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
define a cursor
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-07-20</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INSENSITIVE ] [ [ NO ] SCROLL ]
|
DECLARE <replaceable class="parameter">cursorname</replaceable> [ BINARY ] [ INSENSITIVE ] [ [ NO ] SCROLL ]
|
||||||
CURSOR [ { WITH | WITHOUT } HOLD ] FOR <replaceable class="parameter">query</replaceable>
|
CURSOR [ { WITH | WITHOUT } HOLD ] FOR <replaceable class="parameter">query</replaceable>
|
||||||
[ FOR { READ ONLY | UPDATE [ OF <replaceable class="parameter">column</replaceable> [, ...] ] ]
|
[ FOR { READ ONLY | UPDATE [ OF <replaceable class="parameter">column</replaceable> [, ...] ] } ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
<refsect2 id="R2-SQL-DECLARE-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">cursorname</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name of the cursor to be used in subsequent
|
|
||||||
<command>FETCH</command> operations.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>BINARY</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Causes the cursor to return data in binary rather than in text format.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>INSENSITIVE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<acronym>SQL92</acronym> keyword indicating that data retrieved
|
|
||||||
from the cursor should be unaffected by updates from other
|
|
||||||
processes or cursors. By default, all cursors are insensitive.
|
|
||||||
This keyword currently has no effect and is present for
|
|
||||||
compatibility with the SQL standard.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>NO SCROLL</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Specifies that the cursor cannot be used to retrieve rows in a
|
|
||||||
nonsequential fashion (e.g., backward).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>SCROLL</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Specifies that the cursor may be used to retrieve rows in a
|
|
||||||
nonsequential fashion (e.g., backward). Depending upon the
|
|
||||||
complexity of the query's execution plan, specifying
|
|
||||||
<literal>SCROLL</literal> may impose a performance penalty
|
|
||||||
on the query's execution time.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>WITHOUT HOLD</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Specifies that the cursor cannot be used outside of the
|
|
||||||
transaction that created it. If neither <literal>WITHOUT
|
|
||||||
HOLD</literal> nor <literal>WITH HOLD</literal> is specified,
|
|
||||||
<literal>WITHOUT HOLD</literal> is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>WITH HOLD</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Specifies that the cursor may continue to be used after the
|
|
||||||
transaction that creates it successfully commits.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">query</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
A <command>SELECT</> query which will provide the rows to be
|
|
||||||
returned by the cursor.
|
|
||||||
Refer to <xref linkend="sql-select" endterm="sql-select-title">
|
|
||||||
for further information about valid arguments.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>READ ONLY</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<acronym>SQL92</acronym> keyword indicating that the cursor will be used
|
|
||||||
in a read only mode. Since this is the only cursor access mode
|
|
||||||
available in <productname>PostgreSQL</productname> this keyword has no effect.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>UPDATE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<acronym>SQL92</acronym> keyword indicating that the cursor will be used
|
|
||||||
to update tables. Since cursor updates are not currently
|
|
||||||
supported in <productname>PostgreSQL</productname> this keyword
|
|
||||||
provokes an informational error message.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">column</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Column(s) to be updated.
|
|
||||||
Since cursor updates are not currently
|
|
||||||
supported in <productname>PostgreSQL</productname> the UPDATE clause
|
|
||||||
provokes an informational error message.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The <literal>BINARY</literal>, <literal>INSENSITIVE</literal>,
|
|
||||||
and <literal>SCROLL</literal> keywords may appear in any order.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DECLARE-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DECLARE CURSOR
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The message returned if the <command>SELECT</command> is run successfully.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
WARNING: Closing pre-existing portal "<replaceable class="parameter">cursorname</replaceable>"
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message is reported if a cursor with the same name already
|
|
||||||
exists. The previous definition is discarded.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: DECLARE CURSOR may only be used in begin/end transaction blocks
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This error occurs if the cursor is not declared within a
|
|
||||||
transaction block, and <literal>WITH HOLD</literal> is not
|
|
||||||
specified.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DECLARE-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-09-04</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
<command>DECLARE</command> allows a user to create cursors, which
|
<command>DECLARE</command> allows a user to create cursors, which
|
||||||
can be used to retrieve
|
can be used to retrieve
|
||||||
@ -236,51 +37,195 @@ ERROR: DECLARE CURSOR may only be used in begin/end transaction blocks
|
|||||||
Normal cursors return data in text format, the same as a
|
Normal cursors return data in text format, the same as a
|
||||||
<command>SELECT</> would produce. Since data is stored natively in
|
<command>SELECT</> would produce. Since data is stored natively in
|
||||||
binary format, the system must do a conversion to produce the text
|
binary format, the system must do a conversion to produce the text
|
||||||
format. In addition, text formats are often larger in size than the
|
format. Once the information comes back in text form, the client
|
||||||
corresponding binary format. Once the information comes back in
|
application may need to convert it to a binary format to manipulate
|
||||||
text form, the client application may need to convert it to a
|
it. In addition, data in the text format is often larger in size
|
||||||
binary format to manipulate it. BINARY cursors give you back the
|
than in the binary format. Binary cursors return the data in the
|
||||||
data in the native binary representation.
|
native binary representation. Nevertheless, if you intend to
|
||||||
|
display the data as text anyway, retrieving it in text form will
|
||||||
|
save you some effort on the client side.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
As an example, if a query returns a value of one from an integer column,
|
As an example, if a query returns a value of one from an integer column,
|
||||||
you would get a string of <literal>1</> with a default cursor
|
you would get a string of <literal>1</> with a default cursor
|
||||||
whereas with a binary cursor you would get
|
whereas with a binary cursor you would get
|
||||||
a 4-byte value equal to control-A (<literal>^A</literal>).
|
a 4-byte value containing the internal representation of the value.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
BINARY cursors should be used carefully. User applications such
|
Binary cursors should be used carefully. Many applications,
|
||||||
as <application>psql</application> are not aware of binary cursors
|
including <application>psql</application>, are not prepared to
|
||||||
and expect data to come back in a text format.
|
handle binary cursors and expect data to come back in the text
|
||||||
|
format.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
String representation is architecture-neutral whereas binary
|
The string representation is architecture-neutral whereas binary
|
||||||
representation can differ between different machine architectures.
|
representation can differ between different machine architectures.
|
||||||
<emphasis><productname>PostgreSQL</productname> does not resolve
|
<emphasis><productname>PostgreSQL</productname> does not resolve
|
||||||
byte ordering or representation issues for binary cursors</emphasis>.
|
byte ordering or representation issues for binary
|
||||||
Therefore, if your client machine and server machine use different
|
cursors.</emphasis> Therefore, if your client machine and server
|
||||||
representations (e.g., <quote>big-endian</quote> versus <quote>little-endian</quote>),
|
machine use different representations (e.g.,
|
||||||
you will probably not want your data returned in
|
<quote>big-endian</quote> versus <quote>little-endian</quote>), you
|
||||||
binary format.
|
will probably not want your data returned in binary format.
|
||||||
|
|
||||||
<tip>
|
|
||||||
<para>
|
|
||||||
If you intend to display the data as text, retrieving it in text form
|
|
||||||
will save you some effort on the client side.
|
|
||||||
</para>
|
|
||||||
</tip>
|
|
||||||
</para>
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DECLARE-3">
|
<refsect1>
|
||||||
<refsect2info>
|
<title>Parameters</title>
|
||||||
<date>1998-09-04</date>
|
|
||||||
</refsect2info>
|
<variablelist>
|
||||||
<title>
|
<varlistentry>
|
||||||
Notes
|
<term><replaceable class="parameter">cursorname</replaceable></term>
|
||||||
</title>
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name of the cursor to be used in subsequent
|
||||||
|
<command>FETCH</command> operations.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>BINARY</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Causes the cursor to return data in binary rather than in text format.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>INSENSITIVE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Indicates that data retrieved from the cursor should be
|
||||||
|
unaffected by updates to the tables underlying the cursor while
|
||||||
|
the cursor exists. In PostgreSQL, all cursors are insensitive;
|
||||||
|
this key word currently has no effect and is present for
|
||||||
|
compatibility with the SQL standard.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>SCROLL</literal></term>
|
||||||
|
<term><literal>NO SCROLL</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>SCROLL</literal> specifies that the cursor may be used
|
||||||
|
to retrieve rows in a nonsequential fashion (e.g.,
|
||||||
|
backward). Depending upon the complexity of the query's
|
||||||
|
execution plan, specifying <literal>SCROLL</literal> may impose
|
||||||
|
a performance penalty on the query's execution time.
|
||||||
|
<literal>NO SCROLL</literal> specifies that the cursor cannot be
|
||||||
|
used to retrieve rows in a nonsequential fashion.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>WITH HOLD</literal></term>
|
||||||
|
<term><literal>WITHOUT HOLD</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>WITH HOLD</literal> specifies that the cursor may
|
||||||
|
continue to be used after the transaction that created it
|
||||||
|
successfully commits. <literal>WITHOUT HOLD</literal> specifies
|
||||||
|
that the cursor cannot be used outside of the transaction that
|
||||||
|
created it. If neither <literal>WITHOUT HOLD</literal> nor
|
||||||
|
<literal>WITH HOLD</literal> is specified, <literal>WITHOUT
|
||||||
|
HOLD</literal> is the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="parameter">query</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
A <command>SELECT</> command that will provide the rows to be
|
||||||
|
returned by the cursor. Refer to <xref linkend="sql-select"
|
||||||
|
endterm="sql-select-title"> for further information about valid
|
||||||
|
queries.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>FOR READ ONLY</literal></term>
|
||||||
|
<term><literal>FOR UPDATE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<literal>FOR READ ONLY</literal> indicates that the cursor will
|
||||||
|
be used in a read-only mode. <literal>FOR UPDATE</literal>
|
||||||
|
indicates that the cursor will be used to update tables. Since
|
||||||
|
cursor updates are not currently supported in
|
||||||
|
<productname>PostgreSQL</productname>, specifying <literal>FOR
|
||||||
|
UPDATE</literal> will cause an error message and specifying
|
||||||
|
<literal>FOR READ ONLY</literal> has no effect.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="parameter">column</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Column(s) to be updated by the cursor. Since cursor updates are
|
||||||
|
not currently supported in
|
||||||
|
<productname>PostgreSQL</productname>, the <literal>FOR
|
||||||
|
UPDATE</literal> clause provokes an error message.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The key words <literal>BINARY</literal>,
|
||||||
|
<literal>INSENSITIVE</literal>, and <literal>SCROLL</literal> may
|
||||||
|
appear in any order.
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DECLARE CURSOR</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The message returned if the cursor was successfully defined.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>WARNING: Closing pre-existing portal "<replaceable class="parameter">cursorname</replaceable>"</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This message is reported if a cursor with the same name already
|
||||||
|
exists. The previous definition is discarded.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: DECLARE CURSOR may only be used in begin/end transaction blocks</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This error occurs if the cursor is not declared within a
|
||||||
|
transaction block, and <literal>WITH HOLD</literal> is not
|
||||||
|
specified.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If <literal>WITH HOLD</literal> is not specified, the cursor
|
If <literal>WITH HOLD</literal> is not specified, the cursor
|
||||||
@ -295,87 +240,73 @@ ERROR: DECLARE CURSOR may only be used in begin/end transaction blocks
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
If <literal>WITH HOLD</literal> is specified and the transaction
|
If <literal>WITH HOLD</literal> is specified and the transaction
|
||||||
that created the cursor successfully commits, the cursor can be
|
that created the cursor successfully commits, the cursor can
|
||||||
continue to be accessed by subsequent transactions in the same session.
|
continue to be accessed by subsequent transactions in the same
|
||||||
(But if the creating
|
session. (But if the creating transaction is aborted, the cursor
|
||||||
transaction is aborted, the cursor is removed.) A cursor created
|
is removed.) A cursor created with <literal>WITH HOLD</literal>
|
||||||
with <literal>WITH HOLD</literal> is closed when an explicit
|
is closed when an explicit <command>CLOSE</command> command is
|
||||||
<command>CLOSE</command> command is issued on it, or when the client
|
issued on it, or the session ends. In the current implementation,
|
||||||
connection is terminated. In the current implementation, the rows
|
the rows represented by a held cursor are copied into a temporary
|
||||||
represented by a held cursor are copied into a temporary file or
|
file or memory area so that they remain available for subsequent
|
||||||
memory area so that they remain available for subsequent transactions.
|
transactions.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <literal>SCROLL</> option should be specified when defining a
|
The <literal>SCROLL</> option should be specified when defining a
|
||||||
cursor that will be used to fetch backwards. This is required by
|
cursor that will be used to fetch backwards. This is required by
|
||||||
<acronym>SQL92</acronym>. However, for compatibility with earlier
|
the SQL standard. However, for compatibility with earlier
|
||||||
versions, <productname>PostgreSQL</productname> will allow
|
versions, <productname>PostgreSQL</productname> will allow
|
||||||
backward fetches without <literal>SCROLL</>, if the cursor's query
|
backward fetches without <literal>SCROLL</>, if the cursor's query
|
||||||
plan is simple enough that no extra overhead is needed to support
|
plan is simple enough that no extra overhead is needed to support
|
||||||
it. However, application developers are advised not to rely on
|
it. However, application developers are advised not to rely on
|
||||||
using backward fetches from a cursor that has not been created
|
using backward fetches from a cursor that has not been created
|
||||||
with <literal>SCROLL</literal>. If <literal>NO SCROLL</> is specified,
|
with <literal>SCROLL</literal>. If <literal>NO SCROLL</> is
|
||||||
then backward fetches are disallowed in any case.
|
specified, then backward fetches are disallowed in any case.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
In <acronym>SQL92</acronym> cursors are only available in
|
The SQL standard only makes provisions for cursors in embedded
|
||||||
embedded <acronym>SQL</acronym> (<acronym>ESQL</acronym>) applications.
|
<acronym>SQL</acronym>. The <productname>PostgreSQL</productname>
|
||||||
The <productname>PostgreSQL</productname> backend
|
server does not implement an <command>OPEN</command> statement for
|
||||||
does not implement an explicit <command>OPEN cursor</command>
|
cursors; a cursor is considered to be open when it is declared.
|
||||||
statement; a cursor is considered to be open when it is declared.
|
However, <application>ECPG</application>, the embedded SQL
|
||||||
However, <application>ecpg</application>, the
|
preprocessor for <productname>PostgreSQL</productname>, supports
|
||||||
embedded SQL preprocessor for <productname>PostgreSQL</productname>,
|
the standard SQL cursor conventions, including those involving
|
||||||
supports the <acronym>SQL92</acronym> cursor conventions, including those
|
<command>DECLARE</command> and <command>OPEN</command> statements.
|
||||||
involving <command>DECLARE</command> and <command>OPEN</command> statements.
|
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DECLARESTATEMENT-2">
|
<refsect1>
|
||||||
<title>
|
<title>Examples</title>
|
||||||
Usage
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
To declare a cursor:
|
To declare a cursor:
|
||||||
|
<programlisting>
|
||||||
<programlisting>
|
DECLARE liahona CURSOR FOR SELECT * FROM films;
|
||||||
DECLARE liahona CURSOR
|
</programlisting>
|
||||||
FOR SELECT * FROM films;
|
See <xref linkend="sql-fetch" endterm="sql-fetch-title"> for more
|
||||||
</programlisting>
|
examples of cursor usage.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DECLARESTATEMENT-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DECLARESTATEMENT-4">
|
<para>
|
||||||
<refsect2info>
|
The SQL standard allows cursors only in embedded
|
||||||
<date>1998-04-15</date>
|
<acronym>SQL</acronym> and in modules. <productname>PostgreSQL</>
|
||||||
</refsect2info>
|
permits cursors to be used interactively.
|
||||||
<title>
|
</para>
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<acronym>SQL92</acronym> allows cursors only in embedded
|
|
||||||
<acronym>SQL</acronym> and in modules. <productname>PostgreSQL</>
|
|
||||||
permits cursors to be used interactively.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<acronym>SQL92</acronym> allows embedded or modular cursors to
|
The SQL standard allows cursors to update table data. All
|
||||||
update database information. All <productname>PostgreSQL</>
|
<productname>PostgreSQL</> cursors are read only.
|
||||||
cursors are read only.
|
</para>
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <literal>BINARY</literal> keyword is a
|
Binary cursors are a <productname>PostgreSQL</productname>
|
||||||
<productname>PostgreSQL</productname> extension.
|
extension.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_aggregate.sgml,v 1.21 2003/03/25 16:15:39 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_aggregate.sgml,v 1.22 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,167 +8,126 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPAGGREGATE-TITLE">DROP AGGREGATE</refentrytitle>
|
<refentrytitle id="SQL-DROPAGGREGATE-TITLE">DROP AGGREGATE</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP AGGREGATE</refname>
|
||||||
DROP AGGREGATE
|
<refpurpose>remove a user-defined aggregate function</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a user-defined aggregate function
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-07-20</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP AGGREGATE <replaceable class="PARAMETER">name</replaceable> ( <replaceable class="PARAMETER">type</replaceable> ) [ CASCADE | RESTRICT ]
|
DROP AGGREGATE <replaceable class="PARAMETER">name</replaceable> ( <replaceable class="PARAMETER">type</replaceable> ) [ CASCADE | RESTRICT ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPAGGREGATE-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name (optionally schema-qualified) of an existing aggregate function.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">type</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The input data type of the aggregate function,
|
|
||||||
or <literal>*</literal> if the function accepts any input type.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the aggregate.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the aggregate if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPAGGREGATE-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP AGGREGATE
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Message returned if the command is successful.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: RemoveAggregate: aggregate '<replaceable class="parameter">name</replaceable>' for type <replaceable class="parameter">type</replaceable> does not exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if the aggregate function specified does not
|
|
||||||
exist in the database.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPAGGREGATE-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP AGGREGATE</command> will delete an existing
|
<command>DROP AGGREGATE</command> will delete an existing
|
||||||
aggregate definition. To execute this command the current
|
aggregate function. To execute this command the current
|
||||||
user must be the owner of the aggregate.
|
user must be the owner of the aggregate function.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPAGGREGATE-3">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Notes
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Use
|
|
||||||
<xref linkend="sql-createaggregate" endterm="sql-createaggregate-title">
|
|
||||||
to create aggregate functions.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPAGGREGATE-2">
|
<refsect1>
|
||||||
<title>
|
<title>Parameters</title>
|
||||||
Usage
|
|
||||||
</title>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="parameter">name</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name (optionally schema-qualified) of an existing aggregate function.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="parameter">type</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The argument data type of the aggregate function, or
|
||||||
|
<literal>*</literal> if the function accepts any data type.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>CASCADE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the aggregate function.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the aggregate function if any objects depend on
|
||||||
|
it. This is the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP AGGREGATE</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the command was successful.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: RemoveAggregate: aggregate '<replaceable class="parameter">name</replaceable>' for type <replaceable class="parameter">type</replaceable> does not exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This message is returned if the specified aggregate function
|
||||||
|
does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To remove the <literal>myavg</literal> aggregate for type
|
To remove the aggregate function <literal>myavg</literal> for type
|
||||||
<literal>int4</literal>:
|
<type>integer</type>:
|
||||||
|
<programlisting>
|
||||||
|
DROP AGGREGATE myavg(integer);
|
||||||
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
<programlisting>
|
|
||||||
DROP AGGREGATE myavg(int4);
|
|
||||||
</programlisting>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPAGGREGATE-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPAGGREGATE-4">
|
<para>
|
||||||
<refsect2info>
|
There is no <command>DROP AGGREGATE</command> statement in the SQL
|
||||||
<date>1998-04-15</date>
|
standard.
|
||||||
</refsect2info>
|
</para>
|
||||||
<title>
|
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
There is no <command>DROP AGGREGATE</command> statement
|
|
||||||
in <acronym>SQL92</acronym>; the statement is a
|
|
||||||
<productname>PostgreSQL</productname>
|
|
||||||
language extension.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="sql-createaggregate" endterm="sql-createaggregate-title"></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_cast.sgml,v 1.2 2002/08/11 17:44:12 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_cast.sgml,v 1.3 2003/05/04 02:23:16 petere Exp $ -->
|
||||||
|
|
||||||
<refentry id="SQL-DROPCAST">
|
<refentry id="SQL-DROPCAST">
|
||||||
<refmeta>
|
<refmeta>
|
||||||
@ -13,8 +13,7 @@
|
|||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
DROP CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</replaceable>)
|
DROP CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</replaceable>) [ CASCADE | RESTRICT ]
|
||||||
[ CASCADE | RESTRICT ]
|
|
||||||
</synopsis>
|
</synopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
@ -30,10 +29,12 @@ DROP CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</rep
|
|||||||
data type. These are the same privileges that are required to
|
data type. These are the same privileges that are required to
|
||||||
create a cast.
|
create a cast.
|
||||||
</para>
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Parameters</title>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<title>Parameters</title>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><replaceable>sourcetype</replaceable></term>
|
<term><replaceable>sourcetype</replaceable></term>
|
||||||
|
|
||||||
@ -66,45 +67,33 @@ DROP CAST (<replaceable>sourcetype</replaceable> AS <replaceable>targettype</rep
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="sql-dropcast-notes">
|
|
||||||
<title>Notes</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Use <command>CREATE CAST</command> to create user-defined casts.
|
|
||||||
</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
|
|
||||||
<refsect1 id="sql-dropcast-examples">
|
<refsect1 id="sql-dropcast-examples">
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To drop the cast from type <type>text</type> to type <type>int</type>:
|
To drop the cast from type <type>text</type> to type <type>int</type>:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
DROP CAST (text AS int4);
|
DROP CAST (text AS int);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|
||||||
<refsect1 id="sql-dropcast-compat">
|
<refsect1 id="sql-dropcast-compat">
|
||||||
<title>Compatibility</title>
|
<title>Compatibility</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <command>DROP CAST</command> command conforms to SQL99.
|
The <command>DROP CAST</command> command conforms to the SQL standard.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
<refsect1 id="sql-dropcast-seealso">
|
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<simplelist type="inline">
|
||||||
<xref linkend="sql-createcast" endterm="sql-createcast-title">
|
<member><xref linkend="sql-createcast" endterm="sql-createcast-title"></member>
|
||||||
</para>
|
</simplelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_conversion.sgml,v 1.3 2002/09/21 18:32:54 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_conversion.sgml,v 1.4 2003/05/04 02:23:16 petere Exp $ -->
|
||||||
|
|
||||||
<refentry id="SQL-DROPCONVERSION">
|
<refentry id="SQL-DROPCONVERSION">
|
||||||
<refmeta>
|
<refmeta>
|
||||||
@ -13,8 +13,7 @@
|
|||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
DROP CONVERSION <replaceable>conversion_name</replaceable>
|
DROP CONVERSION <replaceable>conversion_name</replaceable> [ CASCADE | RESTRICT ]
|
||||||
[ CASCADE | RESTRICT ]
|
|
||||||
</synopsis>
|
</synopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
@ -23,15 +22,14 @@ DROP CONVERSION <replaceable>conversion_name</replaceable>
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP CONVERSION</command> removes a previously defined conversion.
|
<command>DROP CONVERSION</command> removes a previously defined conversion.
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
To be able to drop a conversion, you must own the conversion.
|
To be able to drop a conversion, you must own the conversion.
|
||||||
</para>
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Parameters</title>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<title>Parameters</title>
|
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><replaceable>conversion_name</replaceable></term>
|
<term><replaceable>conversion_name</replaceable></term>
|
||||||
|
|
||||||
@ -55,23 +53,8 @@ DROP CONVERSION <replaceable>conversion_name</replaceable>
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="sql-dropconversion-notes">
|
|
||||||
<title>Notes</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Use <command>CREATE CONVERSION</command> to create user-defined conversions.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The privileges required to drop a conversion may be changed in a future
|
|
||||||
release.
|
|
||||||
</para>
|
|
||||||
</refsect1>
|
|
||||||
|
|
||||||
|
|
||||||
<refsect1 id="sql-dropconversion-examples">
|
<refsect1 id="sql-dropconversion-examples">
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
@ -83,25 +66,21 @@ DROP CONVERSION myname;
|
|||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|
||||||
<refsect1 id="sql-dropconversion-compat">
|
<refsect1 id="sql-dropconversion-compat">
|
||||||
<title>Compatibility</title>
|
<title>Compatibility</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP CONVERSION</command>
|
There is no <command>DROP CONVERSION</command> statement in the SQL
|
||||||
is a <productname>PostgreSQL</productname> extension.
|
standard.
|
||||||
There is no <command>DROP CONVERSION</command>
|
|
||||||
statement in <acronym>SQL99</acronym>.
|
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
<refsect1 id="sql-dropconversion-seealso">
|
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<para>
|
<simplelist type="inline">
|
||||||
<xref linkend="sql-createconversion" endterm="sql-createconversion-title">
|
<member><xref linkend="sql-createconversion" endterm="sql-createconversion-title"></member>
|
||||||
</para>
|
</simplelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_database.sgml,v 1.15 2002/04/21 19:02:39 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_database.sgml,v 1.16 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,59 +8,56 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPDATABASE-TITLE">DROP DATABASE</refentrytitle>
|
<refentrytitle id="SQL-DROPDATABASE-TITLE">DROP DATABASE</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP DATABASE</refname>
|
||||||
DROP DATABASE
|
<refpurpose>remove a database</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a database
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-12-11</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP DATABASE <replaceable class="PARAMETER">name</replaceable>
|
DROP DATABASE <replaceable class="PARAMETER">name</replaceable>
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
</refsynopsisdiv>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Description</title>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPDATABASE-1">
|
<para>
|
||||||
<refsect2info>
|
<command>DROP DATABASE</command> drops a database. It removes the
|
||||||
<date>1999-12-11</date>
|
catalog entries for the database and deletes the directory
|
||||||
</refsect2info>
|
containing the data. It can only be executed by the database owner.
|
||||||
<title>
|
</para>
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name of an existing database to remove.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPDATABASE-2">
|
<para>
|
||||||
<refsect2info>
|
<command>DROP DATABASE</command> cannot be undone. Use it with care!
|
||||||
<date>1999-12-11</date>
|
</para>
|
||||||
</refsect2info>
|
</refsect1>
|
||||||
<title>
|
|
||||||
Outputs
|
<refsect1>
|
||||||
</title>
|
<title>Parameters</title>
|
||||||
<para>
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">name</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name of the database to remove.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><computeroutput>DROP DATABASE</computeroutput></term>
|
<term><computeroutput>DROP DATABASE</computeroutput></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
This message is returned if the command is successful.
|
This message is returned if the command was successful.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -84,72 +81,34 @@ DROP DATABASE <replaceable class="PARAMETER">name</replaceable>
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPDATABASE-1">
|
|
||||||
<refsect1info>
|
|
||||||
<date>1999-12-11</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<command>DROP DATABASE</command> removes the catalog entries for an existing
|
|
||||||
database and deletes the directory containing the data.
|
|
||||||
It can only be executed by the database owner (usually the user that created
|
|
||||||
it).
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<command>DROP DATABASE</command> cannot be undone. Use it with care!
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPDATABASE-3">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1999-12-11</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Notes
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
This command cannot be executed while connected to the target
|
|
||||||
database. Thus, it might be more convenient to use the shell
|
|
||||||
script <xref linkend="app-dropdb" endterm="app-dropdb-title">,
|
|
||||||
which is a wrapper around this command, instead.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Refer to
|
|
||||||
<xref linkend="sql-createdatabase" endterm="sql-createdatabase-title">
|
|
||||||
for information on how to create a database.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPDATABASE-3">
|
<refsect1>
|
||||||
<title>
|
<title>Notes</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPDATABASE-4">
|
<para>
|
||||||
<refsect2info>
|
This command cannot be executed while connected to the target
|
||||||
<date>1998-04-15</date>
|
database. Thus, it might be more convenient to use the program
|
||||||
</refsect2info>
|
<xref linkend="app-dropdb" endterm="app-dropdb-title"> instead,
|
||||||
<title>
|
which is a wrapper around this command.
|
||||||
SQL92
|
</para>
|
||||||
</title>
|
</refsect1>
|
||||||
|
|
||||||
<para>
|
<refsect1>
|
||||||
<command>DROP DATABASE</command> statement is a
|
<title>Compatibility</title>
|
||||||
<productname>PostgreSQL</productname> language extension;
|
|
||||||
there is no such command in <acronym>SQL92</acronym>.
|
<para>
|
||||||
</para>
|
The is no <command>DROP DATABASE</command> statement in the SQL standard.
|
||||||
</refsect2>
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="sql-createdatabase" endterm="sql-createdatabase-title"></member>
|
||||||
|
</simplelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
|
@ -1,126 +1,98 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_domain.sgml,v 1.9 2002/11/21 23:34:43 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_domain.sgml,v 1.10 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<refentry id="SQL-DROPDOMAIN">
|
<refentry id="SQL-DROPDOMAIN">
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle id="SQL-DROPDOMAIN-TITLE">
|
<refentrytitle id="SQL-DROPDOMAIN-TITLE">DROP DOMAIN</refentrytitle>
|
||||||
DROP DOMAIN
|
|
||||||
</refentrytitle>
|
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP DOMAIN</refname>
|
||||||
DROP DOMAIN
|
<refpurpose>remove a domain</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a user-defined domain
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-07-20</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP DOMAIN <replaceable class="PARAMETER">domainname</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
DROP DOMAIN <replaceable class="PARAMETER">domainname</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPDOMAIN-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2002-02-24</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">domainname</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name (optionally schema-qualified) of an existing domain.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><literal>CASCADE</></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the domain
|
|
||||||
(such as table columns).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><literal>RESTRICT</></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the domain if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPDOMAIN-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2002-02-24</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP DOMAIN
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The message returned if the command is successful.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: RemoveDomain: type '<replaceable class="parameter">domainname</replaceable>' does not exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if the specified domain (or type) is not found.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPDOMAIN-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>2002-02-24</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP DOMAIN</command> will remove a user domain from the
|
<command>DROP DOMAIN</command> will remove a domain. Only the
|
||||||
system catalogs.
|
owner of a domain can remove it.
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Only the owner of a domain can remove it.
|
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Parameters</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">domainname</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name (optionally schema-qualified) of an existing domain.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>CASCADE</></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the domain (such as
|
||||||
|
table columns).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the domain if any objects depend on it. This is
|
||||||
|
the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP DOMAIN</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the command was successful.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: RemoveDomain: type '<replaceable class="parameter">domainname</replaceable>' does not exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This message occurs if the specified domain does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="SQL-DROPDOMAIN-examples">
|
<refsect1 id="SQL-DROPDOMAIN-examples">
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To remove the <type>box</type> domain:
|
To remove the domain <type>box</type>:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
DROP DOMAIN box;
|
DROP DOMAIN box;
|
||||||
@ -131,13 +103,9 @@ DROP DOMAIN box;
|
|||||||
<refsect1 id="SQL-DROPDOMAIN-compatibility">
|
<refsect1 id="SQL-DROPDOMAIN-compatibility">
|
||||||
<title>Compatibility</title>
|
<title>Compatibility</title>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPDOMAIN-sql92">
|
<para>
|
||||||
<title>
|
This command conforms to the SQL standard.
|
||||||
SQL92
|
</para>
|
||||||
</title>
|
|
||||||
|
|
||||||
<para></para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="SQL-DROPDOMAIN-see-also">
|
<refsect1 id="SQL-DROPDOMAIN-see-also">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_function.sgml,v 1.23 2002/11/21 23:34:43 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_function.sgml,v 1.24 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,129 +8,96 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPFUNCTION-TITLE">DROP FUNCTION</refentrytitle>
|
<refentrytitle id="SQL-DROPFUNCTION-TITLE">DROP FUNCTION</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP FUNCTION</refname>
|
||||||
DROP FUNCTION
|
<refpurpose>remove a user-defined function</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a user-defined function
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-07-20</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceable class="parameter">type</replaceable> [, ...] ] ) [ CASCADE | RESTRICT ]
|
DROP FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceable class="parameter">type</replaceable> [, ...] ] ) [ CASCADE | RESTRICT ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPFUNCTION-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name (optionally schema-qualified) of an existing function.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">type</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The type of a parameter of the function.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the function
|
|
||||||
(such as operators or triggers).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the function if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPFUNCTION-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP FUNCTION
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Message returned if the command completes successfully.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
WARNING: RemoveFunction: Function "<replaceable class="parameter">name</replaceable>" ("<replaceable class="parameter">types</replaceable>") does not exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message is given if the function specified does not
|
|
||||||
exist in the current database.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPFUNCTION-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
DROP FUNCTION will remove the definition of an existing
|
<command>DROP FUNCTION</command> removes the definition of an existing
|
||||||
function. To execute this command the user must be the
|
function. To execute this command the user must be the
|
||||||
owner of the function. The input argument types to the
|
owner of the function. The argument types to the
|
||||||
function must be specified, since several different functions
|
function must be specified, since several different functions
|
||||||
may exist with the same name and different argument lists.
|
may exist with the same name and different argument lists.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="SQL-DROPFUNCTION-notes">
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Parameters</title>
|
||||||
|
|
||||||
<para>
|
<variablelist>
|
||||||
Refer to
|
<varlistentry>
|
||||||
<xref linkend="sql-createfunction" endterm="sql-createfunction-title">
|
<term><replaceable class="parameter">name</replaceable></term>
|
||||||
for information on creating functions.
|
<listitem>
|
||||||
</para>
|
<para>
|
||||||
|
The name (optionally schema-qualified) of an existing function.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="parameter">type</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The data type of an argument of the function.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>CASCADE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the function (such as
|
||||||
|
operators or triggers).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the function if any objects depend on it. This
|
||||||
|
is the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP FUNCTION</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the command completes successfully.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>WARNING: RemoveFunction: Function <replaceable class="parameter">name</replaceable> (<replaceable class="parameter">types</replaceable>) does not exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This message is output if the function specified does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="SQL-DROPFUNCTION-examples">
|
<refsect1 id="SQL-DROPFUNCTION-examples">
|
||||||
@ -149,8 +116,8 @@ DROP FUNCTION sqrt(integer);
|
|||||||
<title>Compatibility</title>
|
<title>Compatibility</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
A <command>DROP FUNCTION</command> statement is defined in SQL99. One of
|
A <command>DROP FUNCTION</command> statement is defined in the SQL
|
||||||
its syntax forms is similar to PostgreSQL's.
|
standard, but it is not compatible with this command.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
@ -161,6 +128,7 @@ DROP FUNCTION sqrt(integer);
|
|||||||
<member><xref linkend="sql-createfunction" endterm="sql-createfunction-title"></member>
|
<member><xref linkend="sql-createfunction" endterm="sql-createfunction-title"></member>
|
||||||
</simplelist>
|
</simplelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_group.sgml,v 1.4 2002/04/21 19:02:39 thomas Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_group.sgml,v 1.5 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,89 +8,60 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPGROUP-TITLE">DROP GROUP</refentrytitle>
|
<refentrytitle id="SQL-DROPGROUP-TITLE">DROP GROUP</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP GROUP</refname>
|
||||||
DROP GROUP
|
<refpurpose>remove a user group</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a user group
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>2000-01-14</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP GROUP <replaceable class="PARAMETER">name</replaceable>
|
DROP GROUP <replaceable class="PARAMETER">name</replaceable>
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPGROUP-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2000-01-14</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name of an existing group.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPGROUP-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2000-01-14</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>DROP GROUP</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The message returned if the group is successfully deleted.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPGROUP-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>2000-01-14</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP GROUP</command> removes the specified group from the database.
|
<command>DROP GROUP</command> removes the specified group. The
|
||||||
The users in the group are not deleted.
|
users in the group are not deleted.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
</refsect1>
|
||||||
Use <xref linkend="SQL-CREATEGROUP" endterm="SQL-CREATEGROUP-title">
|
|
||||||
to add new groups, and <xref linkend="SQL-ALTERGROUP"
|
<refsect1>
|
||||||
endterm="SQL-ALTERGROUP-title"> to change a group's membership.
|
<title>Parameters</title>
|
||||||
</para>
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">name</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name of an existing group.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP GROUP</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the group was successfully removed.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPGROUP-2">
|
<refsect1>
|
||||||
<title>
|
<title>Examples</title>
|
||||||
Usage
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
To drop a group:
|
To drop a group:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
@ -99,23 +70,23 @@ DROP GROUP staff;
|
|||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPGROUP-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
<para>
|
||||||
|
There is no <command>DROP GROUP</command> statement in the SQL standard.
|
||||||
<refsect2 id="R2-SQL-DROPGROUP-4">
|
</para>
|
||||||
<refsect2info>
|
|
||||||
<date>2000-01-14</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
There is no <command>DROP GROUP</command> in <acronym>SQL92</acronym>.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="sql-altergroup" endterm="sql-altergroup-title"></member>
|
||||||
|
<member><xref linkend="sql-creategroup" endterm="sql-creategroup-title"></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_index.sgml,v 1.16 2002/07/12 18:43:13 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_index.sgml,v 1.17 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,161 +8,118 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPINDEX-TITLE">DROP INDEX</refentrytitle>
|
<refentrytitle id="SQL-DROPINDEX-TITLE">DROP INDEX</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP INDEX</refname>
|
||||||
DROP INDEX
|
<refpurpose>remove an index</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove an index
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-07-20</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP INDEX <replaceable class="PARAMETER">index_name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
DROP INDEX <replaceable class="PARAMETER">index_name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPINDEX-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">index_name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name (optionally schema-qualified) of an index to remove.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the index.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the index if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPINDEX-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP INDEX
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The message returned if the command completes successfully.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: index "<replaceable class="PARAMETER">index_name</replaceable>" does not exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if <replaceable class="PARAMETER">index_name</replaceable>
|
|
||||||
is not an index in the database.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPINDEX-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP INDEX</command> drops an existing index from the database
|
<command>DROP INDEX</command> drops an existing index from the database
|
||||||
system. To execute this command you must be the owner of
|
system. To execute this command you must be the owner of
|
||||||
the index.
|
the index.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPINDEX-3">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Notes
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<command>DROP INDEX</command> is a <productname>PostgreSQL</productname>
|
|
||||||
language extension.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Refer to
|
|
||||||
<xref linkend="sql-createindex" endterm="sql-createindex-title">
|
|
||||||
for information on how to create indexes.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPINDEX-2">
|
<refsect1>
|
||||||
<title>
|
<title>Parameters</title>
|
||||||
Usage
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
This command will remove the <literal>title_idx</literal> index:
|
|
||||||
|
|
||||||
<programlisting>
|
<variablelist>
|
||||||
DROP INDEX title_idx;
|
<varlistentry>
|
||||||
</programlisting>
|
<term><replaceable class="PARAMETER">index_name</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name (optionally schema-qualified) of an index to remove.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>CASCADE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the index.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the index if any objects depend on it. This is
|
||||||
|
the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP INDEX</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the command completes successfully.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: index "<replaceable class="PARAMETER">index_name</replaceable>" does not exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This message is returned if <replaceable
|
||||||
|
class="PARAMETER">index_name</replaceable> is not an existing
|
||||||
|
index.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This command will remove the index <literal>title_idx</literal>:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
|
DROP INDEX title_idx;
|
||||||
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPINDEX-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPINDEX-4">
|
<para>
|
||||||
<refsect2info>
|
<command>DROP INDEX</command> is a
|
||||||
<date>1998-04-15</date>
|
<productname>PostgreSQL</productname> language extension. There
|
||||||
</refsect2info>
|
are no provisions for indexes in the SQL standard.
|
||||||
<title>
|
</para>
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<acronym>SQL92</acronym> defines commands by which to access
|
|
||||||
a generic relational database.
|
|
||||||
Indexes are an implementation-dependent feature and hence
|
|
||||||
there are no index-specific commands or definitions in the
|
|
||||||
<acronym>SQL92</acronym> language.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="sql-createindex" endterm="sql-createindex-title"></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_language.sgml,v 1.15 2002/07/12 18:43:13 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_language.sgml,v 1.16 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,163 +8,120 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPLANGUAGE-TITLE">DROP LANGUAGE</refentrytitle>
|
<refentrytitle id="SQL-DROPLANGUAGE-TITLE">DROP LANGUAGE</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP LANGUAGE</refname>
|
||||||
DROP LANGUAGE
|
<refpurpose>remove a user-defined procedural language</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a user-defined procedural language
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-07-20</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP [ PROCEDURAL ] LANGUAGE <replaceable class="PARAMETER">name</replaceable> [ CASCADE | RESTRICT ]
|
DROP [ PROCEDURAL ] LANGUAGE <replaceable class="PARAMETER">name</replaceable> [ CASCADE | RESTRICT ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPLANGUAGE-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name of an existing procedural language. For backward
|
|
||||||
compatibility, the name may be enclosed by single quotes.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the language
|
|
||||||
(such as functions in the language).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the language if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPLANGUAGE-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP LANGUAGE
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message is returned if the language is successfully dropped.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: Language "<replaceable class="parameter">name</replaceable>" doesn't exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if a language called
|
|
||||||
<replaceable class="parameter">name</replaceable> is
|
|
||||||
not found in the database.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPLANGUAGE-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP PROCEDURAL LANGUAGE</command> will remove the definition
|
<command>DROP LANGUAGE</command> will remove the definition
|
||||||
of the previously registered procedural language called
|
of the previously registered procedural language called
|
||||||
<replaceable class="parameter">name</replaceable>.
|
<replaceable class="parameter">name</replaceable>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPLANGUAGE-3">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Notes
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
The <command>DROP PROCEDURAL LANGUAGE</command> statement is
|
|
||||||
a <productname>PostgreSQL</productname> language extension.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
Refer to
|
|
||||||
<xref linkend="sql-createlanguage" endterm="sql-createlanguage-title">
|
|
||||||
for information on how to create procedural languages.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPLANGUAGE-2">
|
<refsect1>
|
||||||
<title>
|
<title>Parameters</title>
|
||||||
Usage
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
This command removes the PL/Sample language:
|
|
||||||
|
|
||||||
<programlisting>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">name</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name of an existing procedural language. For backward
|
||||||
|
compatibility, the name may be enclosed by single quotes.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>CASCADE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the language (such as
|
||||||
|
functions in the language).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the language if any objects depend on it. This
|
||||||
|
is the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP LANGUAGE</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This message is returned if the language was successfully dropped.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: Language "<replaceable class="parameter">name</replaceable>" doesn't exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This message is returned if a language called <replaceable
|
||||||
|
class="parameter">name</replaceable> is not found in the
|
||||||
|
database.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This command removes the procedural language
|
||||||
|
<literal>plsample</literal>:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
DROP LANGUAGE plsample;
|
DROP LANGUAGE plsample;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPLANGUAGE-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
<para>
|
||||||
|
There is no <command>DROP LANGUAGE</command> statement in the SQL
|
||||||
<refsect2 id="R2-SQL-DROPLANGUAGE-5">
|
standard.
|
||||||
<refsect2info>
|
</para>
|
||||||
<date>1998-04-15</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
There is no <command>DROP PROCEDURAL LANGUAGE</command> in
|
|
||||||
<acronym>SQL92</acronym>.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="sql-createlanguage" endterm="sql-createlanguage-title"></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_opclass.sgml,v 1.2 2002/09/21 18:32:54 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_opclass.sgml,v 1.3 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,162 +8,118 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPOPCLASS-TITLE">DROP OPERATOR CLASS</refentrytitle>
|
<refentrytitle id="SQL-DROPOPCLASS-TITLE">DROP OPERATOR CLASS</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP OPERATOR CLASS</refname>
|
||||||
DROP OPERATOR CLASS
|
<refpurpose>remove a user-defined operator class</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a user-defined operator class
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>2002-07-28</date>
|
DROP OPERATOR CLASS <replaceable class="PARAMETER">name</replaceable> USING <replaceable class="PARAMETER">index_method</replaceable> [ CASCADE | RESTRICT ]
|
||||||
</refsynopsisdivinfo>
|
</synopsis>
|
||||||
<synopsis>
|
|
||||||
DROP OPERATOR CLASS <replaceable class="PARAMETER">name</replaceable> USING <replaceable class="PARAMETER">access_method</replaceable> [ CASCADE | RESTRICT ]
|
|
||||||
</synopsis>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPOPCLASS-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2002-07-28</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name (optionally schema-qualified) of an existing operator class.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">access_method</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name of the index access method the operator class is for.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the operator class.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the operator class if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPOPCLASS-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2002-07-28</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP OPERATOR CLASS
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The message returned if the command is successful.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPOPCLASS-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>2002-07-28</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP OPERATOR CLASS</command> drops an existing operator class
|
<command>DROP OPERATOR CLASS</command> drops an existing operator class.
|
||||||
from the database.
|
|
||||||
To execute this command you must be the owner of the operator class.
|
To execute this command you must be the owner of the operator class.
|
||||||
</para>
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Parameters</title>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPOPCLASS-3">
|
<variablelist>
|
||||||
<refsect2info>
|
<varlistentry>
|
||||||
<date>2002-07-28</date>
|
<term><replaceable class="parameter">name</replaceable></term>
|
||||||
</refsect2info>
|
<listitem>
|
||||||
<title>
|
<para>
|
||||||
Notes
|
The name (optionally schema-qualified) of an existing operator class.
|
||||||
</title>
|
</para>
|
||||||
<para>
|
</listitem>
|
||||||
The <command>DROP OPERATOR CLASS</command> statement is a
|
</varlistentry>
|
||||||
<productname>PostgreSQL</productname>
|
|
||||||
language extension.
|
<varlistentry>
|
||||||
</para>
|
<term><replaceable class="parameter">index_method</replaceable></term>
|
||||||
<para>
|
<listitem>
|
||||||
Refer to
|
<para>
|
||||||
<xref linkend="sql-createopclass" endterm="sql-createopclass-title">
|
The name of the index access method the operator class is for.
|
||||||
for information on how to create operator classes.
|
</para>
|
||||||
</para>
|
</listitem>
|
||||||
</refsect2>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>CASCADE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the operator class.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the operator class if any objects depend on it.
|
||||||
|
This is the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPOPCLASS-2">
|
<refsect1>
|
||||||
<title>
|
<title>Diagnostics</title>
|
||||||
Usage
|
|
||||||
</title>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP OPERATOR CLASS</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the command was successful.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Remove B-tree operator class <literal>widget_ops</literal>:
|
Remove the B-tree operator class <literal>widget_ops</literal>:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
DROP OPERATOR CLASS widget_ops USING btree;
|
DROP OPERATOR CLASS widget_ops USING btree;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
This command will not execute if there are any existing indexes
|
This command will not succeed if there are any existing indexes
|
||||||
that use the operator class. Add <literal>CASCADE</> to drop
|
that use the operator class. Add <literal>CASCADE</> to drop
|
||||||
such indexes along with the operator class.
|
such indexes along with the operator class.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPOPCLASS-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPOPCLASS-4">
|
<para>
|
||||||
<refsect2info>
|
There is no <command>DROP OPERATOR CLASS</command> statement in the
|
||||||
<date>2002-07-28</date>
|
SQL standard.
|
||||||
</refsect2info>
|
</para>
|
||||||
<title>
|
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
There is no <command>DROP OPERATOR CLASS</command> in
|
|
||||||
<acronym>SQL92</acronym>.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="sql-createopclass" endterm="sql-createopclass-title"></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.18 2002/07/29 22:14:10 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.19 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,216 +8,169 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPOPERATOR-TITLE">DROP OPERATOR</refentrytitle>
|
<refentrytitle id="SQL-DROPOPERATOR-TITLE">DROP OPERATOR</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP OPERATOR</refname>
|
||||||
DROP OPERATOR
|
<refpurpose>remove a user-defined operator</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a user-defined operator
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-07-20</date>
|
DROP OPERATOR <replaceable class="PARAMETER">name</replaceable> ( <replaceable class="PARAMETER">lefttype</replaceable> | NONE , <replaceable class="PARAMETER">righttype</replaceable> | NONE ) [ CASCADE | RESTRICT ]
|
||||||
</refsynopsisdivinfo>
|
</synopsis>
|
||||||
<synopsis>
|
|
||||||
DROP OPERATOR <replaceable class="PARAMETER">id</replaceable> ( <replaceable class="PARAMETER">lefttype</replaceable> | NONE , <replaceable class="PARAMETER">righttype</replaceable> | NONE ) [ CASCADE | RESTRICT ]
|
|
||||||
</synopsis>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPOPERATOR-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">id</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The identifier (optionally schema-qualified) of an existing operator.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">lefttype</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The type of the operator's left argument; write <literal>NONE</literal> if the
|
|
||||||
operator has no left argument.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">righttype</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The type of the operator's right argument; write <literal>NONE</literal> if the
|
|
||||||
operator has no right argument.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the operator.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the operator if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPOPERATOR-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP OPERATOR
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The message returned if the command is successful.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: RemoveOperator: binary operator '<replaceable class="PARAMETER">oper</replaceable>' taking '<replaceable class="PARAMETER">lefttype</replaceable>' and '<replaceable class="PARAMETER">righttype</replaceable>' does not exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if the specified binary operator does not exist.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: RemoveOperator: left unary operator '<replaceable class="PARAMETER">oper</replaceable>' taking '<replaceable class="PARAMETER">lefttype</replaceable>' does not exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if the left unary operator
|
|
||||||
specified does not exist.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: RemoveOperator: right unary operator '<replaceable class="PARAMETER">oper</replaceable>' taking '<replaceable class="PARAMETER">righttype</replaceable>' does not exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if the right unary operator
|
|
||||||
specified does not exist.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPOPERATOR-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<command>DROP OPERATOR</command> drops an existing operator from the
|
|
||||||
database.
|
|
||||||
To execute this command you must be the owner of the operator.
|
|
||||||
</para>
|
|
||||||
<para>
|
|
||||||
The left or right type of a left or right unary
|
|
||||||
operator, respectively, must be specified as <literal>NONE</literal>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPOPERATOR-3">
|
<para>
|
||||||
<refsect2info>
|
<command>DROP OPERATOR</command> drops an existing operator from
|
||||||
<date>1998-09-22</date>
|
the database system. To execute this command you must be the owner
|
||||||
</refsect2info>
|
of the operator.
|
||||||
<title>
|
</para>
|
||||||
Notes
|
</refsect1>
|
||||||
</title>
|
|
||||||
<para>
|
<refsect1>
|
||||||
The <command>DROP OPERATOR</command> statement is a
|
<title>Parameters</title>
|
||||||
<productname>PostgreSQL</productname>
|
|
||||||
language extension.
|
<variablelist>
|
||||||
</para>
|
<varlistentry>
|
||||||
<para>
|
<term><replaceable class="parameter">name</replaceable></term>
|
||||||
Refer to
|
<listitem>
|
||||||
<xref linkend="sql-createoperator" endterm="sql-createoperator-title">
|
<para>
|
||||||
for information on how to create operators.
|
The name (optionally schema-qualified) of an existing operator.
|
||||||
</para>
|
</para>
|
||||||
</refsect2>
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="parameter">lefttype</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The data type of the operator's left operand; write
|
||||||
|
<literal>NONE</literal> if the operator has no left operand.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="parameter">righttype</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The data type of the operator's right operand; write
|
||||||
|
<literal>NONE</literal> if the operator has no right operand.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>CASCADE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the operator.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the operator if any objects depend on it. This
|
||||||
|
is the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPOPERATOR-2">
|
<refsect1>
|
||||||
<title>
|
<title>Diagnostics</title>
|
||||||
Usage
|
|
||||||
</title>
|
<variablelist>
|
||||||
<para>
|
<varlistentry>
|
||||||
Remove power operator <literal>a^n</literal> for <literal>int4</literal>:
|
<term><computeroutput>DROP OPERATOR</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the command was successful.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: RemoveOperator: binary operator '<replaceable class="PARAMETER">name</replaceable>' taking '<replaceable class="PARAMETER">lefttype</replaceable>' and '<replaceable class="PARAMETER">righttype</replaceable>' does not exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This message is returned if the specified binary operator does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: RemoveOperator: left unary operator '<replaceable class="PARAMETER">name</replaceable>' taking '<replaceable class="PARAMETER">lefttype</replaceable>' does not exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This message is returned if the specified left unary operator
|
||||||
|
does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: RemoveOperator: right unary operator '<replaceable class="PARAMETER">name</replaceable>' taking '<replaceable class="PARAMETER">righttype</replaceable>' does not exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This message is returned if the specified right unary operator
|
||||||
|
does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
<programlisting>
|
|
||||||
DROP OPERATOR ^ (int4, int4);
|
|
||||||
</programlisting>
|
|
||||||
</para>
|
|
||||||
<para>
|
<para>
|
||||||
Remove left unary negation operator (<literal>! b</literal>) for <type>boolean</type>:
|
Remove the power operator <literal>a^b</literal> for type <type>integer</type>:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
DROP OPERATOR ! (none, bool);
|
DROP OPERATOR ^ (integer, integer);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Remove right unary factorial operator (<literal>i !</literal>) for
|
Remove the left unary bitwise complement operator
|
||||||
<literal>int4</literal>:
|
<literal>~b</literal> for type <type>bit</type>:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
DROP OPERATOR ! (int4, none);
|
DROP OPERATOR ~ (none, bit);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Remove the right unary factorial operator <literal>x!</literal>
|
||||||
|
for type <type>integer</type>:
|
||||||
|
<programlisting>
|
||||||
|
DROP OPERATOR ! (integer, none);
|
||||||
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPOPERATOR-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPOPERATOR-4">
|
<para>
|
||||||
<refsect2info>
|
There is no <command>DROP OPERATOR</command> statement in the SQL standard.
|
||||||
<date>1998-09-22</date>
|
</para>
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
There is no <command>DROP OPERATOR</command> in <acronym>SQL92</acronym>.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="sql-createoperator" endterm="sql-createoperator-title"></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_rule.sgml,v 1.16 2002/07/12 18:43:13 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_rule.sgml,v 1.17 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,169 +8,122 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPRULE-TITLE">DROP RULE</refentrytitle>
|
<refentrytitle id="SQL-DROPRULE-TITLE">DROP RULE</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP RULE</refname>
|
||||||
DROP RULE
|
<refpurpose>remove a rewrite rule</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a rewrite rule
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP RULE <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">relation</replaceable> [ CASCADE | RESTRICT ]
|
DROP RULE <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">relation</replaceable> [ CASCADE | RESTRICT ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPRULE-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name of an existing rule to drop.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">relation</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name (optionally schema-qualified) of the relation the rule
|
|
||||||
applies to.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the rule.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the rule if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPRULE-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP RULE
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Message returned if successful.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: Rule "<replaceable class="parameter">name</replaceable>" not found
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if the specified rule does not exist.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPRULE-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP RULE</command> drops a rule from the specified
|
<command>DROP RULE</command> drops a rewrite rule.
|
||||||
<productname>PostgreSQL</productname> rule
|
|
||||||
system. <productname>PostgreSQL</productname>
|
|
||||||
will immediately cease enforcing it and
|
|
||||||
will purge its definition from the system catalogs.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPRULE-3">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Notes
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
The <command>DROP RULE</command> statement is a
|
|
||||||
<productname>PostgreSQL</productname>
|
|
||||||
language extension.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Refer to <command>CREATE RULE</command> for
|
|
||||||
information on how to create rules.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPRULE-2">
|
<refsect1>
|
||||||
<title>
|
<title>Parameters</title>
|
||||||
Usage
|
|
||||||
</title>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="parameter">name</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name of the rule to drop.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="parameter">relation</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name (optionally schema-qualified) of the table or view that
|
||||||
|
the rule applies to.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>CASCADE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the rule.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the rule if any objects depend on it. This is
|
||||||
|
the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP RULE</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the command was successful.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: Rule "<replaceable class="parameter">name</replaceable>" not found</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message if the specified rule does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To drop the rewrite rule <literal>newrule</literal>:
|
To drop the rewrite rule <literal>newrule</literal>:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
DROP RULE newrule ON mytable;
|
DROP RULE newrule ON mytable;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPRULE-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPRULE-5">
|
<para>
|
||||||
<refsect2info>
|
There is no <command>DROP RULE</command> statement in the SQL standard.
|
||||||
<date>1998-09-22</date>
|
</para>
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
There is no <command>DROP RULE</command> in SQL92.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="sql-createrule" endterm="sql-createrule-title"></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_schema.sgml,v 1.1 2002/07/18 16:47:22 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_schema.sgml,v 1.2 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,107 +8,23 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPSCHEMA-TITLE">DROP SCHEMA</refentrytitle>
|
<refentrytitle id="SQL-DROPSCHEMA-TITLE">DROP SCHEMA</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP SCHEMA</refname>
|
||||||
DROP SCHEMA
|
<refpurpose>remove a schema</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a schema
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>2002-07-18</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP SCHEMA <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
DROP SCHEMA <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
||||||
|
</synopsis>
|
||||||
</synopsis>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPSCHEMA-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2002-07-18</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name of a schema.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects (tables, functions, etc) that are contained
|
|
||||||
in the schema.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the schema if it contains any objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPSCHEMA-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2002-07-18</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP SCHEMA
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The message returned if the schema is successfully dropped.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: Schema "<replaceable class="parameter">name</replaceable>" does not exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if the specified schema does not exist.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPSCHEMA-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>2002-07-18</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP SCHEMA</command> removes schemas from the data base.
|
<command>DROP SCHEMA</command> removes schemas from the database.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -116,54 +32,98 @@ ERROR: Schema "<replaceable class="parameter">name</replaceable>" does not exist
|
|||||||
the owner can drop the schema (and thereby all contained objects)
|
the owner can drop the schema (and thereby all contained objects)
|
||||||
even if he does not own some of the objects within the schema.
|
even if he does not own some of the objects within the schema.
|
||||||
</para>
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Parameters</title>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPSCHEMA-3">
|
<variablelist>
|
||||||
<refsect2info>
|
<varlistentry>
|
||||||
<date>2002-07-18</date>
|
<term><replaceable class="PARAMETER">name</replaceable></term>
|
||||||
</refsect2info>
|
<listitem>
|
||||||
<title>
|
<para>
|
||||||
Notes
|
The name of a schema.
|
||||||
</title>
|
</para>
|
||||||
<para>
|
</listitem>
|
||||||
Refer to the <command>CREATE SCHEMA</command> statement for
|
</varlistentry>
|
||||||
information on how to create a schema.
|
|
||||||
</para>
|
<varlistentry>
|
||||||
</refsect2>
|
<term><literal>CASCADE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects (tables, functions, etc.) that are
|
||||||
|
contained in the schema.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the schema if it contains any objects. This is
|
||||||
|
the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPSCHEMA-2">
|
<refsect1>
|
||||||
<title>
|
<title>Diagnostics</title>
|
||||||
Usage
|
|
||||||
</title>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP SCHEMA</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the schema was successfully dropped.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: Schema "<replaceable class="parameter">name</replaceable>" does not exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
This message is returned if the specified schema does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To remove schema <literal>mystuff</literal> from the database,
|
To remove schema <literal>mystuff</literal> from the database,
|
||||||
along with everything it contains:
|
along with everything it contains:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
DROP SCHEMA mystuff CASCADE;
|
DROP SCHEMA mystuff CASCADE;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPSCHEMA-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPSCHEMA-4">
|
<para>
|
||||||
<refsect2info>
|
<command>DROP SCHEMA</command> is fully conforming with the SQL
|
||||||
<date>2002-07-18</date>
|
standard, except that the standard only allows one schema to be
|
||||||
</refsect2info>
|
dropped per command.
|
||||||
<title>
|
</para>
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<command>DROP SCHEMA</command> is fully compatible with
|
|
||||||
<acronym>SQL92</acronym>, except that the standard only allows
|
|
||||||
one schema to be dropped per command.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="sql-createschema" endterm="sql-createschema-title"></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_sequence.sgml,v 1.16 2002/07/18 15:49:08 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_sequence.sgml,v 1.17 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,160 +8,112 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPSEQUENCE-TITLE">DROP SEQUENCE</refentrytitle>
|
<refentrytitle id="SQL-DROPSEQUENCE-TITLE">DROP SEQUENCE</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP SEQUENCE</refname>
|
||||||
DROP SEQUENCE
|
<refpurpose>remove a sequence</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a sequence
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-07-20</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP SEQUENCE <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
DROP SEQUENCE <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
||||||
|
</synopsis>
|
||||||
</synopsis>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPSEQUENCE-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name (optionally schema-qualified) of a sequence.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the sequence.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the sequence if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPSEQUENCE-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP SEQUENCE
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The message returned if the sequence is successfully dropped.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: sequence "<replaceable class="parameter">name</replaceable>" does not exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if the specified sequence does not exist.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPSEQUENCE-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<command>DROP SEQUENCE</command> removes sequence number generators from the
|
|
||||||
data base. With the current implementation of sequences as
|
|
||||||
special tables it works just like the <command>DROP TABLE</command>
|
|
||||||
statement.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPSEQUENCE-3">
|
<para>
|
||||||
<refsect2info>
|
<command>DROP SEQUENCE</command> removes sequence number generators.
|
||||||
<date>1998-09-22</date>
|
</para>
|
||||||
</refsect2info>
|
</refsect1>
|
||||||
<title>
|
|
||||||
Notes
|
<refsect1>
|
||||||
</title>
|
<title>Parameters</title>
|
||||||
<para>
|
|
||||||
The <command>DROP SEQUENCE</command> statement is a
|
<variablelist>
|
||||||
<productname>PostgreSQL</productname>
|
<varlistentry>
|
||||||
language extension.
|
<term><replaceable class="PARAMETER">name</replaceable></term>
|
||||||
</para>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Refer to the <command>CREATE SEQUENCE</command> statement for
|
The name (optionally schema-qualified) of a sequence.
|
||||||
information on how to create a sequence.
|
</para>
|
||||||
</para>
|
</listitem>
|
||||||
</refsect2>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>CASCADE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the sequence.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the sequence if any objects depend on it. This
|
||||||
|
is the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPSEQUENCE-2">
|
<refsect1>
|
||||||
<title>
|
<title>Diagnostics</title>
|
||||||
Usage
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
To remove sequence <literal>serial</literal> from database:
|
|
||||||
|
|
||||||
<programlisting>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP SEQUENCE</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the sequence was successfully dropped.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: sequence "<replaceable class="parameter">name</replaceable>" does not exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the specified sequence does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To remove the sequence <literal>serial</literal>:
|
||||||
|
|
||||||
|
<programlisting>
|
||||||
DROP SEQUENCE serial;
|
DROP SEQUENCE serial;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPSEQUENCE-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
<para>
|
||||||
|
There is no <command>DROP SEQUENCE</command> statement in the SQL standard.
|
||||||
<refsect2 id="R2-SQL-DROPSEQUENCE-4">
|
</para>
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
There is no <command>DROP SEQUENCE</command> in <acronym>SQL92</acronym>.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="sql-createsequence" endterm="sql-createsequence-title"></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_table.sgml,v 1.17 2002/07/14 22:47:56 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_table.sgml,v 1.18 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,158 +8,126 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPTABLE-TITLE">DROP TABLE</refentrytitle>
|
<refentrytitle id="SQL-DROPTABLE-TITLE">DROP TABLE</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP TABLE</refname>
|
||||||
DROP TABLE
|
<refpurpose>remove a table</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a table
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-07-20</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP TABLE <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
DROP TABLE <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
||||||
|
</synopsis>
|
||||||
</synopsis>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPTABLE-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name (optionally schema-qualified) of an existing table to drop.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the table
|
|
||||||
(such as views).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the table if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPTABLE-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP TABLE
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The message returned if the command completes successfully.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: table "<replaceable class="parameter">name</replaceable>" does not exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
If the specified table does not exist in the database.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPTABLE-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP TABLE</command> removes tables from the database.
|
<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
|
Only its owner may destroy a table. To empty a table of rows,
|
||||||
destroyed, by using <command>DELETE</command>.
|
without destroying the table, use <command>DELETE</command>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP TABLE</command> always removes any indexes, rules,
|
<command>DROP TABLE</command> always removes any indexes, rules,
|
||||||
triggers, and constraints that exist for the target table. However,
|
triggers, and constraints that exist for the target table.
|
||||||
to drop a table that is referenced by a foreign-key constraint of another
|
However, to drop a table that is referenced by a foreign-key
|
||||||
table, CASCADE must be specified. (CASCADE will remove the foreign-key
|
constraint of another table, <literal>CASCADE</> must be
|
||||||
constraint, not the other table itself.)
|
specified. (<literal>CASCADE</> will remove the foreign-key
|
||||||
|
constraint, not the other table entirely.)
|
||||||
</para>
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Parameters</title>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPTABLE-3">
|
<variablelist>
|
||||||
<refsect2info>
|
<varlistentry>
|
||||||
<date>1998-09-22</date>
|
<term><replaceable class="PARAMETER">name</replaceable></term>
|
||||||
</refsect2info>
|
<listitem>
|
||||||
<title>
|
<para>
|
||||||
Notes
|
The name (optionally schema-qualified) of the table to drop.
|
||||||
</title>
|
</para>
|
||||||
<para>
|
</listitem>
|
||||||
Refer to <command>CREATE TABLE</command> and
|
</varlistentry>
|
||||||
<command>ALTER TABLE</command> for information on
|
|
||||||
how to create or modify tables.
|
<varlistentry>
|
||||||
</para>
|
<term><literal>CASCADE</literal></term>
|
||||||
</refsect2>
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the table (such as
|
||||||
|
views).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the table if any objects depend on it. This is
|
||||||
|
the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPTABLE-2">
|
<refsect1>
|
||||||
<title>
|
<title>Diagnostics</title>
|
||||||
Usage
|
|
||||||
</title>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP TABLE</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the command completes successfully.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: table "<replaceable class="parameter">name</replaceable>" does not exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the specified table does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To destroy two tables, <literal>films</literal> and
|
To destroy two tables, <literal>films</literal> and
|
||||||
<literal>distributors</literal>:
|
<literal>distributors</literal>:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
DROP TABLE films, distributors;
|
DROP TABLE films, distributors;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPTABLE-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
<para>
|
||||||
|
This command conforms to the SQL standard.
|
||||||
<refsect2 id="R2-SQL-DROPTABLE-4">
|
</para>
|
||||||
<title>
|
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="sql-altertable" endterm="sql-altertable-title"></member>
|
||||||
|
<member><xref linkend="sql-createtable" endterm="sql-createtable-title"></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_trigger.sgml,v 1.14 2002/11/21 23:34:43 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_trigger.sgml,v 1.15 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,124 +8,102 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPTRIGGER-TITLE">DROP TRIGGER</refentrytitle>
|
<refentrytitle id="SQL-DROPTRIGGER-TITLE">DROP TRIGGER</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP TRIGGER</refname>
|
||||||
DROP TRIGGER
|
<refpurpose>remove a trigger</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a trigger
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP TRIGGER <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">table</replaceable> [ CASCADE | RESTRICT ]
|
DROP TRIGGER <replaceable class="PARAMETER">name</replaceable> ON <replaceable class="PARAMETER">table</replaceable> [ CASCADE | RESTRICT ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPTRIGGER-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name of an existing trigger.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">table</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name (optionally schema-qualified) of a table.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the trigger.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the trigger if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPTRIGGER-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP TRIGGER
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The message returned if the trigger is successfully dropped.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: DropTrigger: there is no trigger <replaceable class="PARAMETER">name</replaceable> on relation "<replaceable class="parameter">table</replaceable>"
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if the trigger specified does not exist.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPTRIGGER-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP TRIGGER</command> will remove an existing
|
<command>DROP TRIGGER</command> will remove an existing
|
||||||
trigger definition. To execute this command the current
|
trigger definition. To execute this command, the current
|
||||||
user must be the owner of the table for which the trigger is defined.
|
user must be the owner of the table for which the trigger is defined.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Parameters</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">name</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name of the trigger to remove.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">table</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name (optionally schema-qualified) of a table for which the
|
||||||
|
trigger is defined.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>CASCADE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the trigger.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the trigger if any objects depend on it. This is
|
||||||
|
the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP TRIGGER</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the trigger was successfully dropped.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: DropTrigger: there is no trigger <replaceable class="PARAMETER">name</replaceable> on relation "<replaceable class="parameter">table</replaceable>"</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the specified trigger does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="SQL-DROPTRIGGER-examples">
|
<refsect1 id="SQL-DROPTRIGGER-examples">
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Destroy the <literal>if_dist_exists</literal> trigger
|
Destroy the trigger <literal>if_dist_exists</literal> on the table
|
||||||
on table <literal>films</literal>:
|
<literal>films</literal>:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
DROP TRIGGER if_dist_exists ON films;
|
DROP TRIGGER if_dist_exists ON films;
|
||||||
@ -136,30 +114,13 @@ DROP TRIGGER if_dist_exists ON films;
|
|||||||
<refsect1 id="SQL-DROPTRIGGER-compatibility">
|
<refsect1 id="SQL-DROPTRIGGER-compatibility">
|
||||||
<title>Compatibility</title>
|
<title>Compatibility</title>
|
||||||
|
|
||||||
<variablelist>
|
<para>
|
||||||
<varlistentry>
|
The <command>DROP TRIGGER</command> statement in
|
||||||
<term>SQL92</term>
|
<productname>PostgreSQL</productname> is incompatible with the SQL
|
||||||
<listitem>
|
standard. In the SQL standard, trigger names are not local to
|
||||||
<para>
|
tables, so the command is simply <literal>DROP TRIGGER
|
||||||
There is no <command>DROP TRIGGER</command> statement in
|
<replaceable>name</replaceable></literal>.
|
||||||
<acronym>SQL92</acronym>.
|
</para>
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>SQL99</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The <command>DROP TRIGGER</command> statement in
|
|
||||||
<productname>PostgreSQL</productname> is incompatible with
|
|
||||||
SQL99. In SQL99, trigger names are not local to tables, so the
|
|
||||||
command is simply <literal>DROP TRIGGER
|
|
||||||
<replaceable>name</replaceable></literal>.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
@ -169,6 +130,7 @@ DROP TRIGGER if_dist_exists ON films;
|
|||||||
<member><xref linkend="sql-createtrigger" endterm="sql-createtrigger-title"></member>
|
<member><xref linkend="sql-createtrigger" endterm="sql-createtrigger-title"></member>
|
||||||
</simplelist>
|
</simplelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_type.sgml,v 1.20 2002/11/21 23:34:43 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_type.sgml,v 1.21 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,118 +8,91 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPTYPE-TITLE">DROP TYPE</refentrytitle>
|
<refentrytitle id="SQL-DROPTYPE-TITLE">DROP TYPE</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP TYPE</refname>
|
||||||
DROP TYPE
|
<refpurpose>remove a user-defined data type</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a user-defined data type
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-07-20</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP TYPE <replaceable class="PARAMETER">typename</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
DROP TYPE <replaceable class="PARAMETER">typename</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
||||||
|
</synopsis>
|
||||||
</synopsis>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPTYPE-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">typename</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name (optionally schema-qualified) of an existing type.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the type
|
|
||||||
(such as table columns, functions, operators, etc).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the type if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPTYPE-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP TYPE
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The message returned if the command is successful.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: RemoveType: type '<replaceable class="parameter">typename</replaceable>' does not exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if the specified type is not found.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPTYPE-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<command>DROP TYPE</command> will remove a user type from the
|
|
||||||
system catalogs.
|
|
||||||
</para>
|
|
||||||
<para>
|
<para>
|
||||||
|
<command>DROP TYPE</command> will remove a user-defined data type.
|
||||||
Only the owner of a type can remove it.
|
Only the owner of a type can remove it.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Parameters</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">typename</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name (optionally schema-qualified) of the data type to remove.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>CASCADE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the type (such as
|
||||||
|
table columns, functions, operators).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the type if any objects depend on it. This is
|
||||||
|
the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP TYPE</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the command was successful.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: RemoveType: type '<replaceable class="parameter">typename</replaceable>' does not exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the specified type does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="SQL-DROPTYPE-examples">
|
<refsect1 id="SQL-DROPTYPE-examples">
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
<para>
|
|
||||||
To remove the <type>box</type> type:
|
|
||||||
|
|
||||||
|
<para>
|
||||||
|
To remove the data type <type>box</type>:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
DROP TYPE box;
|
DROP TYPE box;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@ -130,9 +103,10 @@ DROP TYPE box;
|
|||||||
<title>Compatibility</title>
|
<title>Compatibility</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Note that the <command>CREATE TYPE</command> command and the data
|
This command is similar to the corresponding command in the SQL
|
||||||
type extension mechanisms in <productname>PostgreSQL</productname>
|
standard, but note that the <command>CREATE TYPE</command> command
|
||||||
differ from SQL99.
|
and the data type extension mechanisms in
|
||||||
|
<productname>PostgreSQL</productname> differ from the SQL standard.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
@ -143,6 +117,7 @@ DROP TYPE box;
|
|||||||
<member><xref linkend="sql-createtype" endterm="sql-createtype-title"></member>
|
<member><xref linkend="sql-createtype" endterm="sql-createtype-title"></member>
|
||||||
</simplelist>
|
</simplelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_user.sgml,v 1.15 2002/02/27 21:14:54 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_user.sgml,v 1.16 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,6 +8,7 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPUSER-TITLE">DROP USER</refentrytitle>
|
<refentrytitle id="SQL-DROPUSER-TITLE">DROP USER</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>DROP USER</refname>
|
<refname>DROP USER</refname>
|
||||||
<refpurpose>remove a database user account</refpurpose>
|
<refpurpose>remove a database user account</refpurpose>
|
||||||
@ -23,40 +24,36 @@ DROP USER <replaceable class="PARAMETER">name</replaceable>
|
|||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>DROP USER</command> removes the specified user from the database.
|
<command>DROP USER</command> removes the specified user.
|
||||||
It does not remove tables, views, or other objects owned by the user. If the
|
It does not remove tables, views, or other objects owned by the user. If the
|
||||||
user owns any database, an error is raised.
|
user owns any database, an error is raised.
|
||||||
</para>
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<refsect2>
|
<refsect1>
|
||||||
<title>Parameters</title>
|
<title>Parameters</title>
|
||||||
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name of an existing user.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">name</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name of the user to remove.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Diagnostics</title>
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><computeroutput>DROP USER</computeroutput></term>
|
<term><computeroutput>DROP USER</computeroutput></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The message returned if the user is successfully deleted.
|
Message returned if the user was successfully deleted.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -65,7 +62,7 @@ DROP USER <replaceable class="PARAMETER">name</replaceable>
|
|||||||
<term><computeroutput>ERROR: DROP USER: user "<replaceable class="parameter">name</replaceable>" does not exist</computeroutput></term>
|
<term><computeroutput>ERROR: DROP USER: user "<replaceable class="parameter">name</replaceable>" does not exist</computeroutput></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
This message occurs if the user name is not found.
|
Message returned if the specified user does not exist.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -78,18 +75,13 @@ DROP USER <replaceable class="PARAMETER">name</replaceable>
|
|||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Notes</title>
|
<title>Notes</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Use <xref linkend="SQL-CREATEUSER" endterm="SQL-CREATEUSER-title">
|
|
||||||
to add new users, and <xref linkend="SQL-ALTERUSER"
|
|
||||||
endterm="SQL-ALTERUSER-title"> to change a user's attributes.
|
|
||||||
<productname>PostgreSQL</productname> includes a program <xref
|
<productname>PostgreSQL</productname> includes a program <xref
|
||||||
linkend="APP-DROPUSER" endterm="APP-DROPUSER-title"> that has the
|
linkend="APP-DROPUSER" endterm="APP-DROPUSER-title"> that has the
|
||||||
same functionality as this command (in fact, it calls this command)
|
same functionality as this command (in fact, it calls this command)
|
||||||
@ -122,9 +114,8 @@ DROP USER jonathan;
|
|||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<simplelist type="inline">
|
<simplelist type="inline">
|
||||||
<member><xref linkend="sql-createuser" endterm="sql-createuser-title"></member>
|
|
||||||
<member><xref linkend="sql-alteruser" endterm="sql-alteruser-title"></member>
|
<member><xref linkend="sql-alteruser" endterm="sql-alteruser-title"></member>
|
||||||
<member><xref linkend="app-dropuser"></member>
|
<member><xref linkend="sql-createuser" endterm="sql-createuser-title"></member>
|
||||||
</simplelist>
|
</simplelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_view.sgml,v 1.16 2002/11/21 23:34:43 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_view.sgml,v 1.17 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,154 +8,113 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-DROPVIEW-TITLE">DROP VIEW</refentrytitle>
|
<refentrytitle id="SQL-DROPVIEW-TITLE">DROP VIEW</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>DROP VIEW</refname>
|
||||||
DROP VIEW
|
<refpurpose>remove a view</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
remove a view
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-07-20</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
DROP VIEW <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
DROP VIEW <replaceable class="PARAMETER">name</replaceable> [, ...] [ CASCADE | RESTRICT ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPVIEW-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name (optionally schema-qualified) of an existing view.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>CASCADE</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Automatically drop objects that depend on the view
|
|
||||||
(such as other views).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>RESTRICT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Refuse to drop the view if there are any dependent objects.
|
|
||||||
This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPVIEW-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
DROP VIEW
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The message returned if the command is successful.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
ERROR: view <replaceable class="parameter">name</replaceable> does not exist
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
This message occurs if the specified view does not exist in
|
|
||||||
the database.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPVIEW-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<command>DROP VIEW</command> drops an existing view from the database.
|
|
||||||
To execute this command you must be the owner of the
|
|
||||||
view.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-DROPVIEW-3">
|
<para>
|
||||||
<refsect2info>
|
<command>DROP VIEW</command> drops an existing view. To execute
|
||||||
<date>1998-09-22</date>
|
this command you must be the owner of the view.
|
||||||
</refsect2info>
|
</para>
|
||||||
<title>
|
</refsect1>
|
||||||
Notes
|
|
||||||
</title>
|
<refsect1>
|
||||||
<para>
|
<title>Parameters</title>
|
||||||
Refer to <xref linkend="sql-createview" endterm="sql-createview-title">
|
|
||||||
for information on how to create views.
|
<variablelist>
|
||||||
</para>
|
<varlistentry>
|
||||||
</refsect2>
|
<term><replaceable class="PARAMETER">name</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name (optionally schema-qualified) of the view to remove.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>CASCADE</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Automatically drop objects that depend on the view (such as
|
||||||
|
other views).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RESTRICT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Refuse to drop the view if any objects depend on it. This is
|
||||||
|
the default.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPVIEW-2">
|
<refsect1>
|
||||||
<title>
|
<title>Diagnostics</title>
|
||||||
Usage
|
|
||||||
</title>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>DROP VIEW</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the command was successful.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>ERROR: view <replaceable class="parameter">name</replaceable> does not exist</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Message returned if the specified view does not exist.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
This command will remove the view called <literal>kinds</literal>:
|
This command will remove the view called <literal>kinds</literal>:
|
||||||
</para>
|
<programlisting>
|
||||||
<programlisting>
|
|
||||||
DROP VIEW kinds;
|
DROP VIEW kinds;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-DROPVIEW-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
<para>
|
||||||
|
This command conforms to the SQL standard.
|
||||||
<refsect2 id="R2-SQL-DROPVIEW-4">
|
</para>
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-22</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="sql-createview" endterm="sql-createview-title"></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/fetch.sgml,v 1.28 2003/03/27 16:51:27 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/fetch.sgml,v 1.29 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,19 +8,14 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-FETCH-TITLE">FETCH</refentrytitle>
|
<refentrytitle id="SQL-FETCH-TITLE">FETCH</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>FETCH</refname>
|
||||||
FETCH
|
<refpurpose>retrieve rows from a query using a cursor</refpurpose>
|
||||||
</refname>
|
|
||||||
<refpurpose>
|
|
||||||
retrieve rows from a query using a cursor
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>2003-03-11</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
FETCH [ <replaceable class="PARAMETER">direction</replaceable> { FROM | IN } ] <replaceable class="PARAMETER">cursor</replaceable>
|
FETCH [ <replaceable class="PARAMETER">direction</replaceable> { FROM | IN } ] <replaceable class="PARAMETER">cursor</replaceable>
|
||||||
|
|
||||||
where <replaceable class="PARAMETER">direction</replaceable> can be empty or one of:
|
where <replaceable class="PARAMETER">direction</replaceable> can be empty or one of:
|
||||||
@ -39,243 +34,20 @@ where <replaceable class="PARAMETER">direction</replaceable> can be empty or one
|
|||||||
BACKWARD
|
BACKWARD
|
||||||
BACKWARD <replaceable class="PARAMETER">count</replaceable>
|
BACKWARD <replaceable class="PARAMETER">count</replaceable>
|
||||||
BACKWARD ALL
|
BACKWARD ALL
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-FETCH-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2003-03-11</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">direction</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<replaceable class="PARAMETER">direction</replaceable>
|
|
||||||
defines the fetch direction and number of rows to fetch.
|
|
||||||
It can be one of the following:
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term>NEXT</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch next row. This is the default
|
|
||||||
if <replaceable class="PARAMETER">direction</replaceable> is omitted.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>PRIOR</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch prior row.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>FIRST</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch first row of query (same as ABSOLUTE 1).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>LAST</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch last row of query (same as ABSOLUTE -1).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>ABSOLUTE <replaceable class="PARAMETER">count</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch the <replaceable class="PARAMETER">count</replaceable>'th
|
|
||||||
row of query, or the
|
|
||||||
abs(<replaceable class="PARAMETER">count</replaceable>)'th row
|
|
||||||
from the end if
|
|
||||||
<replaceable class="PARAMETER">count</replaceable> < 0.
|
|
||||||
Position before first row or after last row
|
|
||||||
if <replaceable class="PARAMETER">count</replaceable> is out of
|
|
||||||
range; in particular, ABSOLUTE 0 positions before first row.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>RELATIVE <replaceable class="PARAMETER">count</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch the <replaceable class="PARAMETER">count</replaceable>'th
|
|
||||||
succeeding row, or the
|
|
||||||
abs(<replaceable class="PARAMETER">count</replaceable>)'th prior
|
|
||||||
row if <replaceable class="PARAMETER">count</replaceable> < 0.
|
|
||||||
RELATIVE 0 re-fetches current row, if any.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">count</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch the next <replaceable class="PARAMETER">count</replaceable>
|
|
||||||
rows (same as FORWARD <replaceable class="PARAMETER">count</replaceable>).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>ALL</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch all remaining rows (same as FORWARD ALL).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>FORWARD</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch next row (same as NEXT).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>FORWARD <replaceable class="PARAMETER">count</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch next <replaceable class="PARAMETER">count</replaceable>
|
|
||||||
rows. FORWARD 0 re-fetches current row.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>FORWARD ALL</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch all remaining rows.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>BACKWARD</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch prior row (same as PRIOR).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>BACKWARD <replaceable class="PARAMETER">count</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch prior <replaceable class="PARAMETER">count</replaceable>
|
|
||||||
rows (scanning backwards). BACKWARD 0 re-fetches current row.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>BACKWARD ALL</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
fetch all prior rows (scanning backwards).
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">count</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
<replaceable class="PARAMETER">count</replaceable>
|
|
||||||
is a possibly-signed integer constant, determining the location
|
|
||||||
or number of rows to fetch. For FORWARD and BACKWARD cases,
|
|
||||||
specifying a negative <replaceable
|
|
||||||
class="PARAMETER">count</replaceable>
|
|
||||||
is equivalent to changing the sense of FORWARD and BACKWARD.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">cursor</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
An open cursor's name.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-FETCH-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2003-03-11</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
<command>FETCH</command> returns rows from the result of the query defined
|
|
||||||
by the specified cursor.
|
|
||||||
The following messages will be returned if the query fails:
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><computeroutput>
|
|
||||||
WARNING: PerformPortalFetch: portal "<replaceable class="PARAMETER">cursor</replaceable>" not found
|
|
||||||
</computeroutput></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
There is no cursor with the specified name.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-FETCH-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>2003-03-11</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>FETCH</command> retrieves rows using a cursor.
|
<command>FETCH</command> retrieves rows using a cursor.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
A cursor has an associated <firstterm>position</> that is used by
|
A cursor has an associated position, which is used by
|
||||||
<command>FETCH</>. The cursor position can be before the first row of the
|
<command>FETCH</>. The cursor position can be before the first row of the
|
||||||
query result, or on any particular row of the result, or after the last row
|
query result, on any particular row of the result, or after the last row
|
||||||
of the result. When created, a cursor is positioned before the first row.
|
of the result. When created, a cursor is positioned before the first row.
|
||||||
After fetching some rows, the cursor is positioned on the row most recently
|
After fetching some rows, the cursor is positioned on the row most recently
|
||||||
retrieved. If <command>FETCH</> runs off the end of the available rows
|
retrieved. If <command>FETCH</> runs off the end of the available rows
|
||||||
@ -286,166 +58,338 @@ WARNING: PerformPortalFetch: portal "<replaceable class="PARAMETER">cursor</rep
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The SQL-compatible forms (NEXT, PRIOR, FIRST, LAST, ABSOLUTE, RELATIVE)
|
The forms <literal>NEXT</>, <literal>PRIOR</>, <literal>FIRST</>,
|
||||||
fetch a single row after moving the cursor appropriately. If there is
|
<literal>LAST</>, <literal>ABSOLUTE</>, <literal>RELATIVE</> fetch
|
||||||
no such row, an empty result is returned, and the cursor is left positioned
|
a single row after moving the cursor appropriately. If there is no
|
||||||
before the first row or after the last row as appropriate.
|
such row, an empty result is returned, and the cursor is left
|
||||||
|
positioned before the first row or after the last row as
|
||||||
|
appropriate.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The forms using FORWARD and BACKWARD are not in the SQL standard, but
|
The forms using <literal>FORWARD</> and <literal>BACKWARD</>
|
||||||
are <productname>PostgreSQL</productname> extensions. These forms
|
retrieve the indicated number of rows moving in the forward or
|
||||||
retrieve the indicated number of rows moving in the forward or backward
|
backward direction, leaving the cursor positioned on the
|
||||||
direction, leaving the cursor positioned on the last-returned row
|
last-returned row (or after/before all rows, if the <replaceable
|
||||||
(or after/before all rows, if the <replaceable
|
|
||||||
class="PARAMETER">count</replaceable> exceeds the number of rows
|
class="PARAMETER">count</replaceable> exceeds the number of rows
|
||||||
available).
|
available).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<tip>
|
<para>
|
||||||
<para>
|
<literal>RELATIVE 0</>, <literal>FORWARD 0</>, and
|
||||||
RELATIVE 0, FORWARD 0, and BACKWARD 0 all request
|
<literal>BACKWARD 0</> all request fetching the current row without
|
||||||
fetching the current row without moving the
|
moving the cursor, that is, re-fetching the most recently fetched
|
||||||
cursor --- that is, re-fetching the most recently fetched row.
|
row. This will succeed unless the cursor is positioned before the
|
||||||
This will succeed unless the cursor is positioned before the
|
first row or after the last row; in which case, no row is returned.
|
||||||
first row or after the last row; in which case, no row is returned.
|
</para>
|
||||||
</para>
|
|
||||||
</tip>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-FETCH-3">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2003-03-11</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Notes
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The cursor should be declared with the SCROLL option if one intends to
|
|
||||||
use any variants of <command>FETCH</> other than <command>FETCH NEXT</>
|
|
||||||
or <command>FETCH FORWARD</> with a positive count. For simple queries
|
|
||||||
<productname>PostgreSQL</productname> will allow backwards fetch from
|
|
||||||
cursors not declared with SCROLL, but this behavior is best not
|
|
||||||
relied on. If the cursor is declared with NO SCROLL, no backward
|
|
||||||
fetches are allowed.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
ABSOLUTE fetches are not any faster than navigating to the desired row
|
|
||||||
with a relative move: the underlying implementation must traverse all
|
|
||||||
the intermediate rows anyway. Negative absolute fetches are even worse:
|
|
||||||
the query must be read to the end to find the last row, and then
|
|
||||||
traversed backward from there. However, rewinding to the start of the
|
|
||||||
query (as with FETCH ABSOLUTE 0) is fast.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Updating data via a cursor is not supported by
|
|
||||||
<productname>PostgreSQL</productname>, because mapping cursor
|
|
||||||
updates back to base tables is not generally possible, as is also
|
|
||||||
the case with view updates. Consequently, users must issue
|
|
||||||
explicit <command>UPDATE</command> commands to replace data.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<xref linkend="sql-declare" endterm="sql-declare-title">
|
|
||||||
is used to define a cursor.
|
|
||||||
Use
|
|
||||||
<xref linkend="sql-move" endterm="sql-move-title">
|
|
||||||
to change cursor position without retrieving data.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-FETCH-2">
|
<refsect1>
|
||||||
<title>
|
<title>Parameters</title>
|
||||||
Usage
|
|
||||||
</title>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">direction</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<replaceable class="PARAMETER">direction</replaceable> defines
|
||||||
|
the fetch direction and number of rows to fetch. It can be one
|
||||||
|
of the following:
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>NEXT</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch the next row. This is the default if <replaceable
|
||||||
|
class="PARAMETER">direction</replaceable> is omitted.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>PRIOR</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch the prior row.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>FIRST</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch the first row of the query (same as <literal>ABSOLUTE 1</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>LAST</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch the last row of the query (same as <literal>ABSOLUTE -1</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>ABSOLUTE <replaceable class="PARAMETER">count</replaceable></literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch the <replaceable
|
||||||
|
class="PARAMETER">count</replaceable>'th row of the query,
|
||||||
|
or the <literal>abs(<replaceable
|
||||||
|
class="PARAMETER">count</replaceable>)</literal>'th row from
|
||||||
|
the end if <replaceable
|
||||||
|
class="PARAMETER">count</replaceable> is negative. Position
|
||||||
|
before first row or after last row if <replaceable
|
||||||
|
class="PARAMETER">count</replaceable> is out of range; in
|
||||||
|
particular, <literal>ABSOLUTE 0</literal> positions before
|
||||||
|
the first row.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>RELATIVE <replaceable class="PARAMETER">count</replaceable></literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch the <replaceable
|
||||||
|
class="PARAMETER">count</replaceable>'th succeeding row, or
|
||||||
|
the <literal>abs(<replaceable
|
||||||
|
class="PARAMETER">count</replaceable>)</literal>'th prior
|
||||||
|
row if <replaceable class="PARAMETER">count</replaceable> is
|
||||||
|
negative. <literal>RELATIVE 0</literal> re-fetches the
|
||||||
|
current row, if any.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">count</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch the next <replaceable
|
||||||
|
class="PARAMETER">count</replaceable> rows (same as
|
||||||
|
<literal>FORWARD <replaceable
|
||||||
|
class="PARAMETER">count</replaceable></literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>ALL</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch all remaining rows (same as <literal>FORWARD ALL</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>FORWARD</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch the next row (same as <literal>NEXT</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>FORWARD <replaceable class="PARAMETER">count</replaceable></literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch the next <replaceable
|
||||||
|
class="PARAMETER">count</replaceable> rows.
|
||||||
|
<literal>FORWARD 0</literal> re-fetches the current row.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>FORWARD ALL</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch all remaining rows.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>BACKWARD</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch the prior row (same as <literal>PRIOR</literal>).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>BACKWARD <replaceable class="PARAMETER">count</replaceable></literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch the prior <replaceable
|
||||||
|
class="PARAMETER">count</replaceable> rows (scanning
|
||||||
|
backwards). <literal>BACKWARD 0</literal> re-fetches the
|
||||||
|
current row.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>BACKWARD ALL</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Fetch all prior rows (scanning backwards).
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">count</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
<replaceable class="PARAMETER">count</replaceable> is a
|
||||||
|
possibly-signed integer constant, determining the location or
|
||||||
|
number of rows to fetch. For <literal>FORWARD</> and
|
||||||
|
<literal>BACKWARD</> cases, specifying a negative <replaceable
|
||||||
|
class="PARAMETER">count</replaceable> is equivalent to changing
|
||||||
|
the sense of <literal>FORWARD</> and <literal>BACKWARD</>.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">cursor</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
An open cursor's name.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><computeroutput>WARNING: PerformPortalFetch: portal "<replaceable class="PARAMETER">cursor</replaceable>" not found</computeroutput></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
There is no cursor with the specified name.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Notes</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The cursor should be declared with the <literal>SCROLL</literal>
|
||||||
|
option if one intends to use any variants of <command>FETCH</>
|
||||||
|
other than <command>FETCH NEXT</> or <command>FETCH FORWARD</> with
|
||||||
|
a positive count. For simple queries
|
||||||
|
<productname>PostgreSQL</productname> will allow backwards fetch
|
||||||
|
from cursors not declared with <literal>SCROLL</literal>, but this
|
||||||
|
behavior is best not relied on. If the cursor is declared with
|
||||||
|
<literal>NO SCROLL</literal>, no backward fetches are allowed.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<literal>ABSOLUTE</literal> fetches are not any faster than
|
||||||
|
navigating to the desired row with a relative move: the underlying
|
||||||
|
implementation must traverse all the intermediate rows anyway.
|
||||||
|
Negative absolute fetches are even worse: the query must be read to
|
||||||
|
the end to find the last row, and then traversed backward from
|
||||||
|
there. However, rewinding to the start of the query (as with
|
||||||
|
<literal>FETCH ABSOLUTE 0</literal>) is fast.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Updating data via a cursor is currently not supported by
|
||||||
|
<productname>PostgreSQL</productname>.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<xref linkend="sql-declare" endterm="sql-declare-title">
|
||||||
|
is used to define a cursor. Use
|
||||||
|
<xref linkend="sql-move" endterm="sql-move-title">
|
||||||
|
to change cursor position without retrieving data.
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The following example traverses a table using a cursor.
|
The following example traverses a table using a cursor.
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
-- Set up and use a cursor:
|
|
||||||
|
|
||||||
BEGIN WORK;
|
BEGIN WORK;
|
||||||
|
|
||||||
|
-- Set up a cursor:
|
||||||
DECLARE liahona SCROLL CURSOR FOR SELECT * FROM films;
|
DECLARE liahona SCROLL CURSOR FOR SELECT * FROM films;
|
||||||
|
|
||||||
-- Fetch first 5 rows in the cursor liahona:
|
-- Fetch the first 5 rows in the cursor liahona:
|
||||||
FETCH FORWARD 5 IN liahona;
|
FETCH FORWARD 5 FROM liahona;
|
||||||
|
|
||||||
<computeroutput>
|
code | title | did | date_prod | kind | len
|
||||||
code | title | did | date_prod | kind | len
|
|
||||||
-------+-------------------------+-----+------------+----------+-------
|
-------+-------------------------+-----+------------+----------+-------
|
||||||
BL101 | The Third Man | 101 | 1949-12-23 | Drama | 01:44
|
BL101 | The Third Man | 101 | 1949-12-23 | Drama | 01:44
|
||||||
BL102 | The African Queen | 101 | 1951-08-11 | Romantic | 01:43
|
BL102 | The African Queen | 101 | 1951-08-11 | Romantic | 01:43
|
||||||
JL201 | Une Femme est une Femme | 102 | 1961-03-12 | Romantic | 01:25
|
JL201 | Une Femme est une Femme | 102 | 1961-03-12 | Romantic | 01:25
|
||||||
P_301 | Vertigo | 103 | 1958-11-14 | Action | 02:08
|
P_301 | Vertigo | 103 | 1958-11-14 | Action | 02:08
|
||||||
P_302 | Becket | 103 | 1964-02-03 | Drama | 02:28
|
P_302 | Becket | 103 | 1964-02-03 | Drama | 02:28
|
||||||
</computeroutput>
|
|
||||||
|
|
||||||
-- Fetch previous row:
|
-- Fetch the previous row:
|
||||||
FETCH PRIOR FROM liahona;
|
FETCH PRIOR FROM liahona;
|
||||||
|
|
||||||
<computeroutput>
|
code | title | did | date_prod | kind | len
|
||||||
code | title | did | date_prod | kind | len
|
|
||||||
-------+---------+-----+------------+--------+-------
|
-------+---------+-----+------------+--------+-------
|
||||||
P_301 | Vertigo | 103 | 1958-11-14 | Action | 02:08
|
P_301 | Vertigo | 103 | 1958-11-14 | Action | 02:08
|
||||||
</computeroutput>
|
|
||||||
|
|
||||||
-- close the cursor and commit work:
|
|
||||||
|
|
||||||
|
-- Close the cursor and end the transaction:
|
||||||
CLOSE liahona;
|
CLOSE liahona;
|
||||||
COMMIT WORK;
|
COMMIT WORK;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-FETCH-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-FETCH-4">
|
<para>
|
||||||
<refsect2info>
|
The SQL standard defines <command>FETCH</command> for use in
|
||||||
<date>2003-03-11</date>
|
embedded SQL only. This variant of <command>FETCH</command>
|
||||||
</refsect2info>
|
described here returns the data as if it were a
|
||||||
<title>
|
<command>SELECT</command> result rather than placing it in host
|
||||||
SQL92
|
variables. Other than this point, <command>FETCH</command> is
|
||||||
</title>
|
fully upward-compatible with the SQL standard.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<acronym>SQL92</acronym> defines <command>FETCH</command> for use
|
The <command>FETCH</command> forms involving
|
||||||
in embedded contexts only. Therefore, it describes placing the
|
<literal>FORWARD</literal> and <literal>BACKWARD</literal>, as well
|
||||||
results into explicit variables using an <literal>INTO</> clause,
|
as the forms <literal>FETCH <replaceable
|
||||||
for example:
|
class="PARAMETER">count</replaceable></literal> and <literal>FETCH
|
||||||
|
ALL</literal>, in which <literal>FORWARD</literal> is implicit, are
|
||||||
|
<productname>PostgreSQL</productname> extensions.
|
||||||
|
</para>
|
||||||
|
|
||||||
<synopsis>
|
<para>
|
||||||
FETCH ABSOLUTE <replaceable class="PARAMETER">n</replaceable>
|
The SQL standard allows only <literal>FROM</> preceding the cursor
|
||||||
FROM <replaceable class="PARAMETER">cursor</replaceable>
|
name; the option to use <literal>IN</> is an extension.
|
||||||
INTO :<replaceable class="PARAMETER">variable</replaceable> [, ...]
|
</para>
|
||||||
</synopsis>
|
|
||||||
|
|
||||||
<productname>PostgreSQL</productname>'s use of non-embedded
|
|
||||||
cursors is non-standard, and so is its practice of returning the
|
|
||||||
result data as if it were a <command>SELECT</command> result.
|
|
||||||
Other than this point, <command>FETCH</command> is fully
|
|
||||||
upward-compatible with <acronym>SQL92</acronym>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The <command>FETCH</command> forms involving FORWARD and BACKWARD
|
|
||||||
(including the forms FETCH <replaceable
|
|
||||||
class="PARAMETER">count</replaceable> and FETCH ALL, in which
|
|
||||||
FORWARD is implicit) are <productname>PostgreSQL</productname>
|
|
||||||
extensions.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<acronym>SQL92</acronym> allows only <literal>FROM</> preceding the
|
|
||||||
cursor name; the option to use <literal>IN</> is an extension.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/move.sgml,v 1.21 2003/03/27 16:51:27 momjian Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/move.sgml,v 1.22 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,112 +8,74 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-MOVE-TITLE">MOVE</refentrytitle>
|
<refentrytitle id="SQL-MOVE-TITLE">MOVE</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>MOVE</refname>
|
||||||
MOVE
|
<refpurpose>reposition a cursor</refpurpose>
|
||||||
</refname>
|
</refnamediv>
|
||||||
<refpurpose>
|
|
||||||
reposition a cursor
|
|
||||||
</refpurpose>
|
|
||||||
</refnamediv>
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>1999-07-20</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
MOVE [ <replaceable class="PARAMETER">direction</replaceable> { FROM | IN } ] <replaceable class="PARAMETER">cursor</replaceable>
|
MOVE [ <replaceable class="PARAMETER">direction</replaceable> { FROM | IN } ] <replaceable class="PARAMETER">cursor</replaceable>
|
||||||
</synopsis>
|
</synopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-MOVE-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>1998-09-24</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
<command>MOVE</command> repositions a cursor without retrieving any data.
|
<command>MOVE</command> repositions a cursor without retrieving any data.
|
||||||
<command>MOVE</command> works exactly like the <command>FETCH</command>
|
<command>MOVE</command> works exactly like the <command>FETCH</command>
|
||||||
command, except it only repositions the cursor and does not return rows.
|
command, except it only repositions the cursor and does not return rows.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Refer to
|
Refer to
|
||||||
<xref linkend="sql-fetch" endterm="sql-fetch-title">
|
<xref linkend="sql-fetch" endterm="sql-fetch-title">
|
||||||
for details on syntax and usage.
|
for details on syntax and usage.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-MOVE-3">
|
|
||||||
<refsect2info>
|
|
||||||
<date>1998-09-24</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Notes
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The count returned in <command>MOVE</command>'s status string is the
|
|
||||||
count of the number of rows that would have been returned by the
|
|
||||||
equivalent <command>FETCH</command> command.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Refer to
|
|
||||||
<xref linkend="sql-fetch" endterm="sql-fetch-title">
|
|
||||||
for a description of valid arguments.
|
|
||||||
Refer to
|
|
||||||
<xref linkend="sql-declare" endterm="sql-declare-title">
|
|
||||||
to define a cursor.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-MOVE-2">
|
<refsect1>
|
||||||
<title>
|
<title>Diagnostics</title>
|
||||||
Usage
|
|
||||||
</title>
|
|
||||||
<para>
|
<para>
|
||||||
Set up and use a cursor:
|
The count returned in <command>MOVE</command>'s status string is
|
||||||
|
the count of the number of rows that would have been returned by
|
||||||
|
the equivalent <command>FETCH</command> command.
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Examples</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
BEGIN WORK;
|
BEGIN WORK;
|
||||||
DECLARE liahona CURSOR FOR SELECT * FROM films;
|
DECLARE liahona CURSOR FOR SELECT * FROM films;
|
||||||
-- Skip first 5 rows:
|
|
||||||
|
-- Skip the first 5 rows:
|
||||||
MOVE FORWARD 5 IN liahona;
|
MOVE FORWARD 5 IN liahona;
|
||||||
<computeroutput>
|
|
||||||
MOVE 5
|
MOVE 5
|
||||||
</computeroutput>
|
|
||||||
-- Fetch 6th row in the cursor liahona:
|
-- Fetch the 6th row from the cursor liahona:
|
||||||
FETCH 1 IN liahona;
|
FETCH 1 FROM liahona;
|
||||||
<computeroutput>
|
code | title | did | date_prod | kind | len
|
||||||
code | title | did | date_prod | kind | len
|
-------+--------+-----+------------+--------+-------
|
||||||
-------+--------+-----+-----------+--------+-------
|
P_303 | 48 Hrs | 103 | 1982-10-22 | Action | 01:37
|
||||||
P_303 | 48 Hrs | 103 | 1982-10-22| Action | 01:37
|
|
||||||
(1 row)
|
(1 row)
|
||||||
</computeroutput>
|
|
||||||
-- close the cursor liahona and commit work:
|
-- Close the cursor liahona and end the transaction:
|
||||||
CLOSE liahona;
|
CLOSE liahona;
|
||||||
COMMIT WORK;
|
COMMIT WORK;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-MOVE-3">
|
<refsect1>
|
||||||
<title>
|
<title>Compatibility</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-MOVE-4">
|
<para>
|
||||||
<refsect2info>
|
There is no <command>MOVE</command> statement in the SQL standard.
|
||||||
<date>1998-09-01</date>
|
</para>
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
SQL92
|
|
||||||
</title>
|
|
||||||
<para>
|
|
||||||
There is no <acronym>SQL92</acronym> <command>MOVE</command> statement.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.19 2003/03/25 16:15:44 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/reset.sgml,v 1.20 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,95 +8,97 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-RESET-TITLE">RESET</refentrytitle>
|
<refentrytitle id="SQL-RESET-TITLE">RESET</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>RESET</refname>
|
<refname>RESET</refname>
|
||||||
<refpurpose>restore the value of a run-time parameter to a default value</refpurpose>
|
<refpurpose>restore the value of a run-time parameter to the default value</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
RESET <replaceable class="PARAMETER">variable</replaceable>
|
RESET <replaceable class="PARAMETER">parameter</replaceable>
|
||||||
</synopsis>
|
</synopsis>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
RESET ALL
|
RESET ALL
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-RESET-1">
|
|
||||||
<title>Inputs</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">variable</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name of a run-time parameter. See <xref
|
|
||||||
linkend="sql-set" endterm="sql-set-title"> for a list.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>ALL</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Resets all settable run-time parameters to default values.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>RESET</command> restores run-time parameters to their
|
<command>RESET</command> restores run-time parameters to their
|
||||||
default values. Refer to
|
default values. <command>RESET</command> is an alternative
|
||||||
<xref linkend="sql-set" endterm="sql-set-title">
|
spelling for
|
||||||
for details. <command>RESET</command> is an alternate spelling for
|
<synopsis>
|
||||||
|
SET <replaceable class="parameter">parameter</replaceable> TO DEFAULT
|
||||||
<synopsis>
|
</synopsis>
|
||||||
SET <replaceable class="parameter">variable</replaceable> TO DEFAULT
|
Refer to <xref linkend="sql-set" endterm="sql-set-title"> for
|
||||||
</synopsis>
|
details.
|
||||||
|
|
||||||
The default value is defined as the value that the variable would
|
|
||||||
have had, had no <command>SET</> ever been issued for it in the
|
|
||||||
current session. The actual source of this value might be a
|
|
||||||
compiled-in default, the postmaster's configuration file or command-line
|
|
||||||
switches, or per-database or per-user default settings. See
|
|
||||||
<xref linkend="runtime-config"> for details.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
See the <command>SET</> manual page for details on the transaction
|
The default value is defined as the value that the parameter would
|
||||||
behavior of <command>RESET</>.
|
have had, had no <command>SET</> ever been issued for it in the
|
||||||
|
current session. The actual source of this value might be a
|
||||||
|
compiled-in default, the configuration file, command-line options,
|
||||||
|
or per-database or per-user default settings. See <xref
|
||||||
|
linkend="runtime-config"> for details.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
See the <command>SET</> reference page for details on the
|
||||||
|
transaction behavior of <command>RESET</>.
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Parameters</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">parameter</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name of a run-time parameter. See <xref linkend="sql-set"
|
||||||
|
endterm="sql-set-title"> for a list.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>ALL</literal></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Resets all settable run-time parameters to default values.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Diagnostics</title>
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
See under the <xref linkend="sql-set"
|
See under the <xref linkend="sql-set" endterm="sql-set-title">.
|
||||||
endterm="sql-set-title"> command.
|
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
<para>
|
|
||||||
Set <varname>DateStyle</> to its default value:
|
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Set <varname>datestyle</> to its default value:
|
||||||
<screen>
|
<screen>
|
||||||
RESET DateStyle;
|
RESET datestyle;
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Set <varname>geqo</> to its default value:
|
Set <varname>geqo</> to its default value:
|
||||||
|
<screen>
|
||||||
<screen>
|
RESET geqo;
|
||||||
RESET GEQO;
|
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/select_into.sgml,v 1.21 2002/11/21 23:34:43 petere Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/select_into.sgml,v 1.22 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,18 +8,14 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-SELECTINTO-TITLE">SELECT INTO</refentrytitle>
|
<refentrytitle id="SQL-SELECTINTO-TITLE">SELECT INTO</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>
|
<refname>SELECT INTO</refname>
|
||||||
SELECT INTO
|
<refpurpose>create a new table from the results of a query</refpurpose>
|
||||||
</refname>
|
</refnamediv>
|
||||||
<refpurpose>
|
|
||||||
create a new table from the results of a query
|
|
||||||
</refpurpose></refnamediv>
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>2000-12-11</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
SELECT [ ALL | DISTINCT [ ON ( <replaceable class="PARAMETER">expression</replaceable> [, ...] ) ] ]
|
SELECT [ ALL | DISTINCT [ ON ( <replaceable class="PARAMETER">expression</replaceable> [, ...] ) ] ]
|
||||||
* | <replaceable class="PARAMETER">expression</replaceable> [ AS <replaceable class="PARAMETER">output_name</replaceable> ] [, ...]
|
* | <replaceable class="PARAMETER">expression</replaceable> [ AS <replaceable class="PARAMETER">output_name</replaceable> ] [, ...]
|
||||||
INTO [ TEMPORARY | TEMP ] [ TABLE ] <replaceable class="PARAMETER">new_table</replaceable>
|
INTO [ TEMPORARY | TEMP ] [ TABLE ] <replaceable class="PARAMETER">new_table</replaceable>
|
||||||
@ -32,71 +28,11 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="PARAMETER">expression</replac
|
|||||||
[ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
|
[ LIMIT { <replaceable class="PARAMETER">count</replaceable> | ALL } ]
|
||||||
[ OFFSET <replaceable class="PARAMETER">start</replaceable> ]
|
[ OFFSET <replaceable class="PARAMETER">start</replaceable> ]
|
||||||
[ FOR UPDATE [ OF <replaceable class="PARAMETER">tablename</replaceable> [, ...] ] ]
|
[ FOR UPDATE [ OF <replaceable class="PARAMETER">tablename</replaceable> [, ...] ] ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-SELECTINTO-1">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2001-03-20</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Inputs
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term>TEMPORARY</term>
|
|
||||||
<term>TEMP</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
If specified, the table is created as a temporary table.
|
|
||||||
Refer to <xref linkend="sql-createtable" endterm="sql-createtable-title"> for details.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">new_table</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name (optionally schema-qualified) of the table to be created.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
All other inputs are described in detail for
|
|
||||||
<xref linkend="sql-select" endterm="sql-select-title">.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-SELECTINTO-2">
|
|
||||||
<refsect2info>
|
|
||||||
<date>2001-03-20</date>
|
|
||||||
</refsect2info>
|
|
||||||
<title>
|
|
||||||
Outputs
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
Refer to
|
|
||||||
<xref linkend="sql-createtable" endterm="sql-createtable-title">
|
|
||||||
and
|
|
||||||
<xref linkend="sql-select" endterm="sql-select-title">
|
|
||||||
for a summary of possible output messages.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-SELECTINTO-1">
|
<refsect1>
|
||||||
<refsect1info>
|
<title>Description</title>
|
||||||
<date>2001-03-20</date>
|
|
||||||
</refsect1info>
|
|
||||||
<title>
|
|
||||||
Description
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>SELECT INTO</command> creates a new table and fills it
|
<command>SELECT INTO</command> creates a new table and fills it
|
||||||
@ -104,35 +40,81 @@ SELECT [ ALL | DISTINCT [ ON ( <replaceable class="PARAMETER">expression</replac
|
|||||||
client, as it is with a normal <command>SELECT</command>. The new
|
client, as it is with a normal <command>SELECT</command>. The new
|
||||||
table's columns have the names and data types associated with the
|
table's columns have the names and data types associated with the
|
||||||
output columns of the <command>SELECT</command>.
|
output columns of the <command>SELECT</command>.
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Parameters</title>
|
||||||
|
|
||||||
<note>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>TEMPORARY</literal> or <literal>TEMP</literal></term>
|
||||||
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<xref linkend="sql-createtableas" endterm="sql-createtableas-title">
|
If specified, the table is created as a temporary table. Refer
|
||||||
is functionally equivalent to <command>SELECT INTO</command>.
|
to <xref linkend="sql-createtable"
|
||||||
<command>CREATE TABLE AS</command> is the recommended syntax, since
|
endterm="sql-createtable-title"> for details.
|
||||||
<command>SELECT INTO</command> is not standard. In fact, this form of
|
|
||||||
<command>SELECT INTO</command> is not available in <application>PL/pgSQL</application> or <xref linkend="app-ecpg">,
|
|
||||||
because they interpret the INTO clause differently.
|
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">new_table</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name (optionally schema-qualified) of the table to be created.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
All other parameters are described in detail under <xref
|
||||||
|
linkend="sql-select" endterm="sql-select-title">.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-SELECTINTO-2">
|
<refsect1>
|
||||||
<title>
|
<title>Diagnostics</title>
|
||||||
Compatibility
|
|
||||||
</title>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
SQL92 uses <command>SELECT ... INTO</command> to represent selecting
|
Refer to
|
||||||
values into scalar variables of a host program, rather than creating
|
<xref linkend="sql-createtable" endterm="sql-createtable-title">
|
||||||
a new table. This indeed is the usage found in <application>PL/pgSQL</application> and <xref linkend="app-ecpg">.
|
and
|
||||||
The <productname>PostgreSQL</productname> usage of <command>SELECT
|
<xref linkend="sql-select" endterm="sql-select-title">
|
||||||
INTO</command> to represent table creation is historical. It's best
|
for a summary of possible output messages.
|
||||||
to use <command>CREATE TABLE AS</command> for this purpose in new code.
|
</para>
|
||||||
(<command>CREATE TABLE AS</command> isn't standard either, but it's
|
</refsect1>
|
||||||
less likely to cause confusion.)
|
|
||||||
</para>
|
<refsect1>
|
||||||
|
<title>Notes</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
<xref linkend="sql-createtableas" endterm="sql-createtableas-title">
|
||||||
|
is functionally equivalent to <command>SELECT INTO</command>.
|
||||||
|
<command>CREATE TABLE AS</command> is the recommended syntax, since
|
||||||
|
this form of <command>SELECT INTO</command> is not available in
|
||||||
|
<application>ECPG</application> or
|
||||||
|
<application>PL/pgSQL</application>, because they interpret the
|
||||||
|
<literal>INTO</literal> clause differently.
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Compatibility</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The SQL standard uses <command>SELECT ... INTO</command> to
|
||||||
|
represent selecting values into scalar variables of a host program,
|
||||||
|
rather than creating a new table. This indeed is the usage found
|
||||||
|
in <application>ECPG</application> (see <xref linkend="ecpg">) and
|
||||||
|
<application>PL/pgSQL</application> (see <xref linkend="plpgsql">).
|
||||||
|
The <productname>PostgreSQL</productname> usage of <command>SELECT
|
||||||
|
INTO</command> to represent table creation is historical. It's
|
||||||
|
best to use <command>CREATE TABLE AS</command> for this purpose in
|
||||||
|
new code. (<command>CREATE TABLE AS</command> isn't standard
|
||||||
|
either, but it's less likely to cause confusion.)
|
||||||
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.74 2003/04/25 19:45:08 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/set.sgml,v 1.75 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,73 +8,20 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-SET-TITLE">SET</refentrytitle>
|
<refentrytitle id="SQL-SET-TITLE">SET</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>SET</refname>
|
<refname>SET</refname>
|
||||||
<refpurpose>change a run-time parameter</refpurpose>
|
<refpurpose>change a run-time parameter</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
SET [ SESSION | LOCAL ] <replaceable class="PARAMETER">variable</replaceable> { TO | = } { <replaceable class="PARAMETER">value</replaceable> | '<replaceable class="PARAMETER">value</replaceable>' | DEFAULT }
|
SET [ SESSION | LOCAL ] <replaceable class="PARAMETER">variable</replaceable> { TO | = } { <replaceable class="PARAMETER">value</replaceable> | '<replaceable class="PARAMETER">value</replaceable>' | DEFAULT }
|
||||||
SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</replaceable> | LOCAL | DEFAULT }
|
SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</replaceable> | LOCAL | DEFAULT }
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-SET-1">
|
|
||||||
<title>Inputs</title>
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><option>SESSION</></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Specifies that the command takes effect for the current session.
|
|
||||||
(This is the default if neither <option>SESSION</> nor
|
|
||||||
<option>LOCAL</> appears.)
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><option>LOCAL</></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Specifies that the command takes effect for only the current
|
|
||||||
transaction. After <command>COMMIT</> or <command>ROLLBACK</>,
|
|
||||||
the session-level setting takes effect again. Note that
|
|
||||||
<command>SET LOCAL</> will appear to have no effect if it's
|
|
||||||
executed outside a <command>BEGIN</> block, since the transaction
|
|
||||||
will end immediately.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">variable</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Name of a settable run-time parameter.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">value</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
New value of parameter. <option>DEFAULT</option> can be
|
|
||||||
used to specify resetting the parameter to its default
|
|
||||||
value. Lists of strings are allowed, but more complex
|
|
||||||
constructs may need to be single or double quoted.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-SET-1">
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -83,7 +30,7 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
|
|||||||
<xref linkend="runtime-config"> can be changed on-the-fly with
|
<xref linkend="runtime-config"> can be changed on-the-fly with
|
||||||
<command>SET</command>.
|
<command>SET</command>.
|
||||||
(But some require superuser privileges to change, and others cannot
|
(But some require superuser privileges to change, and others cannot
|
||||||
be changed after server or session start.) Note that
|
be changed after server or session start.)
|
||||||
<command>SET</command> only affects the value used by the current
|
<command>SET</command> only affects the value used by the current
|
||||||
session.
|
session.
|
||||||
</para>
|
</para>
|
||||||
@ -114,236 +61,153 @@ SET [ SESSION | LOCAL ] TIME ZONE { <replaceable class="PARAMETER">timezone</rep
|
|||||||
does not start a new transaction block. See the
|
does not start a new transaction block. See the
|
||||||
<varname>autocommit</> section in <xref linkend="runtime-config"> for details.
|
<varname>autocommit</> section in <xref linkend="runtime-config"> for details.
|
||||||
</para>
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>Parameters</title>
|
||||||
|
|
||||||
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>SESSION</></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Specifies that the command takes effect for the current session.
|
||||||
|
(This is the default if neither <literal>SESSION</> nor
|
||||||
|
<literal>LOCAL</> appears.)
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><literal>LOCAL</></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Specifies that the command takes effect for only the current
|
||||||
|
transaction. After <command>COMMIT</> or <command>ROLLBACK</>,
|
||||||
|
the session-level setting takes effect again. Note that
|
||||||
|
<command>SET LOCAL</> will appear to have no effect if it is
|
||||||
|
executed outside a <command>BEGIN</> block, since the
|
||||||
|
transaction will end immediately.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">variable</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
Name of a settable run-time parameter. Available parameters are
|
||||||
|
documented in <xref linkend="runtime-config"> and below.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">value</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
New value of parameter. Values can be specified as string
|
||||||
|
constants, identifiers, numbers, or comma-separated lists of
|
||||||
|
these. <literal>DEFAULT</literal> can be used to specify
|
||||||
|
resetting the parameter to its default value.
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Here are additional details about a few of the parameters that can be set:
|
Besides the configuration parameters documented in <xref
|
||||||
|
linkend="runtime-config">, there are a few that can only be
|
||||||
|
adjusted using the <command>SET</command> command or that have a
|
||||||
|
special syntax:
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><varname>DATESTYLE</></term>
|
<term><literal>NAMES</literal></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Choose the date/time representation style. Two separate
|
<literal>>SET NAMES <replaceable>value</></> is an alias for
|
||||||
settings are involved: the default date/time output format and the
|
<literal>SET client_encoding TO <replaceable>value</></>.
|
||||||
interpretation of ambiguous input.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
The following are date/time output styles:
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><literal>ISO</></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Use ISO 8601-style dates and times (<literal>YYYY-MM-DD
|
|
||||||
HH:MM:SS</literal>). This is the default.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><literal>SQL</></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Use Oracle/Ingres-style dates and times. Note that this
|
|
||||||
style has nothing to do with SQL (which mandates ISO 8601
|
|
||||||
style); the naming of this option is a historical accident.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><literal>PostgreSQL</></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Use traditional <productname>PostgreSQL</productname> format.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><literal>German</></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Use <literal>dd.mm.yyyy</literal> for numeric date representations.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
The following two options determine both a substyle of the
|
|
||||||
<quote>SQL</quote> and <quote>PostgreSQL</quote> output formats
|
|
||||||
and the preferred interpretation of ambiguous date input.
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><literal>European</></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Use <literal>dd/mm/yyyy</literal> for numeric date representations.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term><literal>NonEuropean</></term>
|
|
||||||
<term><literal>US</></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Use <literal>mm/dd/yyyy</literal> for numeric date representations.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
A value for <command>SET DATESTYLE</command> can be one from
|
|
||||||
the first list (output styles), or one from the second list
|
|
||||||
(substyles), or one from each separated by a comma.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<command>SET DATESTYLE</command> affects interpretation of
|
|
||||||
input and provides several standard output formats. For
|
|
||||||
applications needing different variations or tighter control
|
|
||||||
over input or output, consider using
|
|
||||||
the <function>to_char</function> family of
|
|
||||||
functions.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
There are several now-deprecated means for setting the date style
|
|
||||||
in addition to the normal methods of setting it via <command>SET</> or
|
|
||||||
a configuration-file entry:
|
|
||||||
<simplelist>
|
|
||||||
<member>
|
|
||||||
Setting the postmaster's <envar>PGDATESTYLE</envar> environment
|
|
||||||
variable. (This will be overridden by any of the other methods.)
|
|
||||||
</member>
|
|
||||||
<member>
|
|
||||||
Running postmaster using the option <option>-o -e</option> to
|
|
||||||
set dates to the <literal>European</literal> convention.
|
|
||||||
(This overrides environment variables and configuration-file
|
|
||||||
entries.)
|
|
||||||
</member>
|
|
||||||
<member>
|
|
||||||
Setting the client's <envar>PGDATESTYLE</envar> environment variable.
|
|
||||||
If <envar>PGDATESTYLE</envar> is set in the frontend environment of a client
|
|
||||||
based on <application>libpq</>, <application>libpq</> will automatically set <varname>DATESTYLE</> to the
|
|
||||||
value of <envar>PGDATESTYLE</envar> during connection start-up. This is
|
|
||||||
equivalent to a manually issued <command>SET DATESTYLE</>.
|
|
||||||
</member>
|
|
||||||
</simplelist>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>NAMES</term>
|
<term><literal>SEED</literal></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<command>SET NAMES</> is an alias for <command>SET CLIENT_ENCODING</>.
|
Sets the internal seed for the random number generator (the
|
||||||
</para>
|
function <function>random</function>). Allowed values are
|
||||||
</listitem>
|
floating-point numbers between 0 and 1, which are then
|
||||||
</varlistentry>
|
multiplied by 2<superscript>31</>-1.
|
||||||
|
|
||||||
<varlistentry>
|
|
||||||
<term>SEED</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Sets the internal seed for the random number generator.
|
|
||||||
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="parameter">value</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The value for the seed to be used by the
|
|
||||||
<function>random</function> function. Allowed
|
|
||||||
values are floating-point numbers between 0 and 1, which
|
|
||||||
are then multiplied by 2<superscript>31</>-1.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The seed can also be set by invoking the
|
The seed can also be set by invoking the function
|
||||||
<function>setseed</function> SQL function:
|
<function>setseed</function>:
|
||||||
|
<programlisting>
|
||||||
<programlisting>
|
|
||||||
SELECT setseed(<replaceable>value</replaceable>);
|
SELECT setseed(<replaceable>value</replaceable>);
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>TIME ZONE</term>
|
<term><literal>TIME ZONE</literal></term>
|
||||||
<term>TIMEZONE</term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Sets the default time zone for your session. Arguments can be
|
<literal>>SET TIME ZONE <replaceable>value</></> is an alias
|
||||||
an SQL time interval constant, an integer or double precision
|
for <literal>SET timezone TO <replaceable>value</></>. The
|
||||||
constant, or a string representing a time zone name recognized
|
syntax <literal>>SET TIME ZONE</literal> allows special syntax
|
||||||
by the host operating system.
|
for the time zone specification. Here are examples of valid
|
||||||
</para>
|
values:
|
||||||
|
|
||||||
<para>
|
|
||||||
Here are some typical values for time zone settings:
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>'PST8PDT'</term>
|
<term><literal>'PST8PDT'</literal></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Set the time zone for Berkeley, California.
|
The time zone for Berkeley, California.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>'Portugal'</term>
|
<term><literal>'Portugal'</literal></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Set the time zone for Portugal.
|
The time zone for Portugal.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>'Europe/Rome'</term>
|
<term><literal>'Europe/Rome'</literal></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Set the time zone for Italy.
|
The time zone for Italy.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>7</term>
|
<term><literal>7</literal></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Set the time zone to 7 hours offset west from GMT (equivalent
|
The time zone to 7 hours offset west from UTC (equivalent
|
||||||
to PDT).
|
to PDT).
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>INTERVAL '08:00' HOUR TO MINUTE</term>
|
<term><literal>INTERVAL '08:00' HOUR TO MINUTE</literal></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Set the time zone to 8 hours offset west from GMT (equivalent
|
The time zone to 8 hours offset west from UTC (equivalent
|
||||||
to PST).
|
to PST).
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>LOCAL</term>
|
<term><literal>LOCAL</literal></term>
|
||||||
<term>DEFAULT</term>
|
<term><literal>DEFAULT</literal></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Set the time zone to your local time zone (the one that
|
Set the time zone to your local time zone (the one that
|
||||||
@ -352,43 +216,19 @@ SELECT setseed(<replaceable>value</replaceable>);
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
See <xref linkend="datatype-datetime"> for more information
|
||||||
The available time zone names depend on your operating
|
about time zones.
|
||||||
system. For example, on Linux
|
|
||||||
<filename>/usr/share/zoneinfo</filename> contains the database
|
|
||||||
of time zones; the names of the files in that directory can be
|
|
||||||
used as parameters to this command.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If an invalid time zone is specified, the time zone
|
|
||||||
becomes GMT (on most systems anyway).
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
If the <envar>PGTZ</envar> environment variable is set in the frontend
|
|
||||||
environment of a client based on <application>libpq</>, <application>libpq</> will automatically
|
|
||||||
<command>SET TIMEZONE</command> to the value of
|
|
||||||
<envar>PGTZ</envar> during connection start-up.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
|
||||||
Use <xref linkend="SQL-SHOW" endterm="SQL-SHOW-title"> to show the
|
|
||||||
current setting of a parameter.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Diagnostics</title>
|
<title>Diagnostics</title>
|
||||||
<para>
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><computeroutput>SET</computeroutput></term>
|
<term><computeroutput>SET</computeroutput></term>
|
||||||
@ -400,8 +240,7 @@ SELECT setseed(<replaceable>value</replaceable>);
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><computeroutput>ERROR: '<replaceable>name</replaceable>' is not a
|
<term><computeroutput>ERROR: '<replaceable>name</replaceable>' is not a valid option name</computeroutput></term>
|
||||||
valid option name</computeroutput></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
The parameter you tried to set does not exist.
|
The parameter you tried to set does not exist.
|
||||||
@ -410,8 +249,7 @@ SELECT setseed(<replaceable>value</replaceable>);
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><computeroutput>ERROR: '<replaceable>name</replaceable>':
|
<term><computeroutput>ERROR: '<replaceable>name</replaceable>': permission denied</computeroutput></term>
|
||||||
permission denied</computeroutput></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
You must be a superuser to alter certain settings.
|
You must be a superuser to alter certain settings.
|
||||||
@ -420,17 +258,14 @@ SELECT setseed(<replaceable>value</replaceable>);
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><computeroutput>ERROR: '<replaceable>name</replaceable>' cannot
|
<term><computeroutput>ERROR: '<replaceable>name</replaceable>' cannot be changed after server start</computeroutput></term>
|
||||||
be changed after server start</computeroutput></term>
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Some parameters are fixed once the server is started.
|
Some parameters are fixed once the server is started.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
@ -438,81 +273,61 @@ SELECT setseed(<replaceable>value</replaceable>);
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The function <function>set_config</function> provides equivalent
|
The function <function>set_config</function> provides equivalent
|
||||||
capability. See <xref linkend="functions-misc">.
|
functionality. See <xref linkend="functions-misc">.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
Set the schema search path:
|
||||||
|
<programlisting>
|
||||||
|
SET search_path TO my_schema, public;
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Set the style of date to traditional
|
Set the style of date to traditional
|
||||||
<productname>PostgreSQL</productname> with European conventions:
|
<productname>POSTGRES</productname> with European conventions:
|
||||||
<screen>
|
<screen>
|
||||||
SET DATESTYLE TO PostgreSQL,European;
|
SET datestyle TO postgres,european;
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Set the time zone for Berkeley, California, using quotes to
|
Set the time zone for Berkeley, California, using quotes to
|
||||||
preserve the uppercase spelling of the time zone name (note
|
preserve the uppercase spelling of the time zone name:
|
||||||
that the date style is <literal>PostgreSQL</literal> for this
|
<screen>
|
||||||
example):
|
|
||||||
|
|
||||||
<screen>
|
|
||||||
SET TIME ZONE 'PST8PDT';
|
SET TIME ZONE 'PST8PDT';
|
||||||
SELECT CURRENT_TIMESTAMP AS today;
|
SELECT current_timestamp AS today;
|
||||||
today
|
|
||||||
------------------------------------
|
|
||||||
Tue Feb 26 07:32:21.42834 2002 PST
|
|
||||||
</screen>
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
today
|
||||||
Set the time zone for Italy (note the required single quotes to handle
|
|
||||||
the special characters):
|
|
||||||
|
|
||||||
<screen>
|
|
||||||
SET TIME ZONE 'Europe/Rome';
|
|
||||||
SELECT CURRENT_TIMESTAMP AS today;
|
|
||||||
|
|
||||||
today
|
|
||||||
-------------------------------
|
-------------------------------
|
||||||
2002-10-08 05:39:35.008271+02
|
2003-04-29 15:02:01.218622-07
|
||||||
</screen>
|
</screen>
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-SET-3">
|
<refsect1>
|
||||||
<title>Compatibility</title>
|
<title>Compatibility</title>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-SET-4">
|
<para>
|
||||||
<title>
|
<literal>SET TIME ZONE</literal> extends syntax defined in the SQL
|
||||||
SQL92
|
standard. The standard allows only numeric time zone offsets while
|
||||||
</title>
|
<productname>PostgreSQL</productname> allows more flexible
|
||||||
|
time-zone specifications. All other <literal>SET</literal>
|
||||||
<para>
|
features are <productname>PostgreSQL</productname> extensions.
|
||||||
<literal>SET TIME ZONE</literal>
|
</para>
|
||||||
extends syntax defined in
|
|
||||||
<acronym>SQL9x</acronym>. <acronym>SQL9x</acronym> allows
|
|
||||||
only numeric time zone offsets while
|
|
||||||
<productname>PostgreSQL</productname> allows full time zone
|
|
||||||
specifier strings as well. All other <literal>SET</literal>
|
|
||||||
features are
|
|
||||||
<productname>PostgreSQL</productname> extensions.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>See Also</title>
|
<title>See Also</title>
|
||||||
|
|
||||||
<simpara>
|
<simplelist type="inline">
|
||||||
<xref linkend="SQL-SHOW" endterm="SQL-SHOW-title">,
|
<member><xref linkend="SQL-RESET" endterm="SQL-RESET-title"></member>
|
||||||
<xref linkend="SQL-RESET" endterm="SQL-RESET-title">,
|
<member><xref linkend="SQL-SHOW" endterm="SQL-SHOW-title"></member>
|
||||||
<xref linkend="sql-set-constraints" endterm="sql-set-constraints-title">,
|
</simplelist>
|
||||||
<xref linkend="sql-set-session-authorization" endterm="sql-set-session-authorization-title">,
|
|
||||||
<xref linkend="sql-set-transaction" endterm="sql-set-transaction-title">
|
|
||||||
</simpara>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
|
@ -1,20 +1,19 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_constraints.sgml,v 1.5 2002/08/17 12:15:48 momjian Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_constraints.sgml,v 1.6 2003/05/04 02:23:16 petere Exp $ -->
|
||||||
<refentry id="SQL-SET-CONSTRAINTS">
|
<refentry id="SQL-SET-CONSTRAINTS">
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle id="SQL-SET-CONSTRAINTS-title">SET CONSTRAINTS</refentrytitle>
|
<refentrytitle id="SQL-SET-CONSTRAINTS-title">SET CONSTRAINTS</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>SET CONSTRAINTS</refname>
|
<refname>SET CONSTRAINTS</refname>
|
||||||
<refpurpose>set the constraint mode of the current transaction</refpurpose>
|
<refpurpose>set the constraint mode of the current transaction</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<refsynopsisdivinfo>
|
<synopsis>
|
||||||
<date>2000-06-01</date>
|
|
||||||
</refsynopsisdivinfo>
|
|
||||||
<synopsis>
|
|
||||||
SET CONSTRAINTS { ALL | <replaceable class="parameter">constraint</replaceable> [, ...] } { DEFERRED | IMMEDIATE }
|
SET CONSTRAINTS { ALL | <replaceable class="parameter">constraint</replaceable> [, ...] } { DEFERRED | IMMEDIATE }
|
||||||
</synopsis>
|
</synopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
@ -22,39 +21,26 @@ SET CONSTRAINTS { ALL | <replaceable class="parameter">constraint</replaceable>
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>SET CONSTRAINTS</command> sets the behavior of constraint
|
<command>SET CONSTRAINTS</command> sets the behavior of constraint
|
||||||
evaluation in the current transaction. In <option>IMMEDIATE
|
evaluation in the current transaction. In
|
||||||
</option> mode, constraints are checked at the end of each
|
<literal>IMMEDIATE</literal> mode, constraints are checked at the
|
||||||
statement. In <option>DEFERRED</option> mode, constraints are not
|
end of each statement. In <literal>DEFERRED</literal> mode,
|
||||||
checked until transaction commit.
|
constraints are not checked until transaction commit.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<note>
|
|
||||||
<para>
|
|
||||||
This command only alters the behavior of constraints within the
|
|
||||||
current transaction. Thus, if you execute this command outside
|
|
||||||
of an explicit transaction block (such as one started with
|
|
||||||
<command>BEGIN</command>), it will not appear to have any effect.
|
|
||||||
If you wish to change the behavior of a constraint without needing
|
|
||||||
to issue a <command>SET CONSTRAINTS</command> command in every
|
|
||||||
transaction, specify <option>INITIALLY DEFERRED</option> or
|
|
||||||
<option>INITIALLY IMMEDIATE</option> when you create the constraint.
|
|
||||||
</para>
|
|
||||||
</note>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
When you change the mode of a constraint to be <option>IMMEDIATE
|
When you change the mode of a constraint to be
|
||||||
</option>, the new constraint mode takes effect retroactively:
|
<literal>IMMEDIATE</literal>, the new constraint mode takes effect
|
||||||
any outstanding data modifications that would have been checked
|
retroactively: any outstanding data modifications that would have
|
||||||
at the end of the transaction (when using
|
been checked at the end of the transaction (when using
|
||||||
<option>DEFERRED</option>) are instead checked during the
|
<literal>DEFERRED</literal>) are instead checked during the
|
||||||
execution of the <command>SET CONSTRAINTS</command> command.
|
execution of the <command>SET CONSTRAINTS</command> command.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Upon creation, a constraint is always give one of three
|
Upon creation, a constraint is always give one of three
|
||||||
characteristics: <option>INITIALLY DEFERRED</option>,
|
characteristics: <literal>INITIALLY DEFERRED</literal>,
|
||||||
<option>INITIALLY IMMEDIATE DEFERRABLE</option>, or
|
<literal>INITIALLY IMMEDIATE DEFERRABLE</literal>, or
|
||||||
<option>INITIALLY IMMEDIATE NOT DEFERRABLE</option>. The third
|
<literal>INITIALLY IMMEDIATE NOT DEFERRABLE</literal>. The third
|
||||||
class is not affected by the <command>SET CONSTRAINTS</command>
|
class is not affected by the <command>SET CONSTRAINTS</command>
|
||||||
command.
|
command.
|
||||||
</para>
|
</para>
|
||||||
@ -66,21 +52,30 @@ SET CONSTRAINTS { ALL | <replaceable class="parameter">constraint</replaceable>
|
|||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-SET-CONSTRAINT-3">
|
<refsect1>
|
||||||
|
<title>Notes</title>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
This command only alters the behavior of constraints within the
|
||||||
|
current transaction. Thus, if you execute this command outside of a
|
||||||
|
transaction block
|
||||||
|
(<command>BEGIN</command>/<command>COMMIT</command> pair), it will
|
||||||
|
not appear to have any effect. If you wish to change the behavior
|
||||||
|
of a constraint without needing to issue a <command>SET
|
||||||
|
CONSTRAINTS</command> command in every transaction, specify
|
||||||
|
<literal>INITIALLY DEFERRED</literal> or <literal>INITIALLY
|
||||||
|
IMMEDIATE</literal> when you create the constraint.
|
||||||
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
<title>Compatibility</title>
|
<title>Compatibility</title>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-SET-CONSTRAINT-4">
|
<para>
|
||||||
<title>SQL92, SQL99</title>
|
This command complies with the behavior defined in the SQL
|
||||||
|
standard, except for the limitation that, in PostgreSQL, it only
|
||||||
<para>
|
applies to foreign-key constraints.
|
||||||
<command>SET CONSTRAINTS</command> is defined in
|
</para>
|
||||||
<acronym>SQL92</acronym> and <acronym>SQL99</acronym>. The
|
|
||||||
implementation in <productname>PostgreSQL</productname> complies
|
|
||||||
with the behavior defined in the standard, except for the
|
|
||||||
<productname>PostgreSQL</productname> limitation that <command>SET
|
|
||||||
CONSTRAINTS</command> cannot be applied to check or unique constraints.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_session_auth.sgml,v 1.8 2003/02/19 04:06:28 momjian Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_session_auth.sgml,v 1.9 2003/05/04 02:23:16 petere Exp $ -->
|
||||||
<refentry id="SQL-SET-SESSION-AUTHORIZATION">
|
<refentry id="SQL-SET-SESSION-AUTHORIZATION">
|
||||||
<docinfo>
|
|
||||||
<date>2001-04-21</date>
|
|
||||||
</docinfo>
|
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle id="sql-set-session-authorization-title">SET SESSION AUTHORIZATION</refentrytitle>
|
<refentrytitle id="sql-set-session-authorization-title">SET SESSION AUTHORIZATION</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
@ -16,7 +12,7 @@
|
|||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
SET [ SESSION | LOCAL ] SESSION AUTHORIZATION <replaceable class="PARAMETER">username</replaceable>
|
SET [ SESSION | LOCAL ] SESSION AUTHORIZATION <replaceable class="parameter">username</replaceable>
|
||||||
SET [ SESSION | LOCAL ] SESSION AUTHORIZATION DEFAULT
|
SET [ SESSION | LOCAL ] SESSION AUTHORIZATION DEFAULT
|
||||||
RESET SESSION AUTHORIZATION
|
RESET SESSION AUTHORIZATION
|
||||||
</synopsis>
|
</synopsis>
|
||||||
@ -28,11 +24,10 @@ RESET SESSION AUTHORIZATION
|
|||||||
<para>
|
<para>
|
||||||
This command sets the session user identifier and the current user
|
This command sets the session user identifier and the current user
|
||||||
identifier of the current SQL-session context to be <replaceable
|
identifier of the current SQL-session context to be <replaceable
|
||||||
class="PARAMETER">username</replaceable>. The user name may be
|
class="parameter">username</replaceable>. The user name may be
|
||||||
written as either an identifier or a string literal. The session
|
written as either an identifier or a string literal. Using this
|
||||||
user identifier is valid for the duration of a connection; for
|
command, it is possible, for example, to temporarily become an
|
||||||
example, it is possible to temporarily become an unprivileged user
|
unprivileged user and later switch back to become a superuser.
|
||||||
and later switch back to become a superuser.
|
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -52,7 +47,7 @@ RESET SESSION AUTHORIZATION
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <option>SESSION</> and <option>LOCAL</> modifiers act the same
|
The <literal>SESSION</> and <literal>LOCAL</> modifiers act the same
|
||||||
as for the regular <xref linkend="SQL-SET" endterm="SQL-SET-title">
|
as for the regular <xref linkend="SQL-SET" endterm="SQL-SET-title">
|
||||||
command.
|
command.
|
||||||
</para>
|
</para>
|
||||||
@ -60,9 +55,8 @@ RESET SESSION AUTHORIZATION
|
|||||||
<para>
|
<para>
|
||||||
The <literal>DEFAULT</> and <literal>RESET</> forms reset the session
|
The <literal>DEFAULT</> and <literal>RESET</> forms reset the session
|
||||||
and current user identifiers to be the originally authenticated user
|
and current user identifiers to be the originally authenticated user
|
||||||
name. These forms are always accepted.
|
name. These forms may be executed by any user.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
@ -88,18 +82,16 @@ SELECT SESSION_USER, CURRENT_USER;
|
|||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Compatibility</title>
|
<title>Compatibility</title>
|
||||||
|
|
||||||
<simpara>SQL99</simpara>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
SQL99 allows some other expressions to appear in place of the
|
The SQL standard allows some other expressions to appear in place
|
||||||
literal <parameter>username</parameter> which are not important in
|
of the literal <replaceable>username</replaceable> which are not
|
||||||
practice. <application>PostgreSQL</application> allows identifier
|
important in practice. <application>PostgreSQL</application>
|
||||||
syntax (<literal>"username"</literal>), which SQL does not. SQL
|
allows identifier syntax (<literal>"username"</literal>), which SQL
|
||||||
does not allow this command during a transaction;
|
does not. SQL does not allow this command during a transaction;
|
||||||
<application>PostgreSQL</application> does not make
|
<application>PostgreSQL</application> does not make this
|
||||||
this restriction because there is no reason to. The
|
restriction because there is no reason to. The privileges
|
||||||
privileges necessary to execute this command are left
|
necessary to execute this command are left implementation-defined
|
||||||
implementation-defined by the standard.
|
by the standard.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.13 2003/03/25 16:15:44 petere Exp $ -->
|
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/ref/set_transaction.sgml,v 1.14 2003/05/04 02:23:16 petere Exp $ -->
|
||||||
<refentry id="SQL-SET-TRANSACTION">
|
<refentry id="SQL-SET-TRANSACTION">
|
||||||
<docinfo>
|
|
||||||
<date>2000-11-24</date>
|
|
||||||
</docinfo>
|
|
||||||
|
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle id="SQL-SET-TRANSACTION-TITLE">SET TRANSACTION</refentrytitle>
|
<refentrytitle id="SQL-SET-TRANSACTION-TITLE">SET TRANSACTION</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
@ -15,12 +11,12 @@
|
|||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
SET TRANSACTION
|
SET TRANSACTION
|
||||||
[ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]
|
[ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]
|
||||||
SET SESSION CHARACTERISTICS AS TRANSACTION
|
SET SESSION CHARACTERISTICS AS TRANSACTION
|
||||||
[ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]
|
[ ISOLATION LEVEL { READ COMMITTED | SERIALIZABLE } ] [ READ WRITE | READ ONLY ]
|
||||||
</synopsis>
|
</synopsis>
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
@ -28,8 +24,8 @@ SET SESSION CHARACTERISTICS AS TRANSACTION
|
|||||||
|
|
||||||
<para>
|
<para>
|
||||||
The <command>SET TRANSACTION</command> command sets the transaction
|
The <command>SET TRANSACTION</command> command sets the transaction
|
||||||
characteristics of the current SQL-transaction. It has no effect on
|
characteristics of the current transaction. It has no effect on any
|
||||||
any subsequent transactions. <command>SET SESSION
|
subsequent transactions. <command>SET SESSION
|
||||||
CHARACTERISTICS</command> sets the default transaction
|
CHARACTERISTICS</command> sets the default transaction
|
||||||
characteristics for each transaction of a session. <command>SET
|
characteristics for each transaction of a session. <command>SET
|
||||||
TRANSACTION</command> can override it for an individual
|
TRANSACTION</command> can override it for an individual
|
||||||
@ -80,7 +76,9 @@ SET SESSION CHARACTERISTICS AS TRANSACTION
|
|||||||
or data-modification statement (<command>SELECT</command>,
|
or data-modification statement (<command>SELECT</command>,
|
||||||
<command>INSERT</command>, <command>DELETE</command>,
|
<command>INSERT</command>, <command>DELETE</command>,
|
||||||
<command>UPDATE</command>, <command>FETCH</command>,
|
<command>UPDATE</command>, <command>FETCH</command>,
|
||||||
<command>COPY</command>) of a transaction has been executed.
|
<command>COPY</command>) of a transaction has been executed. See
|
||||||
|
<xref linkend="mvcc"> for more information about transaction
|
||||||
|
isolation and concurrency control.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -117,25 +115,23 @@ SET default_transaction_isolation = '<replaceable>value</replaceable>'
|
|||||||
<refsect1 id="R1-SQL-SET-TRANSACTION-3">
|
<refsect1 id="R1-SQL-SET-TRANSACTION-3">
|
||||||
<title>Compatibility</title>
|
<title>Compatibility</title>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-SET-TRANSACTION-4">
|
<para>
|
||||||
<title>SQL92, SQL99</title>
|
Both commands are defined in the SQL standard.
|
||||||
|
<literal>SERIALIZABLE</literal> is the default transaction
|
||||||
|
isolation level in <acronym>SQL</acronym>; in PostgreSQL it is
|
||||||
|
<literal>READ COMMITED</literal>, but you can change it as
|
||||||
|
described above. <productname>PostgreSQL</productname> does not
|
||||||
|
provide the isolation levels <literal>READ UNCOMMITTED</literal>
|
||||||
|
and <literal>REPEATABLE READ</literal>. Because of multiversion
|
||||||
|
concurrency control, the <literal>SERIALIZABLE</literal> level is
|
||||||
|
not truly serializable. See <xref linkend="mvcc"> for details.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<option>SERIALIZABLE</option> is the default transaction isolation level in
|
In the SQL standard, there is one other transaction characteristic
|
||||||
<acronym>SQL</acronym>. <productname>PostgreSQL</productname> does
|
that can be set with these commands: the size of the diagnostics
|
||||||
not provide the isolation levels <option>READ UNCOMMITTED</option>
|
area. This concept is only for use in embedded SQL.
|
||||||
and <option>REPEATABLE READ</option>. Because of multiversion
|
</para>
|
||||||
concurrency control, the <option>SERIALIZABLE</option> level is not
|
|
||||||
truly serializable. See <xref linkend="mvcc"> for details.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
In <acronym>SQL</acronym> there is one other transaction
|
|
||||||
characteristic that can be set with these commands: the size of
|
|
||||||
the diagnostics area. This concept is not supported in
|
|
||||||
<productname>PostgreSQL</productname>.
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.25 2003/04/25 19:45:08 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/ref/show.sgml,v 1.26 2003/05/04 02:23:16 petere Exp $
|
||||||
PostgreSQL documentation
|
PostgreSQL documentation
|
||||||
-->
|
-->
|
||||||
|
|
||||||
@ -8,58 +8,34 @@ PostgreSQL documentation
|
|||||||
<refentrytitle id="SQL-SHOW-TITLE">SHOW</refentrytitle>
|
<refentrytitle id="SQL-SHOW-TITLE">SHOW</refentrytitle>
|
||||||
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
<refmiscinfo>SQL - Language Statements</refmiscinfo>
|
||||||
</refmeta>
|
</refmeta>
|
||||||
|
|
||||||
<refnamediv>
|
<refnamediv>
|
||||||
<refname>SHOW</refname>
|
<refname>SHOW</refname>
|
||||||
<refpurpose>show the value of a run-time parameter</refpurpose>
|
<refpurpose>show the value of a run-time parameter</refpurpose>
|
||||||
</refnamediv>
|
</refnamediv>
|
||||||
|
|
||||||
<refsynopsisdiv>
|
<refsynopsisdiv>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
SHOW <replaceable class="PARAMETER">name</replaceable>
|
SHOW <replaceable class="PARAMETER">name</replaceable>
|
||||||
</synopsis>
|
</synopsis>
|
||||||
<synopsis>
|
<synopsis>
|
||||||
SHOW ALL
|
SHOW ALL
|
||||||
</synopsis>
|
</synopsis>
|
||||||
|
|
||||||
<refsect2 id="R2-SQL-SHOW-1">
|
|
||||||
<title>Inputs</title>
|
|
||||||
|
|
||||||
<para>
|
|
||||||
<variablelist>
|
|
||||||
<varlistentry>
|
|
||||||
<term><replaceable class="PARAMETER">name</replaceable></term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
The name of a run-time parameter. See
|
|
||||||
<xref linkend="sql-set" endterm="sql-set-title">
|
|
||||||
for a list.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
<varlistentry>
|
|
||||||
<term>ALL</term>
|
|
||||||
<listitem>
|
|
||||||
<para>
|
|
||||||
Show all current session parameters.
|
|
||||||
</para>
|
|
||||||
</listitem>
|
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect2>
|
|
||||||
|
|
||||||
</refsynopsisdiv>
|
</refsynopsisdiv>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-SHOW-1">
|
<refsect1>
|
||||||
<title>Description</title>
|
<title>Description</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<command>SHOW</command> will display the current setting of
|
<command>SHOW</command> will display the current setting of
|
||||||
run-time parameters. These variables can be set using the
|
run-time parameters. These variables can be set using the
|
||||||
<command>SET</command> statement, by editing the
|
<command>SET</command> statement, by editing the
|
||||||
<filename>postgresql.conf</filename> configuration file, through the
|
<filename>postgresql.conf</filename> configuration file, through
|
||||||
<envar>PGOPTIONS</envar> environmental variable (when using libpq
|
the <envar>PGOPTIONS</envar> environmental variable (when using
|
||||||
or a libpq-based application), or through
|
<application>libpq</> or a <application>libpq</>-based
|
||||||
command-line flags when starting the
|
application), or through command-line flags when starting the
|
||||||
<application>postmaster</application>.
|
<command>postmaster</command>. See <xref
|
||||||
|
linkend="runtime-config"> for details.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -67,83 +43,96 @@ SHOW ALL
|
|||||||
does not start a new transaction block. See the
|
does not start a new transaction block. See the
|
||||||
<varname>autocommit</> section in <xref linkend="runtime-config"> for details.
|
<varname>autocommit</> section in <xref linkend="runtime-config"> for details.
|
||||||
</para>
|
</para>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
<para>
|
<refsect1>
|
||||||
Available parameters are documented in
|
<title>Parameters</title>
|
||||||
<xref linkend="runtime-config"> and on the
|
|
||||||
<xref linkend="SQL-SET" endterm="SQL-SET-title"> reference page.
|
|
||||||
In addition, there are a few parameters that can be shown but not set:
|
|
||||||
|
|
||||||
<variablelist>
|
<variablelist>
|
||||||
|
<varlistentry>
|
||||||
|
<term><replaceable class="PARAMETER">name</replaceable></term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
The name of a run-time parameter. Available parameters are
|
||||||
|
documented in <xref linkend="runtime-config"> and on the <xref
|
||||||
|
linkend="SQL-SET" endterm="SQL-SET-title"> reference page. In
|
||||||
|
addition, there are a few parameters that can be shown but not
|
||||||
|
set:
|
||||||
|
|
||||||
<varlistentry>
|
<variablelist>
|
||||||
<term>SERVER_VERSION</term>
|
<varlistentry>
|
||||||
<listitem>
|
<term><literal>SERVER_VERSION</literal></term>
|
||||||
<para>
|
<listitem>
|
||||||
Shows the server's version number.
|
<para>
|
||||||
</para>
|
Shows the server's version number.
|
||||||
</listitem>
|
</para>
|
||||||
</varlistentry>
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>SERVER_ENCODING</term>
|
<term><literal>SERVER_ENCODING</literal></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Shows the server-side multibyte encoding. At present, this
|
Shows the server-side character set encoding. At present,
|
||||||
parameter can be shown but not set, because the encoding is
|
this parameter can be shown but not set, because the
|
||||||
determined at database creation time.
|
encoding is determined at database creation time.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>LC_COLLATE</term>
|
<term><literal>LC_COLLATE</literal></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Shows the database's locale setting for collation (text ordering).
|
Shows the database's locale setting for collation (text
|
||||||
At present, this parameter can be shown but not set, because the
|
ordering). At present, this parameter can be shown but not
|
||||||
setting is determined at <application>initdb</> time.
|
set, because the setting is determined at
|
||||||
</para>
|
<command>initdb</> time.
|
||||||
</listitem>
|
</para>
|
||||||
</varlistentry>
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term>LC_CTYPE</term>
|
<term><literal>LC_CTYPE</literal></term>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Shows the database's locale setting for character set considerations.
|
Shows the database's locale setting for character
|
||||||
At present, this parameter can be shown but not set, because the
|
classification. At present, this parameter can be shown but
|
||||||
setting is determined at <application>initdb</> time.
|
not set, because the setting is determined at
|
||||||
</para>
|
<command>initdb</> time.
|
||||||
</listitem>
|
</para>
|
||||||
</varlistentry>
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
|
</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
<varlistentry>
|
||||||
</para>
|
<term><literal>ALL</literal></term>
|
||||||
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Use <xref linkend="SQL-SET" endterm="SQL-SET-title"> to set the value
|
Show the values of all configurations parameters.
|
||||||
of settable parameters.
|
</para>
|
||||||
</para>
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
<title>Diagnostics</title>
|
<title>Diagnostics</title>
|
||||||
|
|
||||||
<para>
|
<variablelist>
|
||||||
<variablelist>
|
<varlistentry>
|
||||||
<varlistentry>
|
<term><computeroutput>ERROR: Option '<replaceable>name</replaceable>' is not recognized</computeroutput></term>
|
||||||
<term><computeroutput>ERROR: Option '<replaceable>name</replaceable>'
|
<listitem>
|
||||||
is not recognized</computeroutput></term>
|
<para>
|
||||||
<listitem>
|
Message returned if <replaceable>name</replaceable> does not
|
||||||
<para>
|
stand for a known parameter.
|
||||||
Message returned if <replaceable>name</replaceable> does
|
</para>
|
||||||
not stand for a known parameter.
|
</listitem>
|
||||||
</para>
|
</varlistentry>
|
||||||
</listitem>
|
</variablelist>
|
||||||
</varlistentry>
|
|
||||||
</variablelist>
|
|
||||||
</para>
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
@ -155,10 +144,11 @@ SHOW ALL
|
|||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-SHOW-2">
|
<refsect1>
|
||||||
<title>Examples</title>
|
<title>Examples</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Show the current <varname>DateStyle</varname> setting:
|
Show the current setting of the parameter <varname>DateStyle</varname>:
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
SHOW DateStyle;
|
SHOW DateStyle;
|
||||||
@ -170,10 +160,9 @@ SHOW DateStyle;
|
|||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Show whether the genetic query optimizer is enabled by displaying
|
Show the current setting of the parameter <varname>geqo</varname>:
|
||||||
the <varname>geqo</varname> setting:
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
SHOW GEQO;
|
SHOW geqo;
|
||||||
geqo
|
geqo
|
||||||
------
|
------
|
||||||
on
|
on
|
||||||
@ -198,10 +187,9 @@ SHOW ALL;
|
|||||||
(94 rows)
|
(94 rows)
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1 id="R1-SQL-SHOW-3">
|
<refsect1>
|
||||||
<title>Compatibility</title>
|
<title>Compatibility</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@ -209,6 +197,15 @@ SHOW ALL;
|
|||||||
<productname>PostgreSQL</productname> extension.
|
<productname>PostgreSQL</productname> extension.
|
||||||
</para>
|
</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
<refsect1>
|
||||||
|
<title>See Also</title>
|
||||||
|
|
||||||
|
<simplelist type="inline">
|
||||||
|
<member><xref linkend="SQL-SET" endterm="SQL-SET-title"></member>
|
||||||
|
</simplelist>
|
||||||
|
</refsect1>
|
||||||
|
|
||||||
</refentry>
|
</refentry>
|
||||||
|
|
||||||
<!-- Keep this comment at the end of the file
|
<!-- Keep this comment at the end of the file
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!--
|
<!--
|
||||||
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.177 2003/04/04 03:03:53 tgl Exp $
|
$Header: /cvsroot/pgsql/doc/src/sgml/runtime.sgml,v 1.178 2003/05/04 02:23:16 petere Exp $
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<Chapter Id="runtime">
|
<Chapter Id="runtime">
|
||||||
@ -1384,9 +1384,10 @@ SET ENABLE_SEQSCAN TO OFF;
|
|||||||
<indexterm><primary>date style</></>
|
<indexterm><primary>date style</></>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Sets the display format for date and time values, as well as the rules for
|
Sets the display format for date and time values, as well as
|
||||||
interpreting ambiguous date input values.
|
the rules for interpreting ambiguous date input values. See
|
||||||
The default is <literal>ISO, US</>.
|
<xref linkend="datatype-datetime"> for more information. The
|
||||||
|
default is <literal>ISO, US</>.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -1556,7 +1557,7 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
|
|||||||
<para>
|
<para>
|
||||||
This parameter adjusts the number of digits displayed for
|
This parameter adjusts the number of digits displayed for
|
||||||
floating-point values, including <type>float4</>, <type>float8</>,
|
floating-point values, including <type>float4</>, <type>float8</>,
|
||||||
and geometric datatypes. The parameter value is added to the
|
and geometric data types. The parameter value is added to the
|
||||||
standard number of digits (<literal>FLT_DIG</> or <literal>DBL_DIG</>
|
standard number of digits (<literal>FLT_DIG</> or <literal>DBL_DIG</>
|
||||||
as appropriate). The value can be set as high as 2, to include
|
as appropriate). The value can be set as high as 2, to include
|
||||||
partially-significant digits; this is especially useful for dumping
|
partially-significant digits; this is especially useful for dumping
|
||||||
@ -1813,26 +1814,28 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
|
|||||||
<indexterm><primary>preload_libraries</></>
|
<indexterm><primary>preload_libraries</></>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
This variable specifies one or more shared libraries that are to be
|
This variable specifies one or more shared libraries that are
|
||||||
preloaded at Postmaster start. An initialization function can also be
|
to be preloaded at server start. An initialization function
|
||||||
optionally specified by adding a colon followed by the name of the
|
can also be optionally specified by adding a colon followed by
|
||||||
initialization function after the library name. For example
|
the name of the initialization function after the library
|
||||||
<literal>'$libdir/mylib:init_mylib'</literal> would cause <literal>mylib</>
|
name. For example
|
||||||
to be preloaded and <literal>init_mylib</> to be executed. If more than
|
<literal>'$libdir/mylib:init_mylib'</literal> would cause
|
||||||
one library is to be loaded, they must be delimited with a comma.
|
<literal>mylib</> to be preloaded and <literal>init_mylib</>
|
||||||
|
to be executed. If more than one library is to be loaded, they
|
||||||
|
must be delimited with a comma.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If <literal>mylib</> is not found, the postmaster will fail to start.
|
If <literal>mylib</> is not found, the server will fail to
|
||||||
However, if <literal>init_mylib</> is not found, <literal>mylib</> will
|
start. However, if <literal>init_mylib</> is not found,
|
||||||
still be preloaded without executing the initialization function.
|
<literal>mylib</> will still be preloaded without executing
|
||||||
|
the initialization function.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
By preloading a shared library (and initializing it if applicable),
|
By preloading a shared library (and initializing it if
|
||||||
the library startup time is avoided when the library is used later in a
|
applicable), the library startup time is avoided when the
|
||||||
specific backend. However there is a cost in terms of memory duplication
|
library is first used.
|
||||||
as every backend is forked, whether or not the library is used.
|
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@ -2057,9 +2060,10 @@ dynamic_library_path = '/usr/local/lib/postgresql:/home/my_project/lib:$libdir'
|
|||||||
<indexterm><primary>time zone</></>
|
<indexterm><primary>time zone</></>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
Sets the time zone for displaying and interpreting time stamps.
|
Sets the time zone for displaying and interpreting time
|
||||||
The default is to use whatever the system environment
|
stamps. The default is to use whatever the system environment
|
||||||
specifies as the time zone.
|
specifies as the time zone. See <xref
|
||||||
|
linkend="datatype-datetime"> for more information.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user