From: Bruce Momjian Date: Sun, 11 Jul 2004 23:23:43 +0000 (+0000) Subject: Example for create function using argument names X-Git-Tag: REL8_0_0BETA1~233 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cf9fd800ec07f4bab09dced6b1bb2b162bdcc457;p=postgresql Example for create function using argument names Gavin Sherry --- diff --git a/doc/src/sgml/ref/create_function.sgml b/doc/src/sgml/ref/create_function.sgml index f88bc0af95..2c43fe9b46 100644 --- a/doc/src/sgml/ref/create_function.sgml +++ b/doc/src/sgml/ref/create_function.sgml @@ -1,5 +1,5 @@ @@ -398,6 +398,17 @@ CREATE FUNCTION add(integer, integer) RETURNS integer LANGUAGE SQL IMMUTABLE RETURNS NULL ON NULL INPUT; + + + + + Increment an integer, making use of an argument name, in PL/PgSQL: + + +CREATE OR REPLACE FUNCTION increment(i integer) RETURNS integer AS ' + BEGIN + RETURN i + 1; + END;' LANGUAGE plpgsql;