UA501|West Side Story |105|1961-01-03|Musical | 02:32
UA501|West Side Story |105|1961-01-03|Musical | 02:32
TC901|The King and I |109|1956-08-11|Musical | 02:13
TC901|The King and I |109|1956-08-11|Musical | 02:13
WD101|Bed Knobs and Broomsticks|111| |Musical | 01:57
WD101|Bed Knobs and Broomsticks|111| |Musical | 01:57
(3 rows)
</ProgramListing>
</ProgramListing>
<para>
<para>
Clear the table films:
Clear the table <literal>films</literal>:
</para>
</para>
<programlisting>
<programlisting>
DELETE FROM films;
DELETE FROM films;
SELECT * FROM films;
SELECT * FROM films;
code|title|did|date_prod|kind|len
code|title|did|date_prod|kind|len
----+-----+---+---------+----+---
----+-----+---+---------+----+---
(0 rows)
(0 rows)
</programlisting>
</programlisting>
</REFSECT1>
</REFSECT1>
...
@@ -177,14 +170,15 @@
...
@@ -177,14 +170,15 @@
SQL92
SQL92
</TITLE>
</TITLE>
<PARA>
<PARA>
SQL92 defines a different syntax for a positioned DELETE statement:
<acronym>SQL92</acronym> allows a positioned DELETE statement:
</PARA>
</PARA>
<synopsis>
<synopsis>
DELETE FROM <replaceable class="parameter">table</replaceable> WHERE CURRENT OF <replaceable class="parameter">cursor</replaceable>
DELETE FROM <replaceable class="parameter">table</replaceable> WHERE CURRENT OF <replaceable class="parameter">cursor</replaceable>
</synopsis>
</synopsis>
<para>
<para>
where <replaceable class="parameter">cursor</replaceable> identifies an open cursor.</para>
where <replaceable class="parameter">cursor</replaceable> identifies an open cursor. Interactive cursors in <productname>Postgres</productname> are read-only.
(Refer to the <citetitle>PostgreSQL User's Guide</citetitle> for
further information about data types).
further information about data types).
<comment>This should become a cross-reference rather than a
<comment>This should become a cross-reference rather than a
hard-coded chapter number</comment>
hard-coded chapter number</comment>
...
@@ -61,9 +55,6 @@
...
@@ -61,9 +55,6 @@
</LISTITEM>
</LISTITEM>
</VARLISTENTRY>
</VARLISTENTRY>
</variablelist>
</variablelist>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
</REFSECT2>
</REFSECT2>
<REFSECT2 ID="R2-SQL-DROPAGGREGATE-2">
<REFSECT2 ID="R2-SQL-DROPAGGREGATE-2">
...
@@ -78,6 +69,7 @@
...
@@ -78,6 +69,7 @@
<VARIABLELIST>
<VARIABLELIST>
<VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<TERM>
<replaceable>status</replaceable>
</TERM>
</TERM>
<LISTITEM>
<LISTITEM>
<PARA>
<PARA>
...
@@ -94,7 +86,7 @@
...
@@ -94,7 +86,7 @@
</VARLISTENTRY>
</VARLISTENTRY>
<VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<TERM>
<ReturnValue>WARN RemoveAggregate: aggregate '<replaceable class="parameter">name</replaceable>' for 'type' does not exist</ReturnValue>
<ReturnValue>WARN RemoveAggregate: aggregate '<replaceable class="parameter">name</replaceable>' for '<replaceable class="parameter">type</replaceable>' does not exist</ReturnValue>
</TERM>
</TERM>
<LISTITEM>
<LISTITEM>
<PARA>
<PARA>
...
@@ -131,7 +123,8 @@
...
@@ -131,7 +123,8 @@
Notes
Notes
</TITLE>
</TITLE>
<PARA>
<PARA>
The <command>DROP AGGREGATE</command> statement is a PostgreSQL
The <command>DROP AGGREGATE</command> statement is a
<productname>Postgres</productname>
language extension.
language extension.
</PARA>
</PARA>
<PARA>
<PARA>
...
@@ -150,7 +143,7 @@
...
@@ -150,7 +143,7 @@
<literal>int4</literal>:
<literal>int4</literal>:
</PARA>
</PARA>
<ProgramListing>
<ProgramListing>
DROP AGGREGATE myavg int4;
DROP AGGREGATE myavg int4;
</ProgramListing>
</ProgramListing>
</REFSECT1>
</REFSECT1>
...
@@ -169,7 +162,7 @@
...
@@ -169,7 +162,7 @@
SQL92
SQL92
</TITLE>
</TITLE>
<PARA>
<PARA>
There is no DROP AGGREGATE statement in SQL92.
There is no DROP AGGREGATE statement in <acronym>SQL92</acronym>.
DROP FUNCTION <replaceable class="parameter">name</replaceable> ( [<replaceable class="parameter">type</replaceable> [, ...]] )
DROP FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceable class="parameter">type</replaceable> [, ...] ] )
</SYNOPSIS>
</SYNOPSIS>
<REFSECT2 ID="R2-SQL-DROPFUNCTION-1">
<REFSECT2 ID="R2-SQL-DROPFUNCTION-1">
...
@@ -30,12 +30,6 @@
...
@@ -30,12 +30,6 @@
</TITLE>
</TITLE>
<PARA>
<PARA>
</PARA>
</PARA>
<VARIABLELIST>
<VARLISTENTRY>
<TERM>
</TERM>
<LISTITEM>
<PARA>
<VARIABLELIST>
<VARIABLELIST>
<VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<TERM>
...
@@ -58,9 +52,6 @@
...
@@ -58,9 +52,6 @@
</LISTITEM>
</LISTITEM>
</VARLISTENTRY>
</VARLISTENTRY>
</variablelist>
</variablelist>
</LISTITEM>
</VARLISTENTRY>
</VARIABLELIST>
</REFSECT2>
</REFSECT2>
<REFSECT2 ID="R2-SQL-DROPFUNCTION-2">
<REFSECT2 ID="R2-SQL-DROPFUNCTION-2">
...
@@ -75,6 +66,7 @@
...
@@ -75,6 +66,7 @@
<VARIABLELIST>
<VARIABLELIST>
<VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<TERM>
<replaceable>status</replaceable>
</TERM>
</TERM>
<LISTITEM>
<LISTITEM>
<PARA>
<PARA>
...
@@ -91,13 +83,12 @@
...
@@ -91,13 +83,12 @@
</VARLISTENTRY>
</VARLISTENTRY>
<VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<TERM>
<ReturnValue>
<ReturnValue>WARN RemoveFunction: Function "<replaceable class="parameter">name</replaceable>" ("<replaceable class="parameter">types</replaceable>") does not exist</ReturnValue>
WARN RemoveFunction: Function "<replaceable class="parameter">name</replaceable>" ("<replaceable class="parameter">types</replaceable>") does not exist</ReturnValue>
</TERM>
</TERM>
<LISTITEM>
<LISTITEM>
<PARA>
<PARA>
This message is given if the function specified does not
This message is given if the function specified does not
exist into database.
exist in the current database.
</PARA>
</PARA>
</LISTITEM>
</LISTITEM>
</VARLISTENTRY>
</VARLISTENTRY>
...
@@ -131,11 +122,12 @@ exist into database.
...
@@ -131,11 +122,12 @@ exist into database.
Notes
Notes
</TITLE>
</TITLE>
<PARA>
<PARA>
Refer to the <citerefentry>
Refer to <citerefentry>
<refentrytitle>
<refentrytitle>
CREATE FUNCTION</refentrytitle>
CREATE FUNCTION
</refentrytitle>
</citerefentry>
</citerefentry>
statement to create aggregate functions.
to create aggregate functions.
</PARA>
</PARA>
</REFSECT2>
</REFSECT2>
...
@@ -147,7 +139,7 @@ exist into database.
...
@@ -147,7 +139,7 @@ exist into database.
This command removes the square root function:
This command removes the square root function:
</PARA>
</PARA>
<ProgramListing>
<ProgramListing>
DROP FUNCTION sqrt(int4);
DROP FUNCTION sqrt(int4);
</ProgramListing>
</ProgramListing>
</REFSECT1>
</REFSECT1>
<REFSECT1 ID="R1-SQL-DROPFUNCTION-3">
<REFSECT1 ID="R1-SQL-DROPFUNCTION-3">
...
@@ -164,8 +156,8 @@ exist into database.
...
@@ -164,8 +156,8 @@ exist into database.
<TITLE>
<TITLE>
Compatibility
Compatibility
</TITLE>
</TITLE>
<PARA
<PARA>
>DROP FUNCTION statement is a PostgreSQL language extension.
DROP FUNCTION is a <productname>Postgres</productname> language extension.
</PARA>
</PARA>
<REFSECT2 ID="R2-SQL-DROPFUNCTION-4">
<REFSECT2 ID="R2-SQL-DROPFUNCTION-4">
...
@@ -176,9 +168,10 @@ exist into database.
...
@@ -176,9 +168,10 @@ exist into database.
SQL/PSM
SQL/PSM
</TITLE>
</TITLE>
<PARA>
<PARA>
The SQL/PSM DROP FUNCTION statement has the following syntax:
SQL/PSM is a proposed standard to enable function extensibility.
The SQL/PSM DROP FUNCTION statement has the following syntax:
<programlisting>
<programlisting>
DROP [ SPECIFIC ] FUNCTION <replaceable class="parameter">name</replaceable> { RESTRICT | CASCADE }</programlisting>
DROP [ SPECIFIC ] FUNCTION <replaceable class="parameter">name</replaceable> { RESTRICT | CASCADE }</programlisting>
<ReturnValue>ERROR: RemoveOperator: ... does not exist</ReturnValue>
<ReturnValue>ERROR: RemoveOperator: binary operator '<REPLACEABLE CLASS="PARAMETER">id</REPLACEABLE>' taking '<REPLACEABLE CLASS="PARAMETER">type1</REPLACEABLE>' and '<REPLACEABLE CLASS="PARAMETER">type2</REPLACEABLE>' does not exist</ReturnValue>
</TERM>
<LISTITEM>
<PARA>
This message occurs if the specified binary operator does not exist.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<ReturnValue>ERROR: RemoveOperator: left unary operator '<REPLACEABLE CLASS="PARAMETER">id</REPLACEABLE>' taking '<REPLACEABLE CLASS="PARAMETER">type</REPLACEABLE>' does not exist</ReturnValue>
</TERM>
<LISTITEM>
<PARA>
This message occurs if the specified left unary operator
specified does not exist.
</PARA>
</LISTITEM>
</VARLISTENTRY>
<VARLISTENTRY>
<TERM>
<ReturnValue>ERROR: RemoveOperator: right unary operator '<REPLACEABLE CLASS="PARAMETER">id</REPLACEABLE>' taking '<REPLACEABLE CLASS="PARAMETER">type</REPLACEABLE>' does not exist</ReturnValue>
</TERM>
</TERM>
<LISTITEM>
<LISTITEM>
<PARA>
<PARA>
This message occurs if the operator specified doesn't exist.
This message occurs if the specified right unary operator
specified does not exist.
</PARA>
</PARA>
</LISTITEM>
</LISTITEM>
</VARLISTENTRY>
</VARLISTENTRY>
...
@@ -109,7 +123,7 @@
...
@@ -109,7 +123,7 @@
<REFSECT1 ID="R1-SQL-DROPOPERATOR-1">
<REFSECT1 ID="R1-SQL-DROPOPERATOR-1">
<REFSECT1INFO>
<REFSECT1INFO>
<DATE>1998-04-15</DATE>
<DATE>1998-09-22</DATE>
</REFSECT1INFO>
</REFSECT1INFO>
<TITLE>
<TITLE>
Description
Description
...
@@ -126,22 +140,23 @@
...
@@ -126,22 +140,23 @@
<REFSECT2 ID="R2-SQL-DROPOPERATOR-3">
<REFSECT2 ID="R2-SQL-DROPOPERATOR-3">
<REFSECT2INFO>
<REFSECT2INFO>
<DATE>1998-04-15</DATE>
<DATE>1998-09-22</DATE>
</REFSECT2INFO>
</REFSECT2INFO>
<TITLE>
<TITLE>
Notes
Notes
</TITLE>
</TITLE>
<PARA>
<PARA>
The <command>DROP OPERATOR</command> statement is a PostgreSQL
The <command>DROP OPERATOR</command> statement is a
<productname>Postgres</productname>
language extension.
language extension.
</PARA>
</PARA>
<PARA>
<PARA>
Refer to the <command>CREATE OPERATOR</command> statement for
Refer to <command>CREATE OPERATOR</command> for
information on how to create operators.
information on how to create operators.
</PARA>
</PARA>
<PARA>
<PARA>
It is the user's responsibility to remove any access methods,
It is the user's responsibility to remove any access methods and
operator classes, and so on, that rely on the deleted operator.
operator classes that rely on the deleted operator.
</PARA>
</PARA>
</REFSECT2>
</REFSECT2>
...
@@ -153,20 +168,20 @@
...
@@ -153,20 +168,20 @@
Remove power operator <literal>a^n</literal> for <literal>int4</literal>:
Remove power operator <literal>a^n</literal> for <literal>int4</literal>:
</PARA>
</PARA>
<ProgramListing>
<ProgramListing>
DROP OPERATOR ^ (int4, int4);
DROP OPERATOR ^ (int4, int4);
</ProgramListing>
</ProgramListing>
<PARA>
<PARA>
Remove left unary operator <literal>!a</literal> for booleans:
Remove left unary operator <literal>!a</literal> for booleans:
</PARA>
</PARA>
<ProgramListing>
<ProgramListing>
DROP OPERATOR ! (none, bool);
DROP OPERATOR ! (none, bool);
</ProgramListing>
</ProgramListing>
<PARA>
<PARA>
Remove right unary factorial operator <literal>a!</literal> for
Remove right unary factorial operator <literal>a!</literal> for
<literal>int4</literal>:
<literal>int4</literal>:
</PARA>
</PARA>
<ProgramListing>
<ProgramListing>
DROP OPERATOR ! (int4, none);
DROP OPERATOR ! (int4, none);
</ProgramListing>
</ProgramListing>
</REFSECT1>
</REFSECT1>
...
@@ -179,13 +194,13 @@
...
@@ -179,13 +194,13 @@
<REFSECT2 ID="R2-SQL-DROPOPERATOR-4">
<REFSECT2 ID="R2-SQL-DROPOPERATOR-4">
<REFSECT2INFO>
<REFSECT2INFO>
<DATE>1998-04-15</DATE>
<DATE>1998-09-22</DATE>
</REFSECT2INFO>
</REFSECT2INFO>
<TITLE>
<TITLE>
SQL92
SQL92
</TITLE>
</TITLE>
<PARA>
<PARA>
There is no DROP OPERATOR statement in SQL92.
There is no <command>DROP OPERATOR</command> in <acronym>SQL92</acronym>.