From 39f69bc38f0f58cc4f6b05451fced030bfac935e Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" Date: Mon, 27 Mar 2000 17:14:43 +0000 Subject: Start updating for the v7.0 release. Use "generic functions" for math and other routines. Use SQL92 "type 'literal'" syntax rather than Postgres "'literal'::type". --- doc/src/sgml/ref/create_function.sgml | 57 ++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 24 deletions(-) (limited to 'doc/src/sgml/ref/create_function.sgml') diff --git a/doc/src/sgml/ref/create_function.sgml b/doc/src/sgml/ref/create_function.sgml index 3333171319b..708d0745eec 100644 --- a/doc/src/sgml/ref/create_function.sgml +++ b/doc/src/sgml/ref/create_function.sgml @@ -1,5 +1,5 @@ @@ -20,26 +20,24 @@ Postgres documentation - 1999-10-02 + 2000-03-25 CREATE FUNCTION name ( [ ftype [, ...] ] ) RETURNS rtype - [ WITH ( attribute [, ...] ) ] AS definition LANGUAGE 'langname' - - + [ WITH ( attribute [, ...] ) ] CREATE FUNCTION name ( [ ftype [, ...] ] ) RETURNS rtype - [ WITH ( attribute [, ...] ) ] AS obj_file , link_symbol LANGUAGE 'C' + [ WITH ( attribute [, ...] ) ] - 1998-09-09 + 2000-03-25 Inputs @@ -143,7 +141,7 @@ CREATE FUNCTION <replaceable class="parameter">name</replaceable> ( [ <replaceab <refsect2 id="R2-SQL-CREATEFUNCTION-2"> <refsect2info> - <date>1998-09-09</date> + <date>2000-03-25</date> </refsect2info> <title> Outputs @@ -168,7 +166,7 @@ CREATE <refsect1 id="R1-SQL-CREATEFUNCTION-1"> <refsect1info> - <date>1998-09-09</date> + <date>2000-03-25</date> </refsect1info> <title> Description @@ -177,28 +175,29 @@ CREATE <command>CREATE FUNCTION</command> allows a <productname>Postgres</productname> user to register a function - with a database. Subsequently, this user is treated as the + with a database. Subsequently, this user is considered the owner of the function. </para> <refsect2 id="R2-SQL-CREATEFUNCTION-3"> <refsect2info> - <date>1998-09-09</date> + <date>2000-03-25</date> </refsect2info> <title> Notes + - Refer to the chapter in - the PostgreSQL Programmer's Guide - on extending + Refer to the chapter in the + PostgreSQL Programmer's Guide + on the topic of extending Postgres via functions for further information on writing external functions. Use DROP FUNCTION - to drop user-defined functions. + to remove user-defined functions. @@ -207,7 +206,17 @@ CREATE so long as they have distinct argument types. This facility must be used with caution for internal and C-language functions, however. - + + + + The full SQL92 type syntax is allowed for + input arguments and return value. However, some details of the + type specification (e.g. the precision field for + numeric types) are the responsibility of the + underlying function implementation and are silently swallowed + (e.g. not recognized or + enforced) by the CREATE FUNCTION command. + Two internal @@ -242,18 +251,18 @@ CREATE To create a simple SQL function: - + CREATE FUNCTION one() RETURNS int4 AS 'SELECT 1 AS RESULT' LANGUAGE 'sql'; SELECT one() AS answer; - + answer -------- 1 - - + + @@ -317,7 +326,7 @@ Point * complex_to_point (Complex *z) - 1998-04-15 + 2000-03-25 SQL92 @@ -331,7 +340,7 @@ Point * complex_to_point (Complex *z) <refsect2 id="R2-SQL-CREATEFUNCTION-5"> <refsect2info> - <date>1998-09-09</date> + <date>2000-03-25</date> </refsect2info> <title> SQL/PSM @@ -364,7 +373,7 @@ CREATE FUNCTION <replaceable class="parameter">name</replaceable> <!-- Keep this comment at the end of the file Local variables: -mode: sgml +mode:sgml sgml-omittag:nil sgml-shorttag:t sgml-minimize-attributes:nil @@ -374,7 +383,7 @@ sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../reference.ced" sgml-exposed-tags:nil -sgml-local-catalogs:"/usr/lib/sgml/catalog" +sgml-local-catalogs:("/usr/lib/sgml/catalog") sgml-local-ecat-files:nil End: --> -- cgit v1.2.3