--- doc/src/sgml/xfunc.sgml.orig 2010-05-14 23:00:23.000000000 +0200 +++ doc/src/sgml/xfunc.sgml 2010-05-15 01:52:52.000000000 +0200 @@ -859,7 +859,8 @@ output parameters, like this: -CREATE FUNCTION sum_n_product_with_tab (x int, OUT sum int, OUT product int) RETURNS SETOF record AS $$ +CREATE FUNCTION sum_n_product_with_tab (x int, OUT sum int, OUT product int) +RETURNS SETOF record AS $$ SELECT $1 + tab.y, $1 * tab.y FROM tab; $$ LANGUAGE SQL; @@ -957,7 +958,8 @@ done this way: -CREATE FUNCTION sum_n_product_with_tab (x int) RETURNS TABLE(sum int, product int) AS $$ +CREATE FUNCTION sum_n_product_with_tab (x int) +RETURNS TABLE(sum int, product int) AS $$ SELECT $1 + tab.y, $1 * tab.y FROM tab; $$ LANGUAGE SQL; @@ -1026,7 +1028,8 @@ SELECT 1; $$ LANGUAGE SQL; ERROR: cannot determine result data type -DETAIL: A function returning a polymorphic type must have at least one polymorphic argument. +DETAIL: A function returning a polymorphic type must have + at least one polymorphic argument. @@ -2075,7 +2078,7 @@ PG_FUNCTION_INFO_V1(funcname); - must appear in the same source file. (Conventionally. it's + must appear in the same source file. (Conventionally, it's written just before the function itself.) This macro call is not needed for internal-language functions, since PostgreSQL assumes that all internal functions