From a4ac2f458e8cb76177254f4bd7bbd885991379af Mon Sep 17 00:00:00 2001 From: "Thomas G. Lockhart" Date: Tue, 6 Jul 1999 17:16:42 +0000 Subject: Fix markup for docbook2man man page generation. No big deal; fixed lots of other markup at the same time. Bigest change: make sure there is no whitespace in front of contents. This will probably help the other output types too. --- doc/src/sgml/ref/create_function.sgml | 127 ++++++++++++++++------------------ 1 file changed, 59 insertions(+), 68 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 3dc37e3380..7ba3391a66 100644 --- a/doc/src/sgml/ref/create_function.sgml +++ b/doc/src/sgml/ref/create_function.sgml @@ -32,41 +32,34 @@ CREATE FUNCTION name ( [ - - - - name - - - - The name of a function to create. - - - - - - ftype - - - - The data type of function arguments. - - - - - - rtype - - - - The return data type. - - - - - - definition - + + + + name + + + The name of a function to create. + + + + + ftype + + + The data type of function arguments. + + + + + rtype + + + The return data type. + + + + + definition A string defining the function; the meaning depends on the language. @@ -76,9 +69,7 @@ CREATE FUNCTION name ( [ - - langname - + langname may be 'C', 'sql', @@ -93,7 +84,7 @@ CREATE FUNCTION name ( [ - + 1998-09-09 @@ -102,12 +93,12 @@ CREATE FUNCTION name ( [ - + - - CREATE - + +CREATE + This is returned if the command completes successfully. @@ -118,7 +109,7 @@ CREATE FUNCTION name ( [ - + 1998-09-09 @@ -188,20 +179,21 @@ in the PostgreSQL Programmer's Guide To create a simple SQL function: - + - CREATE FUNCTION one() RETURNS int4 - AS 'SELECT 1 AS RESULT' - LANGUAGE 'sql'; - - SELECT one() AS answer; - +CREATE FUNCTION one() RETURNS int4 + AS 'SELECT 1 AS RESULT' + LANGUAGE 'sql'; +SELECT one() AS answer; + answer ------ 1 + + To create a C function, calling a routine from a user-created shared library. This particular routine calculates a check @@ -210,16 +202,16 @@ in the PostgreSQL Programmer's Guide - CREATE FUNCTION ean_checkdigit(bpchar, bpchar) RETURNS bool - AS '/usr1/proj/bray/sql/funcs.so' LANGUAGE 'c'; +CREATE FUNCTION ean_checkdigit(bpchar, bpchar) RETURNS bool + AS '/usr1/proj/bray/sql/funcs.so' LANGUAGE 'c'; - CREATE TABLE product ( +CREATE TABLE product ( id char(8) PRIMARY KEY, eanprefix char(8) CHECK (eanprefix ~ '[0-9]{2}-[0-9]{5}') REFERENCES brandname(ean_prefix), eancode char(6) CHECK (eancode ~ '[0-9]{6}'), CONSTRAINT ean CHECK (ean_checkdigit(eanprefix, eancode)) - ); +); @@ -232,16 +224,16 @@ in the PostgreSQL Programmer's Guide A C function cannot return a set of values. - + Compatibility - - CREATE FUNCTION is - a Postgres language extension. + + CREATE FUNCTION is + a Postgres language extension. - + 1998-09-09 @@ -251,27 +243,26 @@ in the PostgreSQL Programmer's Guide - + PSM stands for Persistent Stored Modules. It is a procedural language and it was originally hoped that PSM would be ratified as an official standard by late 1996. As of mid-1998, this -has not yet happened, but it is hoped that PSM will + has not yet happened, but it is hoped that PSM will eventually become a standard. - + -SQL/PSM CREATE FUNCTION has the following syntax: - + SQL/PSM CREATE FUNCTION has the following syntax: + CREATE FUNCTION name - ( [ [ IN | OUT | INOUT ] etereable> etereable>eable> type [, ...] ] ) RETURNS rtype LANGUAGE 'langname' ESPECIFIC routine SQL-statement - - + -- cgit v1.2.1