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

Commitf393fb2

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 parentc9ef507 commitf393fb2

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
@@ -2239,9 +2239,9 @@ PG_FUNCTION_INFO_V1(funcname);
22392239
<para>
22402240
In a version-1 function, each actual argument is fetched using a
22412241
<function>PG_GETARG_<replaceable>xxx</replaceable>()</function>
2242-
macro that corresponds to the argument's data type. In non-strict
2242+
macro that corresponds to the argument's data type.(In non-strict
22432243
functions there needs to be a previous check about argument null-ness
2244-
using <function>PG_ARGNULL_<replaceable>xxx</replaceable>()</function>.
2244+
using <function>PG_ARGISNULL()</function>; see below.)
22452245
The result is returned using a
22462246
<function>PG_RETURN_<replaceable>xxx</replaceable>()</function>
22472247
macro for the return type.
@@ -2403,14 +2403,6 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
24032403
explicitly, using <function>PG_ARGISNULL()</function>.
24042404
</para>
24052405

2406-
<para>
2407-
At first glance, the version-1 coding conventions might appear to be just
2408-
pointless obscurantism, over using plain <literal>C</literal> calling
2409-
conventions. They do however allow to deal with <literal>NULL</literal>able
2410-
arguments/return values, and <quote>toasted</quote> (compressed or
2411-
out-of-line) values.
2412-
</para>
2413-
24142406
<para>
24152407
The macro <function>PG_ARGISNULL(<replaceable>n</replaceable>)</function>
24162408
allows a function to test whether each input is null. (Of course, doing
@@ -2425,6 +2417,14 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
24252417
this works in both strict and nonstrict functions.
24262418
</para>
24272419

2420+
<para>
2421+
At first glance, the version-1 coding conventions might appear
2422+
to be just pointless obscurantism, compared to using
2423+
plain <literal>C</literal> calling conventions. They do however allow
2424+
us to deal with <literal>NULL</literal>able arguments/return values,
2425+
and <quote>toasted</quote> (compressed or out-of-line) values.
2426+
</para>
2427+
24282428
<para>
24292429
Other options provided by the version-1 interface are two
24302430
variants of the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp