Skip to content

Commit d26b042

Browse files
committed
Fix documentation of FmgrInfo.fn_nargs.
Some ancient comments claimed that fn_nargs could be -1 to indicate a variable number of input arguments; but this was never implemented, and is at variance with what we ultimately did with "variadic" functions. Update the comments.
1 parent c6a4ace commit d26b042

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/backend/utils/fmgr/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ typedef struct
6767
{
6868
PGFunction fn_addr; /* pointer to function or handler to be called */
6969
Oid fn_oid; /* OID of function (NOT of handler, if any) */
70-
short fn_nargs; /* 0..FUNC_MAX_ARGS, or -1 if variable arg count */
70+
short fn_nargs; /* number of input args (0..FUNC_MAX_ARGS) */
7171
bool fn_strict; /* function is "strict" (NULL in => NULL out) */
7272
bool fn_retset; /* function returns a set (over multiple calls) */
7373
unsigned char fn_stats; /* collect stats if track_functions > this */

src/include/fmgr.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ typedef struct FmgrInfo
5454
{
5555
PGFunction fn_addr; /* pointer to function or handler to be called */
5656
Oid fn_oid; /* OID of function (NOT of handler, if any) */
57-
short fn_nargs; /* 0..FUNC_MAX_ARGS, or -1 if variable arg
58-
* count */
57+
short fn_nargs; /* number of input args (0..FUNC_MAX_ARGS) */
5958
bool fn_strict; /* function is "strict" (NULL in => NULL out) */
6059
bool fn_retset; /* function returns a set */
6160
unsigned char fn_stats; /* collect stats if track_functions > this */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy