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

Commit00f3886

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 parent02530da commit00f3886

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
@@ -2200,9 +2200,9 @@ PG_FUNCTION_INFO_V1(funcname);
22002200
<para>
22012201
In a version-1 function, each actual argument is fetched using a
22022202
<function>PG_GETARG_<replaceable>xxx</replaceable>()</function>
2203-
macro that corresponds to the argument's data type. In non-strict
2203+
macro that corresponds to the argument's data type.(In non-strict
22042204
functions there needs to be a previous check about argument null-ness
2205-
using <function>PG_ARGNULL_<replaceable>xxx</replaceable>()</function>.
2205+
using <function>PG_ARGISNULL()</function>; see below.)
22062206
The result is returned using a
22072207
<function>PG_RETURN_<replaceable>xxx</replaceable>()</function>
22082208
macro for the return type.
@@ -2366,14 +2366,6 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
23662366
explicitly, using <function>PG_ARGISNULL()</function>.
23672367
</para>
23682368

2369-
<para>
2370-
At first glance, the version-1 coding conventions might appear to be just
2371-
pointless obscurantism, over using plain <literal>C</> calling
2372-
conventions. They do however allow to deal with <literal>NULL</>able
2373-
arguments/return values, and <quote>toasted</quote> (compressed or
2374-
out-of-line) values.
2375-
</para>
2376-
23772369
<para>
23782370
The macro <function>PG_ARGISNULL(<replaceable>n</>)</function>
23792371
allows a function to test whether each input is null. (Of course, doing
@@ -2388,6 +2380,14 @@ CREATE FUNCTION concat_text(text, text) RETURNS text
23882380
this works in both strict and nonstrict functions.
23892381
</para>
23902382

2383+
<para>
2384+
At first glance, the version-1 coding conventions might appear
2385+
to be just pointless obscurantism, compared to using
2386+
plain <literal>C</literal> calling conventions. They do however allow
2387+
us to deal with <literal>NULL</literal>able arguments/return values,
2388+
and <quote>toasted</quote> (compressed or out-of-line) values.
2389+
</para>
2390+
23912391
<para>
23922392
Other options provided by the version-1 interface are two
23932393
variants of the

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp