<!--
-$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.311 2005/03/24 04:36:17 momjian Exp $
+$PostgreSQL: pgsql/doc/src/sgml/runtime.sgml,v 1.312 2005/03/29 03:01:29 tgl Exp $
 -->
 
 <chapter Id="runtime">
        <para>
         Shows the maximum number of function arguments. It is determined by
         the value of <literal>FUNC_MAX_ARGS</> when building the server. The
-        default value is 32.
+        default value is 100.
        </para>
       </listitem>
      </varlistentry>
 
  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.182 2005/03/24 04:36:17 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.183 2005/03/29 03:01:30 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
    ControlFile->xlog_seg_size = XLOG_SEG_SIZE;
 
    ControlFile->nameDataLen = NAMEDATALEN;
-   ControlFile->funcMaxArgs = FUNC_MAX_ARGS;
+   ControlFile->indexMaxKeys = INDEX_MAX_KEYS;
 
 #ifdef HAVE_INT64_TIMESTAMP
    ControlFile->enableIntTimes = TRUE;
                     " but the server was compiled with NAMEDATALEN %d.",
                           ControlFile->nameDataLen, NAMEDATALEN),
             errhint("It looks like you need to recompile or initdb.")));
-   if (ControlFile->funcMaxArgs != FUNC_MAX_ARGS)
+   if (ControlFile->indexMaxKeys != INDEX_MAX_KEYS)
        ereport(FATAL,
                (errmsg("database files are incompatible with server"),
-                errdetail("The database cluster was initialized with FUNC_MAX_ARGS %d,"
-                  " but the server was compiled with FUNC_MAX_ARGS %d.",
-                          ControlFile->funcMaxArgs, FUNC_MAX_ARGS),
+                errdetail("The database cluster was initialized with INDEX_MAX_KEYS %d,"
+                  " but the server was compiled with INDEX_MAX_KEYS %d.",
+                          ControlFile->indexMaxKeys, INDEX_MAX_KEYS),
             errhint("It looks like you need to recompile or initdb.")));
 
 #ifdef HAVE_INT64_TIMESTAMP
 
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/catalog/pg_aggregate.c,v 1.70 2005/01/27 23:42:15 tgl Exp $
+ *   $PostgreSQL: pgsql/src/backend/catalog/pg_aggregate.c,v 1.71 2005/03/29 03:01:30 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
    Oid         finalfn = InvalidOid;   /* can be omitted */
    Oid         rettype;
    Oid         finaltype;
-   Oid         fnArgs[FUNC_MAX_ARGS];
+   Oid         fnArgs[2];      /* we only deal with 1- and 2-arg fns */
    int         nargs_transfn;
    Oid         procOid;
    TupleDesc   tupDesc;
            "transition type must have one of them as its base type.")));
 
    /* handle transfn */
-   MemSet(fnArgs, 0, FUNC_MAX_ARGS * sizeof(Oid));
    fnArgs[0] = aggTransType;
    if (aggBaseType == ANYOID)
        nargs_transfn = 1;
    /* handle finalfn, if supplied */
    if (aggfinalfnName)
    {
-       MemSet(fnArgs, 0, FUNC_MAX_ARGS * sizeof(Oid));
        fnArgs[0] = aggTransType;
        finalfn = lookup_agg_function(aggfinalfnName, 1, fnArgs,
                                      &finaltype);
     * aggregate.  (This could fail if there's already a conflicting
     * entry.)
     */
-   MemSet(fnArgs, 0, FUNC_MAX_ARGS * sizeof(Oid));
    fnArgs[0] = aggBaseType;
 
    procOid = ProcedureCreate(aggName,
 
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/catalog/pg_operator.c,v 1.88 2005/01/27 23:23:51 neilc Exp $
+ *   $PostgreSQL: pgsql/src/backend/catalog/pg_operator.c,v 1.89 2005/03/29 03:01:30 tgl Exp $
  *
  * NOTES
  *   these routines moved here from commands/define.c and somewhat cleaned up.
                restOid,
                joinOid;
    bool        selfCommutator = false;
-   Oid         typeId[FUNC_MAX_ARGS];
+   Oid         typeId[4];      /* only need up to 4 args here */
    int         nargs;
    NameData    oname;
    TupleDesc   tupDesc;
     * procedureName to place in "result" field. Do this before shells are
     * created so we don't have to worry about deleting them later.
     */
-   MemSet(typeId, 0, FUNC_MAX_ARGS * sizeof(Oid));
    if (!OidIsValid(leftTypeId))
    {
        typeId[0] = rightTypeId;
     */
    if (restrictionName)
    {
-       MemSet(typeId, 0, FUNC_MAX_ARGS * sizeof(Oid));
        typeId[0] = INTERNALOID;    /* Query */
        typeId[1] = OIDOID;     /* operator OID */
        typeId[2] = INTERNALOID;    /* args list */
     */
    if (joinName)
    {
-       MemSet(typeId, 0, FUNC_MAX_ARGS * sizeof(Oid));
        typeId[0] = INTERNALOID;    /* Query */
        typeId[1] = OIDOID;     /* operator OID */
        typeId[2] = INTERNALOID;    /* args list */
 
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/commands/proclang.c,v 1.57 2005/02/14 06:17:44 tgl Exp $
+ *   $PostgreSQL: pgsql/src/backend/commands/proclang.c,v 1.58 2005/03/29 03:01:30 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
    Oid         procOid,
                valProcOid;
    Oid         funcrettype;
-   Oid         typev[FUNC_MAX_ARGS];
+   Oid         funcargtypes[1];
    NameData    langname;
    char        nulls[Natts_pg_language];
    Datum       values[Natts_pg_language];
     * Lookup the PL handler function and check that it is of the expected
     * return type
     */
-   MemSet(typev, 0, sizeof(typev));
-   procOid = LookupFuncName(stmt->plhandler, 0, typev, false);
+   procOid = LookupFuncName(stmt->plhandler, 0, funcargtypes, false);
    funcrettype = get_func_rettype(procOid);
    if (funcrettype != LANGUAGE_HANDLEROID)
    {
    /* validate the validator function */
    if (stmt->plvalidator)
    {
-       typev[0] = OIDOID;
-       valProcOid = LookupFuncName(stmt->plvalidator, 1, typev, false);
+       funcargtypes[0] = OIDOID;
+       valProcOid = LookupFuncName(stmt->plvalidator, 1, funcargtypes, false);
        /* return value is ignored, so we don't check the type */
    }
    else
 
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.182 2005/03/29 00:16:57 tgl Exp $
+ *   $PostgreSQL: pgsql/src/backend/commands/trigger.c,v 1.183 2005/03/29 03:01:30 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
    /*
     * Call the function, passing no arguments but setting a context.
     */
-   MemSet(&fcinfo, 0, sizeof(fcinfo));
-
-   fcinfo.flinfo = finfo;
-   fcinfo.context = (Node *) trigdata;
+   InitFunctionCallInfoData(fcinfo, finfo, 0, (Node *) trigdata, NULL);
 
    result = FunctionCallInvoke(&fcinfo);
 
 
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.67 2005/01/27 23:23:56 neilc Exp $
+ *   $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.68 2005/03/29 03:01:30 tgl Exp $
  *
  * DESCRIPTION
  *   The "DefineFoo" routines take the parse tree and pick out the
 static Oid
 findTypeInputFunction(List *procname, Oid typeOid)
 {
-   Oid         argList[FUNC_MAX_ARGS];
+   Oid         argList[3];
    Oid         procOid;
 
    /*
     * For backwards compatibility we allow OPAQUE in place of CSTRING; if we
     * see this, we issue a warning and fix up the pg_proc entry.
     */
-   MemSet(argList, 0, FUNC_MAX_ARGS * sizeof(Oid));
-
    argList[0] = CSTRINGOID;
 
    procOid = LookupFuncName(procname, 1, argList, true);
        return procOid;
 
    /* No luck, try it with OPAQUE */
-   MemSet(argList, 0, FUNC_MAX_ARGS * sizeof(Oid));
-
    argList[0] = OPAQUEOID;
 
    procOid = LookupFuncName(procname, 1, argList, true);
 static Oid
 findTypeOutputFunction(List *procname, Oid typeOid)
 {
-   Oid         argList[FUNC_MAX_ARGS];
+   Oid         argList[2];
    Oid         procOid;
 
    /*
     * type name; if we see this, we issue a warning and fix up the
     * pg_proc entry.
     */
-   MemSet(argList, 0, FUNC_MAX_ARGS * sizeof(Oid));
-
    argList[0] = typeOid;
 
    procOid = LookupFuncName(procname, 1, argList, true);
        return procOid;
 
    /* No luck, try it with OPAQUE */
-   MemSet(argList, 0, FUNC_MAX_ARGS * sizeof(Oid));
-
    argList[0] = OPAQUEOID;
 
    procOid = LookupFuncName(procname, 1, argList, true);
 static Oid
 findTypeReceiveFunction(List *procname, Oid typeOid)
 {
-   Oid         argList[FUNC_MAX_ARGS];
+   Oid         argList[2];
    Oid         procOid;
 
    /*
     * Receive functions can take a single argument of type INTERNAL, or
     * two arguments (internal, oid).
     */
-   MemSet(argList, 0, FUNC_MAX_ARGS * sizeof(Oid));
-
    argList[0] = INTERNALOID;
 
    procOid = LookupFuncName(procname, 1, argList, true);
 static Oid
 findTypeSendFunction(List *procname, Oid typeOid)
 {
-   Oid         argList[FUNC_MAX_ARGS];
+   Oid         argList[2];
    Oid         procOid;
 
    /*
     * Send functions can take a single argument of the type, or two
     * arguments (data value, element OID).
     */
-   MemSet(argList, 0, FUNC_MAX_ARGS * sizeof(Oid));
-
    argList[0] = typeOid;
 
    procOid = LookupFuncName(procname, 1, argList, true);
 static Oid
 findTypeAnalyzeFunction(List *procname, Oid typeOid)
 {
-   Oid         argList[FUNC_MAX_ARGS];
+   Oid         argList[1];
    Oid         procOid;
 
    /*
     * Analyze functions always take one INTERNAL argument and return
     * bool.
     */
-   MemSet(argList, 0, FUNC_MAX_ARGS * sizeof(Oid));
-
    argList[0] = INTERNALOID;
 
    procOid = LookupFuncName(procname, 1, argList, true);
 
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/parser/parse_func.c,v 1.175 2004/12/31 22:00:27 pgsql Exp $
+ *   $PostgreSQL: pgsql/src/backend/parser/parse_func.c,v 1.176 2005/03/29 03:01:31 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
    if (nargs > FUNC_MAX_ARGS)
        ereport(ERROR,
                (errcode(ERRCODE_TOO_MANY_ARGUMENTS),
-              errmsg("cannot pass more than %d arguments to a function",
-                     FUNC_MAX_ARGS)));
+                errmsg("cannot pass more than %d arguments to a function",
+                       FUNC_MAX_ARGS)));
 
    if (fargs)
    {
     * Okay, it's not a column projection, so it must really be a
     * function. Extract arg type info in preparation for function lookup.
     */
-   MemSet(actual_arg_types, 0, FUNC_MAX_ARGS * sizeof(Oid));
-
    argn = 0;
    foreach(l, fargs)
    {
    bool        slot_has_preferred_type[FUNC_MAX_ARGS];
    bool        resolved_unknowns;
 
+   /* protect local fixed-size arrays */
+   if (nargs > FUNC_MAX_ARGS)
+       ereport(ERROR,
+               (errcode(ERRCODE_TOO_MANY_ARGUMENTS),
+                errmsg("cannot pass more than %d arguments to a function",
+                       FUNC_MAX_ARGS)));
+
    /*
     * If any input types are domains, reduce them to their base types.
     * This ensures that we will consider functions on the base type to be
 static Oid **
 argtype_inherit(int nargs, Oid *argtypes)
 {
+   Oid       **result;
    Oid         relid;
    int         i;
-   InhPaths    arginh[FUNC_MAX_ARGS];
+   InhPaths   *arginh;
+
+   /* Set up the vector of superclass information */
+   arginh = (InhPaths *) palloc(nargs * sizeof(InhPaths));
 
    for (i = 0; i < nargs; i++)
    {
        }
    }
 
-   /* return an ordered cross-product of the classes involved */
-   return gen_cross_product(arginh, nargs);
+   /* Compute an ordered cross-product of the classes involved */
+   result = gen_cross_product(arginh, nargs);
+
+   pfree(arginh);
+
+   return result;
 }
 
 /*
    Oid        *oneres;
    int         i,
                j;
-   int         cur[FUNC_MAX_ARGS];
+   int        *cur;
 
    /*
     * At each position we want to try the original datatype, plus each
     * generate the original input type at position i.  When cur[i] == k
     * for k > 0, generate its k'th supertype.
     */
-   MemSet(cur, 0, sizeof(cur));
+   cur = (int *) palloc0(nargs * sizeof(int));
 
    for (;;)
    {
        cur[i] += 1;
 
        /* Generate the proper output type-OID vector */
-       oneres = (Oid *) palloc0(FUNC_MAX_ARGS * sizeof(Oid));
+       oneres = (Oid *) palloc(nargs * sizeof(Oid));
 
        for (i = 0; i < nargs; i++)
        {
 
    Assert(j == nanswers);
 
+   pfree(cur);
+
    return result;
 }
 
    int         i;
    ListCell   *args_item;
 
-   MemSet(argoids, 0, FUNC_MAX_ARGS * sizeof(Oid));
    argcount = list_length(argtypes);
    if (argcount > FUNC_MAX_ARGS)
        ereport(ERROR,
 
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.78 2005/03/29 00:17:05 tgl Exp $
+ *   $PostgreSQL: pgsql/src/backend/tcop/fastpath.c,v 1.79 2005/03/29 03:01:31 tgl Exp $
  *
  * NOTES
  *   This cruft is the server side of PQfn.
     * the struct fp_info across transactions anymore, but keep it
     * anyway.]
     */
-   MemSet((char *) fip, 0, sizeof(struct fp_info));
+   MemSet(fip, 0, sizeof(struct fp_info));
    fip->funcid = InvalidOid;
 
    fmgr_info(func_id, &fip->flinfo);
    /*
     * Prepare function call info block and insert arguments.
     */
-   MemSet(&fcinfo, 0, sizeof(fcinfo));
-   fcinfo.flinfo = &fip->flinfo;
+   InitFunctionCallInfoData(fcinfo, &fip->flinfo, 0, NULL, NULL);
 
    if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 3)
        rformat = parse_fcall_arguments(msgBuf, fip, &fcinfo);
            fcinfo->argnull[i] = true;
            continue;
        }
+       fcinfo->argnull[i] = false;
        if (argsize < 0)
            ereport(ERROR,
                    (errcode(ERRCODE_PROTOCOL_VIOLATION),
            fcinfo->argnull[i] = true;
            continue;
        }
+       fcinfo->argnull[i] = false;
        if (argsize < 0)
            ereport(ERROR,
                    (errcode(ERRCODE_PROTOCOL_VIOLATION),
 
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.118 2005/03/29 00:17:08 tgl Exp $
+ *   $PostgreSQL: pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.119 2005/03/29 03:01:31 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
        /*
         * apply the operator to each pair of array elements.
         */
-       MemSet(&locfcinfo, 0, sizeof(locfcinfo));
-       locfcinfo.flinfo = &typentry->eq_opr_finfo;
-       locfcinfo.nargs = 2;
+       InitFunctionCallInfoData(locfcinfo, &typentry->eq_opr_finfo, 2,
+                                NULL, NULL);
 
        /* Loop over source data */
        for (i = 0; i < nitems1; i++)
    /*
     * apply the operator to each pair of array elements.
     */
-   MemSet(&locfcinfo, 0, sizeof(locfcinfo));
-   locfcinfo.flinfo = &typentry->cmp_proc_finfo;
-   locfcinfo.nargs = 2;
+   InitFunctionCallInfoData(locfcinfo, &typentry->cmp_proc_finfo, 2,
+                            NULL, NULL);
 
    /* Loop over source data */
    min_nitems = Min(nitems1, nitems2);
     * We pass on the desttypmod and isExplicit flags whether or not the
     * function wants them.
     */
-   MemSet(&locfcinfo, 0, sizeof(locfcinfo));
-   locfcinfo.flinfo = &my_extra->coerce_finfo;
-   locfcinfo.nargs = 3;
+   InitFunctionCallInfoData(locfcinfo, &my_extra->coerce_finfo, 3,
+                            NULL, NULL);
    locfcinfo.arg[0] = PointerGetDatum(src);
    locfcinfo.arg[1] = Int32GetDatum(desttypmod);
    locfcinfo.arg[2] = BoolGetDatum(isExplicit);
+   locfcinfo.argnull[0] = false;
+   locfcinfo.argnull[1] = false;
+   locfcinfo.argnull[2] = false;
 
    return array_map(&locfcinfo, my_extra->srctype, my_extra->desttype,
                     &my_extra->amstate);
     *
     * Note: we pass isExplicit whether or not the function wants it ...
     */
-   MemSet(&locfcinfo, 0, sizeof(locfcinfo));
-   locfcinfo.flinfo = &my_extra->coerce_finfo;
-   locfcinfo.nargs = 3;
+   InitFunctionCallInfoData(locfcinfo, &my_extra->coerce_finfo, 3,
+                            NULL, NULL);
    locfcinfo.arg[0] = PointerGetDatum(v);
    locfcinfo.arg[1] = Int32GetDatum(desttypmod);
    locfcinfo.arg[2] = BoolGetDatum(isExplicit);
+   locfcinfo.argnull[0] = false;
+   locfcinfo.argnull[1] = false;
+   locfcinfo.argnull[2] = false;
 
    return array_map(&locfcinfo, ARR_ELEMTYPE(v), ARR_ELEMTYPE(v),
                     &my_extra->amstate);
 
  *
  *
  * IDENTIFICATION
- *   $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.91 2005/03/29 00:17:15 tgl Exp $
+ *   $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.92 2005/03/29 03:01:31 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
            /* Old style: need to use a handler */
            finfo->fn_addr = fmgr_oldstyle;
            fnextra = (Oldstyle_fnextra *)
-               MemoryContextAlloc(finfo->fn_mcxt, sizeof(Oldstyle_fnextra));
+               MemoryContextAllocZero(finfo->fn_mcxt,
+                                      sizeof(Oldstyle_fnextra));
            finfo->fn_extra = (void *) fnextra;
-           MemSet(fnextra, 0, sizeof(Oldstyle_fnextra));
            fnextra->func = (func_ptr) user_fn;
            for (i = 0; i < procedureStruct->pronargs; i++)
            {
 
    if (!fcinfo->flinfo->fn_extra)
    {
-       fcache = MemoryContextAlloc(fcinfo->flinfo->fn_mcxt, sizeof(*fcache));
-       memset(fcache, 0, sizeof(*fcache));
+       fcache = MemoryContextAllocZero(fcinfo->flinfo->fn_mcxt,
+                                       sizeof(*fcache));
 
        fmgr_info_cxt_security(fcinfo->flinfo->fn_oid, &fcache->flinfo,
                               fcinfo->flinfo->fn_mcxt, true);
 
  * licence: BSD
  *
- * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.21 2005/02/22 04:39:00 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.22 2005/03/29 03:01:32 tgl Exp $
  */
 #include "postgres.h"
 
    printf(_("Blocks per segment of large relation: %u\n"), ControlFile.relseg_size);
    printf(_("Bytes per WAL segment:                %u\n"), ControlFile.xlog_seg_size);
    printf(_("Maximum length of identifiers:        %u\n"), ControlFile.nameDataLen);
-   printf(_("Maximum number of function arguments: %u\n"), ControlFile.funcMaxArgs);
+   printf(_("Maximum columns in an index:          %u\n"), ControlFile.indexMaxKeys);
    printf(_("Date/time type storage:               %s\n"),
           (ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers")));
    printf(_("Maximum length of locale name:        %u\n"), ControlFile.localeBuflen);
 
  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.29 2005/02/22 04:40:20 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_resetxlog/pg_resetxlog.c,v 1.30 2005/03/29 03:01:32 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
    ControlFile.relseg_size = RELSEG_SIZE;
    ControlFile.xlog_seg_size = XLOG_SEG_SIZE;
    ControlFile.nameDataLen = NAMEDATALEN;
-   ControlFile.funcMaxArgs = FUNC_MAX_ARGS;
+   ControlFile.indexMaxKeys = INDEX_MAX_KEYS;
 #ifdef HAVE_INT64_TIMESTAMP
    ControlFile.enableIntTimes = TRUE;
 #else
    printf(_("Database block size:                  %u\n"), ControlFile.blcksz);
    printf(_("Blocks per segment of large relation: %u\n"), ControlFile.relseg_size);
    printf(_("Maximum length of identifiers:        %u\n"), ControlFile.nameDataLen);
-   printf(_("Maximum number of function arguments: %u\n"), ControlFile.funcMaxArgs);
+   printf(_("Maximum columns in an index:          %u\n"), ControlFile.indexMaxKeys);
    printf(_("Date/time type storage:               %s\n"),
           (ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers")));
    printf(_("Maximum length of locale name:        %u\n"), ControlFile.localeBuflen);
 
  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.19 2004/12/31 22:03:24 pgsql Exp $
+ * $PostgreSQL: pgsql/src/include/catalog/pg_control.h,v 1.20 2005/03/29 03:01:32 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
    uint32      xlog_seg_size;  /* size of each WAL segment */
 
    uint32      nameDataLen;    /* catalog name field width */
-   uint32      funcMaxArgs;    /* maximum number of function arguments */
+   uint32      indexMaxKeys;   /* max number of columns in an index */
 
    /* flag indicating internal format of timestamp, interval, time */
    uint32      enableIntTimes; /* int64 storage enabled? */
 
  * for developers. If you edit any of these, be sure to do a *full*
  * rebuild (and an initdb if noted).
  *
- * $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.15 2004/09/10 14:27:37 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.16 2005/03/29 03:01:32 tgl Exp $
  *------------------------------------------------------------------------
  */
 
 #define XLOG_SEG_SIZE  (16*1024*1024)
 
 /*
- * Maximum number of columns in an index and maximum number of
- * arguments to a function. They must be the same value.
+ * Maximum number of arguments to a function.
  *
  * The minimum value is 8 (index creation uses 8-argument functions).
- * There is no specific upper limit, although large values will waste
- * system-table space and processing time.
+ * The maximum possible value is around 600 (limited by index tuple size in
+ * pg_proc's index; BLCKSZ larger than 8K would allow more).  Values larger
+ * than needed will waste memory and processing time, but do not directly
+ * cost disk space.
  *
- * Changing these requires an initdb.
+ * Changing this does not require an initdb, but it does require a full
+ * backend recompile (including any user-defined C functions).
+ */
+#define FUNC_MAX_ARGS      100
+
+/*
+ * Maximum number of columns in an index.  There is little point in making
+ * this anything but a multiple of 32, because the main cost is associated
+ * with index tuple header size (see access/itup.h).
+ *
+ * Changing this requires an initdb.
  */
 #define INDEX_MAX_KEYS     32
-#define FUNC_MAX_ARGS      INDEX_MAX_KEYS
 
 /*
  * Define this to make libpgtcl's "pg_result -assign" command process