Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7e32aaa

Browse files
committed
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_ARGISNULLless disjointed.Back-patch to v10 where the error was introduced.Laurenz Albe and Tom Lane, per an anonymous docs commentDiscussion:https://postgr.es/m/158399487096.5708.10696365251766477013@wrigleys.postgresql.org
1 parent15cbbf8 commit7e32aaa

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎doc/src/sgml/xfunc.sgml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2259,9 +2259,9 @@ PG_FUNCTION_INFO_V1(funcname);
22592259
<para>
22602260
In a version-1 function, each actual argument is fetched using a
22612261
<function>PG_GETARG_<replaceable>xxx</replaceable>()</function>
2262-
macro that corresponds to the argument's data type. In non-strict
2262+
macro that corresponds to the argument's data type.(In non-strict
22632263
functions there needs to be a previous check about argument null-ness
2264-
using <function>PG_ARGNULL_<replaceable>xxx</replaceable>()</function>.
2264+
using <function>PG_ARGISNULL()</function>; see below.)
22652265
The result is returned using a
22662266
<function>PG_RETURN_<replaceable>xxx</replaceable>()</function>
22672267
macro for the return type.
@@ -2423,14 +2423,6 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
24232423
explicitly, using <function>PG_ARGISNULL()</function>.
24242424
</para>
24252425

2426-
<para>
2427-
At first glance, the version-1 coding conventions might appear to be just
2428-
pointless obscurantism, over using plain <literal>C</literal> calling
2429-
conventions. They do however allow to deal with <literal>NULL</literal>able
2430-
arguments/return values, and <quote>toasted</quote> (compressed or
2431-
out-of-line) values.
2432-
</para>
2433-
24342426
<para>
24352427
The macro <function>PG_ARGISNULL(<replaceable>n</replaceable>)</function>
24362428
allows a function to test whether each input is null. (Of course, doing
@@ -2445,6 +2437,14 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
24452437
this works in both strict and nonstrict functions.
24462438
</para>
24472439

2440+
<para>
2441+
At first glance, the version-1 coding conventions might appear
2442+
to be just pointless obscurantism, compared to using
2443+
plain <literal>C</literal> calling conventions. They do however allow
2444+
us to deal with <literal>NULL</literal>able arguments/return values,
2445+
and <quote>toasted</quote> (compressed or out-of-line) values.
2446+
</para>
2447+
24482448
<para>
24492449
Other options provided by the version-1 interface are two
24502450
variants of the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp