@@ -2237,9 +2237,9 @@ PG_FUNCTION_INFO_V1(funcname);
2237
2237
<para>
2238
2238
In a version-1 function, each actual argument is fetched using a
2239
2239
<function>PG_GETARG_<replaceable>xxx</replaceable>()</function>
2240
- macro that corresponds to the argument's data type. In non-strict
2240
+ macro that corresponds to the argument's data type. ( In non-strict
2241
2241
functions there needs to be a previous check about argument null-ness
2242
- using <function>PG_ARGNULL_<replaceable>xxx</replaceable> ()</function>.
2242
+ using <function>PG_ARGISNULL ()</function>; see below.)
2243
2243
The result is returned using a
2244
2244
<function>PG_RETURN_<replaceable>xxx</replaceable>()</function>
2245
2245
macro for the return type.
@@ -2401,14 +2401,6 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
2401
2401
explicitly, using <function>PG_ARGISNULL()</function>.
2402
2402
</para>
2403
2403
2404
- <para>
2405
- At first glance, the version-1 coding conventions might appear to be just
2406
- pointless obscurantism, over using plain <literal>C</literal> calling
2407
- conventions. They do however allow to deal with <literal>NULL</literal>able
2408
- arguments/return values, and <quote>toasted</quote> (compressed or
2409
- out-of-line) values.
2410
- </para>
2411
<
8000
td data-grid-cell-id="diff-7eb781d63c9133b1fcda0d770784e093751b0c3c3132198fd03541e9c57e8405-2411-2403-2" data-line-anchor="diff-7eb781d63c9133b1fcda0d770784e093751b0c3c3132198fd03541e9c57e8405L2411" data-selected="false" role="gridcell" style="background-color:var(--diffBlob-deletionLine-bgColor, var(--diffBlob-deletion-bgColor-line));padding-right:24px" tabindex="-1" valign="top" class="focusable-grid-cell diff-text-cell left-side-diff-cell pt-4 border-right left-side">-
2412
2404
<para>
2413
2405
The macro <function>PG_ARGISNULL(<replaceable>n</replaceable>)</function>
2414
2406
allows a function to test whether each input is null. (Of course, doing
@@ -2423,6 +2415,14 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
2423
2415
this works in both strict and nonstrict functions.
2424
2416
</para>
2425
2417
2418
+ <para>
2419
+ At first glance, the version-1 coding conventions might appear
2420
+ to be just pointless obscurantism, compared to using
2421
+ plain <literal>C</literal> calling conventions. They do however allow
2422
+ us to deal with <literal>NULL</literal>able arguments/return values,
2423
+ and <quote>toasted</quote> (compressed or out-of-line) values.
2424
+ </para>
2425
+
2426
2426
<para>
2427
2427
Other options provided by the version-1 interface are two
2428
2428
variants of the
0 commit comments