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

Commitdbf95c8

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 parent340de72 commitdbf95c8

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
@@ -2237,9 +2237,9 @@ PG_FUNCTION_INFO_V1(funcname);
22372237
<para>
22382238
In a version-1 function, each actual argument is fetched using a
22392239
<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
22412241
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.)
22432243
The result is returned using a
22442244
<function>PG_RETURN_<replaceable>xxx</replaceable>()</function>
22452245
macro for the return type.
@@ -2401,14 +2401,6 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
24012401
explicitly, using <function>PG_ARGISNULL()</function>.
24022402
</para>
24032403

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-
24122404
<para>
24132405
The macro <function>PG_ARGISNULL(<replaceable>n</replaceable>)</function>
24142406
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
24232415
this works in both strict and nonstrict functions.
24242416
</para>
24252417

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+
24262426
<para>
24272427
Other options provided by the version-1 interface are two
24282428
variants of the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp