From c82c9559a771f58dc42ce93f227cccd368eb46e6 Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon, 23 Oct 2000 00:46:07 +0000
Subject: [PATCH] Minor updates/corrections for CREATE/DROP
 FUNCTION/AGGREGATE/OPERATOR.

---
 doc/src/sgml/ref/drop_aggregate.sgml |  5 +++--
 doc/src/sgml/ref/drop_operator.sgml  | 24 +++++++++++++++++-------
 doc/src/sgml/xaggr.sgml              |  4 ++--
 doc/src/sgml/xfunc.sgml              |  4 ++--
 4 files changed, 24 insertions(+), 13 deletions(-)

diff --git a/doc/src/sgml/ref/drop_aggregate.sgml b/doc/src/sgml/ref/drop_aggregate.sgml
index 8efc31a732e..d67b4375a3c 100644
--- a/doc/src/sgml/ref/drop_aggregate.sgml
+++ b/doc/src/sgml/ref/drop_aggregate.sgml
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_aggregate.sgml,v 1.8 2000/07/17 03:04:41 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_aggregate.sgml,v 1.9 2000/10/23 00:46:07 tgl Exp $
 Postgres documentation
 -->
 
@@ -47,7 +47,8 @@ DROP AGGREGATE <replaceable class="PARAMETER">name</replaceable> <replaceable cl
       <term><replaceable class="parameter">type</replaceable></term>
       <listitem>
        <para>
-	The type of an existing aggregate function.
+	The input datatype of an existing aggregate function,
+	or <literal>*</literal> if the function accepts any input type.
 	(Refer to the <citetitle>PostgreSQL User's Guide</citetitle> for
 	further information about data types.)
 	<comment>This should become a cross-reference rather than a
diff --git a/doc/src/sgml/ref/drop_operator.sgml b/doc/src/sgml/ref/drop_operator.sgml
index 6c707960b56..ca1ec3be202 100644
--- a/doc/src/sgml/ref/drop_operator.sgml
+++ b/doc/src/sgml/ref/drop_operator.sgml
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.7 2000/10/05 19:48:18 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/drop_operator.sgml,v 1.8 2000/10/23 00:46:07 tgl Exp $
 Postgres documentation
 -->
 
@@ -24,7 +24,7 @@ Postgres documentation
    <date>1999-07-20</date>
   </refsynopsisdivinfo>
   <synopsis>
-DROP OPERATOR <replaceable class="PARAMETER">id</replaceable> ( <replaceable class="PARAMETER">type</replaceable> | NONE [,...] )
+DROP OPERATOR <replaceable class="PARAMETER">id</replaceable> ( <replaceable class="PARAMETER">lefttype</replaceable> | NONE , <replaceable class="PARAMETER">righttype</replaceable> | NONE )
   </synopsis>
   
   <refsect2 id="R2-SQL-DROPOPERATOR-1">
@@ -45,10 +45,20 @@ DROP OPERATOR <replaceable class="PARAMETER">id</replaceable> ( <replaceable cla
       </listitem>
      </varlistentry>
      <varlistentry>
-      <term><replaceable class="parameter">type</replaceable></term>
+      <term><replaceable class="parameter">lefttype</replaceable></term>
       <listitem>
        <para>
-	The type of function parameters.
+	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>
@@ -127,7 +137,7 @@ ERROR:  RemoveOperator: right unary operator '<replaceable class="PARAMETER">ope
   </para>
   <para>
    The left or right type of a left or right unary
-   operator, respectively, may be specified as <literal>NONE</literal>.
+   operator, respectively, must be specified as <literal>NONE</literal>.
   </para>
 
   <refsect2 id="R2-SQL-DROPOPERATOR-3">
@@ -166,13 +176,13 @@ DROP OPERATOR ^ (int4, int4);
    </programlisting>
   </para>
   <para>
-   Remove left unary negation operator (<literal>b !</literal>) for booleans:
+   Remove left unary negation operator (<literal>! b</literal>) for booleans:
    <programlisting>
 DROP OPERATOR ! (none, bool);
    </programlisting>
   </para>
   <para>
-   Remove right unary factorial operator (<literal>! i</literal>) for
+   Remove right unary factorial operator (<literal>i !</literal>) for
    <literal>int4</literal>:
    <programlisting>
 DROP OPERATOR ! (int4, none);
diff --git a/doc/src/sgml/xaggr.sgml b/doc/src/sgml/xaggr.sgml
index c1e32f9b015..d8890617bab 100644
--- a/doc/src/sgml/xaggr.sgml
+++ b/doc/src/sgml/xaggr.sgml
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/xaggr.sgml,v 1.8 2000/07/17 03:04:40 tgl Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/xaggr.sgml,v 1.9 2000/10/23 00:46:06 tgl Exp $
 -->
 
  <chapter id="xaggr">
@@ -100,7 +100,7 @@ SELECT complex_sum(a) FROM test_complex;
 CREATE AGGREGATE avg (
     sfunc = float8_accum,
     basetype = float8,
-    stype = _float8,
+    stype = float8[],
     finalfunc = float8_avg,
     initcond = '{0,0}'
 );
diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml
index b61c46de9ce..d02718d53a7 100644
--- a/doc/src/sgml/xfunc.sgml
+++ b/doc/src/sgml/xfunc.sgml
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.21 2000/09/29 20:21:34 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.22 2000/10/23 00:46:06 tgl Exp $
 -->
 
  <chapter id="xfunc">
@@ -108,7 +108,7 @@ SELECT tp1( 17,100.0);
      EMP, and retrieves multiple results:
 
      <programlisting>
-CREATE FUNCTION hobbies (EMP) RETURNS SET OF hobbies
+CREATE FUNCTION hobbies (EMP) RETURNS SETOF hobbies
     AS 'SELECT hobbies.* FROM hobbies
         WHERE $1.name = hobbies.person'
     LANGUAGE 'sql';
-- 
GitLab