11<!--
2- $Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.29 2001/01/20 20:59:29 petere Exp $
2+ $Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.30 2001/01/22 16:11:17 tgl Exp $
33-->
44
55 <chapter id="xfunc">
@@ -874,12 +874,12 @@ PG_FUNCTION_INFO_V1(funcname);
874874 <function>PG_GETARG_<replaceable>xxx</replaceable>()</function>
875875 macro that corresponds to the argument's datatype, and the result
876876 is returned using a
877- <function>PG_GETARG_ <replaceable>xxx</replaceable>()</function>
877+ <function>PG_RETURN_ <replaceable>xxx</replaceable>()</function>
878878 macro for the return type.
879879 </para>
880880
881881 <para>
882- Here we show the same functions as above, coded innew style:
882+ Here we show the same functions as above, coded inversion-1 style:
883883
884884<programlisting>
885885#include <string.h>
@@ -916,6 +916,7 @@ PG_FUNCTION_INFO_V1(makepoint);
916916Datum
917917makepoint(PG_FUNCTION_ARGS)
918918{
919+ /* Here, the pass-by-reference nature of Point is not hidden */
919920 Point *pointx = PG_GETARG_POINT_P(0);
920921 Point *pointy = PG_GETARG_POINT_P(1);
921922 Point *new_point = (Point *) palloc(sizeof(Point));
@@ -969,7 +970,7 @@ concat_text(PG_FUNCTION_ARGS)
969970
970971 <para>
971972 The <command>CREATE FUNCTION</command> commands are the same as
972- for theold-style equivalents.
973+ for theversion-0 equivalents.
973974 </para>
974975
975976 <para>
@@ -994,7 +995,9 @@ concat_text(PG_FUNCTION_ARGS)
994995 test for NULL inputs to a non-strict function, return a NULL
995996 result (from either strict or non-strict functions), return
996997 <quote>set</quote> results, and implement trigger functions and
997- procedural-language call handlers. For more details see
998+ procedural-language call handlers. Version-1 code is also more
999+ portable than version-0, because it does not break ANSI C restrictions
1000+ on function call protocol. For more details see
9981001 <filename>src/backend/utils/fmgr/README</filename> in the source
9991002 distribution.
10001003 </para>