aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2020-03-13 12:49:10 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2020-03-13 12:49:10 -0400
commit7e32aaab589a8927c22d3b83d55fc0e77424b348 (patch)
tree881eee8e223075c393ec4bf82f3a765d58cf66fd
parent15cbbf81a58fd04479c0e5ff134838492473e935 (diff)
downloadpostgresql-7e32aaab589a8927c22d3b83d55fc0e77424b348.tar.gz
postgresql-7e32aaab589a8927c22d3b83d55fc0e77424b348.zip
Doc: fix mistaken reference to "PG_ARGNULL_xxx()" macro.
This should of course be just "PG_ARGISNULL()". Also reorder a couple of paras to make the discussion of PG_ARGISNULL less disjointed. Back-patch to v10 where the error was introduced. Laurenz Albe and Tom Lane, per an anonymous docs comment Discussion: https://postgr.es/m/158399487096.5708.10696365251766477013@wrigleys.postgresql.org
-rw-r--r--doc/src/sgml/xfunc.sgml20
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml
index 3f3d46414ca..c2433748c80 100644
--- a/doc/src/sgml/xfunc.sgml
+++ b/doc/src/sgml/xfunc.sgml
@@ -2259,9 +2259,9 @@ PG_FUNCTION_INFO_V1(funcname);
<para>
In a version-1 function, each actual argument is fetched using a
<function>PG_GETARG_<replaceable>xxx</replaceable>()</function>
- macro that corresponds to the argument's data type. In non-strict
+ macro that corresponds to the argument's data type. (In non-strict
functions there needs to be a previous check about argument null-ness
- using <function>PG_ARGNULL_<replaceable>xxx</replaceable>()</function>.
+ using <function>PG_ARGISNULL()</function>; see below.)
The result is returned using a
<function>PG_RETURN_<replaceable>xxx</replaceable>()</function>
macro for the return type.
@@ -2424,14 +2424,6 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
</para>
<para>
- At first glance, the version-1 coding conventions might appear to be just
- pointless obscurantism, over using plain <literal>C</literal> calling
- conventions. They do however allow to deal with <literal>NULL</literal>able
- arguments/return values, and <quote>toasted</quote> (compressed or
- out-of-line) values.
- </para>
-
- <para>
The macro <function>PG_ARGISNULL(<replaceable>n</replaceable>)</function>
allows a function to test whether each input is null. (Of course, doing
this is only necessary in functions not declared <quote>strict</quote>.)
@@ -2446,6 +2438,14 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
</para>
<para>
+ At first glance, the version-1 coding conventions might appear
+ to be just pointless obscurantism, compared to using
+ plain <literal>C</literal> calling conventions. They do however allow
+ us to deal with <literal>NULL</literal>able arguments/return values,
+ and <quote>toasted</quote> (compressed or out-of-line) values.
+ </para>
+
+ <para>
Other options provided by the version-1 interface are two
variants of the
<function>PG_GETARG_<replaceable>xxx</replaceable>()</function>