Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 41D95632B1F for ; Sat, 15 May 2010 14:52:44 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 41391-01 for ; Sat, 15 May 2010 17:52:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp-vbr16.xs4all.nl (smtp-vbr16.xs4all.nl [194.109.24.36]) by mail.postgresql.org (Postfix) with ESMTP id 0EDD4632ABD for ; Sat, 15 May 2010 14:52:36 -0300 (ADT) Received: from webmail.xs4all.nl (dovemail4.xs4all.nl [194.109.26.6]) by smtp-vbr16.xs4all.nl (8.13.8/8.13.8) with ESMTP id o4FHqZuL019633 for ; Sat, 15 May 2010 19:52:35 +0200 (CEST) (envelope-from er@xs4all.nl) Received: from 156.83.0.242 (SquirrelMail authenticated user er) by webmail.xs4all.nl with HTTP; Sat, 15 May 2010 19:52:35 +0200 Message-ID: <593514e247da4b7678268ca3528a08ee.squirrel@webmail.xs4all.nl> Date: Sat, 15 May 2010 19:52:35 +0200 Subject: some re-formatting in xfunc.sgml From: "Erik Rijkers" To: pgsql-docs@postgresql.org User-Agent: SquirrelMail/1.4.18 MIME-Version: 1.0 Content-Type: multipart/mixed;boundary="----=_20100515195235_76650" X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.011 tagged_above=-5 required=5 tests=BAYES_20=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201005/23 X-Sequence-Number: 5520 ------=_20100515195235_76650 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Attached some formatting improvements to xfunc.sgml (1 typo; 2x wrap long code examples to make them readable in .pdf) Erik Rijkers ------=_20100515195235_76650 Content-Type: text/x-patch; name="xfunc.sgml.diff" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="xfunc.sgml.diff" --- 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 ------=_20100515195235_76650--