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