Attached some formatting improvements to xfunc.sgml
(1 typo; 2x wrap long code examples to make them readable in .pdf)
Erik Rijkers
--- 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:
<programlisting>
-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;
</programlisting>
@@ -957,7 +958,8 @@
done this way:
<programlisting>
-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;
</programlisting>
@@ -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.
</screen>
</para>
@@ -2075,7 +2078,7 @@
<programlisting>
PG_FUNCTION_INFO_V1(funcname);
</programlisting>
- 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 <literal>internal</>-language functions, since
<productname>PostgreSQL</> assumes that all internal functions
--
Sent via pgsql-docs mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs