Commit d26b042c authored by Tom Lane's avatar Tom Lane

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.
parent c6a4ace5
...@@ -67,7 +67,7 @@ typedef struct ...@@ -67,7 +67,7 @@ typedef struct
{ {
PGFunction fn_addr; /* pointer to function or handler to be called */ PGFunction fn_addr; /* pointer to function or handler to be called */
Oid fn_oid; /* OID of function (NOT of handler, if any) */ Oid fn_oid; /* OID of function (NOT of handler, if any) */
short fn_nargs; /* 0..FUNC_MAX_ARGS, or -1 if variable arg count */ short fn_nargs; /* number of input args (0..FUNC_MAX_ARGS) */
bool fn_strict; /* function is "strict" (NULL in => NULL out) */ bool fn_strict; /* function is "strict" (NULL in => NULL out) */
bool fn_retset; /* function returns a set (over multiple calls) */ bool fn_retset; /* function returns a set (over multiple calls) */
unsigned char fn_stats; /* collect stats if track_functions > this */ unsigned char fn_stats; /* collect stats if track_functions > this */
......
...@@ -54,8 +54,7 @@ typedef struct FmgrInfo ...@@ -54,8 +54,7 @@ typedef struct FmgrInfo
{ {
PGFunction fn_addr; /* pointer to function or handler to be called */ PGFunction fn_addr; /* pointer to function or handler to be called */
Oid fn_oid; /* OID of function (NOT of handler, if any) */ Oid fn_oid; /* OID of function (NOT of handler, if any) */
short fn_nargs; /* 0..FUNC_MAX_ARGS, or -1 if variable arg short fn_nargs; /* number of input args (0..FUNC_MAX_ARGS) */
* count */
bool fn_strict; /* function is "strict" (NULL in => NULL out) */ bool fn_strict; /* function is "strict" (NULL in => NULL out) */
bool fn_retset; /* function returns a set */ bool fn_retset; /* function returns a set */
unsigned char fn_stats; /* collect stats if track_functions > this */ unsigned char fn_stats; /* collect stats if track_functions > this */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment