From 7e0919136abd69715ab8f254e172d40c09ae6236 Mon Sep 17 00:00:00 2001 From: Tom Lane <tgl@sss.pgh.pa.us> Date: Mon, 22 Jan 2001 16:11:17 +0000 Subject: [PATCH] Minor fixes. --- doc/src/sgml/xfunc.sgml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml index cafaf47b4e5..766aa905b90 100644 --- a/doc/src/sgml/xfunc.sgml +++ b/doc/src/sgml/xfunc.sgml @@ -1,5 +1,5 @@ <!-- -$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.29 2001/01/20 20:59:29 petere Exp $ +$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.30 2001/01/22 16:11:17 tgl Exp $ --> <chapter id="xfunc"> @@ -874,12 +874,12 @@ PG_FUNCTION_INFO_V1(funcname); <function>PG_GETARG_<replaceable>xxx</replaceable>()</function> macro that corresponds to the argument's datatype, and the result is returned using a - <function>PG_GETARG_<replaceable>xxx</replaceable>()</function> + <function>PG_RETURN_<replaceable>xxx</replaceable>()</function> macro for the return type. </para> <para> - Here we show the same functions as above, coded in new style: + Here we show the same functions as above, coded in version-1 style: <programlisting> #include <string.h> @@ -916,6 +916,7 @@ PG_FUNCTION_INFO_V1(makepoint); Datum makepoint(PG_FUNCTION_ARGS) { + /* Here, the pass-by-reference nature of Point is not hidden */ Point *pointx = PG_GETARG_POINT_P(0); Point *pointy = PG_GETARG_POINT_P(1); Point *new_point = (Point *) palloc(sizeof(Point)); @@ -969,7 +970,7 @@ concat_text(PG_FUNCTION_ARGS) <para> The <command>CREATE FUNCTION</command> commands are the same as - for the old-style equivalents. + for the version-0 equivalents. </para> <para> @@ -994,7 +995,9 @@ concat_text(PG_FUNCTION_ARGS) test for NULL inputs to a non-strict function, return a NULL result (from either strict or non-strict functions), return <quote>set</quote> results, and implement trigger functions and - procedural-language call handlers. For more details see + procedural-language call handlers. Version-1 code is also more + portable than version-0, because it does not break ANSI C restrictions + on function call protocol. For more details see <filename>src/backend/utils/fmgr/README</filename> in the source distribution. </para> -- GitLab