Subject: Add cross references for CREATE FUNCTION to PLs

From: David Fetter <[email-masked]>
Date: Thu, 19 May 2005 17:07:33 -0700

Folks,

Please find enclosed a patch which adds cross-references to the CREATE
FUNCTION syntax in the PL/* docs.

Cheers,
D
-- 
David Fetter [email-masked] http://fetter.org/
phone: +1 510 893 6100   mobile: +1 415 235 3778

Remember to vote!
Index: doc/src/sgml/plperl.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/plperl.sgml,v
retrieving revision 2.39
diff -c -r2.39 plperl.sgml
*** doc/src/sgml/plperl.sgml	9 Apr 2005 03:52:43 -0000	2.39
--- doc/src/sgml/plperl.sgml	20 May 2005 00:02:47 -0000
***************
*** 44,50 ****
    <title>PL/Perl Functions and Arguments</title>
  
    <para>
!    To create a function in the PL/Perl language, use the standard syntax:
  <programlisting>
  CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types</replaceable>) RETURNS <replaceable>return-type</replaceable> AS $$
      # PL/Perl function body
--- 44,51 ----
    <title>PL/Perl Functions and Arguments</title>
  
    <para>
!    To create a function in the PL/Perl language, use the standard
! syntax (<xref linkend="sql-createfunction">):
  <programlisting>
  CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types</replaceable>) RETURNS <replaceable>return-type</replaceable> AS $$
      # PL/Perl function body
Index: doc/src/sgml/plpgsql.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v
retrieving revision 1.67
diff -c -r1.67 plpgsql.sgml
*** doc/src/sgml/plpgsql.sgml	19 Apr 2005 03:55:43 -0000	1.67
--- doc/src/sgml/plpgsql.sgml	20 May 2005 00:02:50 -0000
***************
*** 53,61 ****
      Except for input/output conversion and calculation functions
      for user-defined types, anything that can be defined in C language
      functions can also be done with <application>PL/pgSQL</application>.
!     For example, it is possible to
!     create complex conditional computation functions and later use
!     them to define operators or use them in index expressions.
     </para>
  
    <sect1 id="plpgsql-overview">
--- 53,61 ----
      Except for input/output conversion and calculation functions
      for user-defined types, anything that can be defined in C language
      functions can also be done with <application>PL/pgSQL</application>.
!     For example, it is possible to create complex conditional
!     computation functions (<xref linkend="sql-createfunction">) and
!     later use them to define operators or use them in index expressions.
     </para>
  
    <sect1 id="plpgsql-overview">
Index: doc/src/sgml/plpython.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/plpython.sgml,v
retrieving revision 1.28
diff -c -r1.28 plpython.sgml
*** doc/src/sgml/plpython.sgml	9 Apr 2005 03:52:43 -0000	1.28
--- doc/src/sgml/plpython.sgml	20 May 2005 00:02:50 -0000
***************
*** 46,52 ****
    <title>PL/Python Functions</title>
  
    <para>
!    Functions in PL/Python are declared in the usual way, for example
  <programlisting>
  CREATE FUNCTION myfunc(text) RETURNS text
      AS 'return args[0]'
--- 46,53 ----
    <title>PL/Python Functions</title>
  
    <para>
!    Functions in PL/Python are declared in the usual way
!     (<xref linkend="sql-createfunction">), for example
  <programlisting>
  CREATE FUNCTION myfunc(text) RETURNS text
      AS 'return args[0]'
Index: doc/src/sgml/pltcl.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/pltcl.sgml,v
retrieving revision 2.37
diff -c -r2.37 pltcl.sgml
*** doc/src/sgml/pltcl.sgml	9 Apr 2005 03:52:43 -0000	2.37
--- doc/src/sgml/pltcl.sgml	20 May 2005 00:02:51 -0000
***************
*** 75,81 ****
      <title>PL/Tcl Functions and Arguments</title>
  
      <para>
!      To create a function in the <application>PL/Tcl</> language, use the standard syntax:
  
  <programlisting>
  CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types</replaceable>) RETURNS <replaceable>return-type</replaceable> AS $$
--- 75,82 ----
      <title>PL/Tcl Functions and Arguments</title>
  
      <para>
!      To create a function in the <application>PL/Tcl</> language, use
! the standard syntax (<xref linkend="sql-createfunction">):
  
  <programlisting>
  CREATE FUNCTION <replaceable>funcname</replaceable> (<replaceable>argument-types</replaceable>) RETURNS <replaceable>return-type</replaceable> AS $$

---

From: Neil Conway <[email-masked]>
Date: Fri, 20 May 2005 11:53:28 +1000

> FUNCTION syntax in the PL/* docs.

I thought the PL/PgSQL hunk wasn't an appropriate place for an <xref>, 
so I didn't apply that. The rest of the patch was applied with minor 
edits -- thanks for the patch.

-Neil