Commit 8a093d0a authored by Bruce Momjian's avatar Bruce Momjian

Make number of args to a function configurable.

parent 6456b17b
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.21 2000/01/10 16:13:10 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/hash/hashfunc.c,v 1.22 2000/01/10 17:14:28 momjian Exp $
* *
* NOTES * NOTES
* These functions are stored in pg_amproc. For each operator class * These functions are stored in pg_amproc. For each operator class
...@@ -145,7 +145,7 @@ hashoidvector(Oid *key) ...@@ -145,7 +145,7 @@ hashoidvector(Oid *key)
int i; int i;
uint32 result = 0; uint32 result = 0;
for (i = 0; i < 8; i++) for (i = 0; i < INDEX_MAX_KEYS; i++)
result = result ^ (~(uint32) key[i]); result = result ^ (~(uint32) key[i]);
return result; return result;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.29 2000/01/10 16:13:10 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtcompare.c,v 1.30 2000/01/10 17:14:29 momjian Exp $
* *
* NOTES * NOTES
* These functions are stored in pg_amproc. For each operator class * These functions are stored in pg_amproc. For each operator class
...@@ -98,7 +98,7 @@ btoidvectorcmp(Oid *a, Oid *b) ...@@ -98,7 +98,7 @@ btoidvectorcmp(Oid *a, Oid *b)
{ {
int i; int i;
for (i = 0; i < 8; i++) for (i = 0; i < INDEX_MAX_KEYS; i++)
/* we use this because we need the int4gt, etc */ /* we use this because we need the int4gt, etc */
if (!int4eq(a[i], b[i])) if (!int4eq(a[i], b[i]))
{ {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.26 1999/11/22 17:55:58 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.27 2000/01/10 17:14:31 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -71,11 +71,11 @@ AggregateCreate(char *aggName, ...@@ -71,11 +71,11 @@ AggregateCreate(char *aggName,
Oid xret1 = InvalidOid; Oid xret1 = InvalidOid;
Oid xret2 = InvalidOid; Oid xret2 = InvalidOid;
Oid fret = InvalidOid; Oid fret = InvalidOid;
Oid fnArgs[8]; Oid fnArgs[FUNC_MAX_ARGS];
NameData aname; NameData aname;
TupleDesc tupDesc; TupleDesc tupDesc;
MemSet(fnArgs, 0, 8 * sizeof(Oid)); MemSet(fnArgs, 0, FUNC_MAX_ARGS * sizeof(Oid));
/* sanity checks */ /* sanity checks */
if (!aggName) if (!aggName)
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.46 2000/01/05 18:23:45 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.47 2000/01/10 17:14:31 momjian Exp $
* *
* NOTES * NOTES
* these routines moved here from commands/define.c and somewhat cleaned up. * these routines moved here from commands/define.c and somewhat cleaned up.
...@@ -482,7 +482,7 @@ OperatorDef(char *operatorName, ...@@ -482,7 +482,7 @@ OperatorDef(char *operatorName,
bool rightDefined = false; bool rightDefined = false;
bool selfCommutator = false; bool selfCommutator = false;
char *name[4]; char *name[4];
Oid typeId[8]; Oid typeId[FUNC_MAX_ARGS];
int nargs; int nargs;
NameData oname; NameData oname;
TupleDesc tupDesc; TupleDesc tupDesc;
...@@ -556,7 +556,7 @@ OperatorDef(char *operatorName, ...@@ -556,7 +556,7 @@ OperatorDef(char *operatorName,
* have to worry about deleting them later. * have to worry about deleting them later.
* ---------------- * ----------------
*/ */
MemSet(typeId, 0, 8 * sizeof(Oid)); MemSet(typeId, 0, FUNC_MAX_ARGS * sizeof(Oid));
if (!leftTypeName) if (!leftTypeName)
{ {
typeId[0] = rightTypeId; typeId[0] = rightTypeId;
...@@ -592,7 +592,7 @@ OperatorDef(char *operatorName, ...@@ -592,7 +592,7 @@ OperatorDef(char *operatorName,
*/ */
if (restrictionName) if (restrictionName)
{ /* optional */ { /* optional */
MemSet(typeId, 0, 8 * sizeof(Oid)); MemSet(typeId, 0, FUNC_MAX_ARGS * sizeof(Oid));
typeId[0] = OIDOID; /* operator OID */ typeId[0] = OIDOID; /* operator OID */
typeId[1] = OIDOID; /* relation OID */ typeId[1] = OIDOID; /* relation OID */
typeId[2] = INT2OID; /* attribute number */ typeId[2] = INT2OID; /* attribute number */
...@@ -617,7 +617,7 @@ OperatorDef(char *operatorName, ...@@ -617,7 +617,7 @@ OperatorDef(char *operatorName,
*/ */
if (joinName) if (joinName)
{ /* optional */ { /* optional */
MemSet(typeId, 0, 8 * sizeof(Oid)); MemSet(typeId, 0, FUNC_MAX_ARGS * sizeof(Oid));
typeId[0] = OIDOID; /* operator OID */ typeId[0] = OIDOID; /* operator OID */
typeId[1] = OIDOID; /* relation OID 1 */ typeId[1] = OIDOID; /* relation OID 1 */
typeId[2] = INT2OID; /* attribute number 1 */ typeId[2] = INT2OID; /* attribute number 1 */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.36 1999/11/22 17:55:58 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.37 2000/01/10 17:14:31 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -61,7 +61,7 @@ ProcedureCreate(char *procedureName, ...@@ -61,7 +61,7 @@ ProcedureCreate(char *procedureName,
List *x; List *x;
List *querytree_list; List *querytree_list;
List *plan_list; List *plan_list;
Oid typev[8]; Oid typev[FUNC_MAX_ARGS];
Oid relid; Oid relid;
Oid toid; Oid toid;
NameData procname; NameData procname;
...@@ -75,13 +75,13 @@ ProcedureCreate(char *procedureName, ...@@ -75,13 +75,13 @@ ProcedureCreate(char *procedureName,
Assert(PointerIsValid(probin)); Assert(PointerIsValid(probin));
parameterCount = 0; parameterCount = 0;
MemSet(typev, 0, 8 * sizeof(Oid)); MemSet(typev, 0, FUNC_MAX_ARGS * sizeof(Oid));
foreach(x, argList) foreach(x, argList)
{ {
Value *t = lfirst(x); Value *t = lfirst(x);
if (parameterCount == 8) if (parameterCount == FUNC_MAX_ARGS)
elog(ERROR, "Procedures cannot take more than 8 arguments"); elog(ERROR, "Procedures cannot take more than %d arguments",FUNC_MAX_ARGS);
if (strcmp(strVal(t), "opaque") == 0) if (strcmp(strVal(t), "opaque") == 0)
{ {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.44 1999/12/16 22:19:39 wieck Exp $ * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.45 2000/01/10 17:14:31 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -305,7 +305,7 @@ TypeCreate(char *typeName, ...@@ -305,7 +305,7 @@ TypeCreate(char *typeName,
bool defined; bool defined;
NameData name; NameData name;
TupleDesc tupDesc; TupleDesc tupDesc;
Oid argList[8]; Oid argList[FUNC_MAX_ARGS];
static ScanKeyData typeKey[1] = { static ScanKeyData typeKey[1] = {
{0, Anum_pg_type_typname, F_NAMEEQ} {0, Anum_pg_type_typname, F_NAMEEQ}
...@@ -393,7 +393,7 @@ TypeCreate(char *typeName, ...@@ -393,7 +393,7 @@ TypeCreate(char *typeName,
* First look for a 1-argument func with all argtypes 0. This is * First look for a 1-argument func with all argtypes 0. This is
* valid for all four kinds of procedure. * valid for all four kinds of procedure.
*/ */
MemSet(argList, 0, 8 * sizeof(Oid)); MemSet(argList, 0, FUNC_MAX_ARGS * sizeof(Oid));
tup = SearchSysCacheTuple(PROCNAME, tup = SearchSysCacheTuple(PROCNAME,
PointerGetDatum(procname), PointerGetDatum(procname),
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/recipe.c,v 1.7 1999/07/16 04:58:42 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/recipe.c,v 1.8 2000/01/10 17:14:33 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -695,14 +695,14 @@ getParamTypes(TgElement * elem, Oid *typev) ...@@ -695,14 +695,14 @@ getParamTypes(TgElement * elem, Oid *typev)
j; j;
parameterCount = 0; parameterCount = 0;
for (i = 0; i < 8; i++) for (i = 0; i < FUNC_MAX_ARGS; i++)
typev[i] = 0; typev[i] = 0;
for (j = 0; j < elem->inTypes->num; j++) for (j = 0; j < elem->inTypes->num; j++)
{ {
if (parameterCount == 8) if (parameterCount == FUNC_MAX_ARGS)
{ {
elog(ERROR, elog(ERROR,
"getParamTypes: Ingredients cannot take > 8 arguments"); "getParamTypes: Ingredients cannot take > %d arguments",FUNC_MAX_ARGS);
} }
t = elem->inTypes->val[j]; t = elem->inTypes->val[j];
if (strcmp(t, "opaque") == 0) if (strcmp(t, "opaque") == 0)
...@@ -810,7 +810,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo) ...@@ -810,7 +810,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
{ {
TgElement *elem; TgElement *elem;
char *funcName; char *funcName;
Oid typev[8], /* eight arguments maximum */ Oid typev[FUNC_MAX_ARGS], /* eight arguments maximum */
relid; relid;
int i, int i,
parameterCount; parameterCount;
......
...@@ -589,7 +589,7 @@ void CommentAggregate(char *aggregate, char *argument, char *comment) { ...@@ -589,7 +589,7 @@ void CommentAggregate(char *aggregate, char *argument, char *comment) {
void CommentProc(char *function, List *arguments, char *comment) { void CommentProc(char *function, List *arguments, char *comment) {
HeapTuple argtuple, functuple; HeapTuple argtuple, functuple;
Oid oid, argoids[8]; Oid oid, argoids[FUNC_MAX_ARGS];
char *user, *argument; char *user, *argument;
int i, argcount; int i, argcount;
...@@ -597,7 +597,7 @@ void CommentProc(char *function, List *arguments, char *comment) { ...@@ -597,7 +597,7 @@ void CommentProc(char *function, List *arguments, char *comment) {
argcount = length(arguments); argcount = length(arguments);
if (argcount > 0) { if (argcount > 0) {
MemSet(argoids, 0, 8 * sizeof(Oid)); MemSet(argoids, 0, FUNC_MAX_ARGS * sizeof(Oid));
for (i = 0; i < argcount; i++) { for (i = 0; i < argcount; i++) {
argument = strVal(lfirst(arguments)); argument = strVal(lfirst(arguments));
arguments = lnext(arguments); arguments = lnext(arguments);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.16 1999/12/16 22:19:41 wieck Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.17 2000/01/10 17:14:32 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -414,7 +414,7 @@ FuncIndexArgs(IndexElem *funcIndex, ...@@ -414,7 +414,7 @@ FuncIndexArgs(IndexElem *funcIndex,
} }
*opOidP = tuple->t_data->t_oid; *opOidP = tuple->t_data->t_oid;
MemSet(argTypes, 0, 8 * sizeof(Oid)); MemSet(argTypes, 0, FUNC_MAX_ARGS * sizeof(Oid));
/* /*
* process the function arguments * process the function arguments
......
...@@ -50,7 +50,7 @@ CreateProceduralLanguage(CreatePLangStmt *stmt) ...@@ -50,7 +50,7 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
HeapTuple langTup; HeapTuple langTup;
HeapTuple procTup; HeapTuple procTup;
Oid typev[8]; Oid typev[FUNC_MAX_ARGS];
char nulls[Natts_pg_language]; char nulls[Natts_pg_language];
Datum values[Natts_pg_language]; Datum values[Natts_pg_language];
Relation rel; Relation rel;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.42 1999/12/16 22:19:41 wieck Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.43 2000/01/10 17:14:32 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -315,13 +315,13 @@ RemoveFunction(char *functionName, /* function name to be removed */ ...@@ -315,13 +315,13 @@ RemoveFunction(char *functionName, /* function name to be removed */
{ {
Relation relation; Relation relation;
HeapTuple tup; HeapTuple tup;
Oid argList[8]; Oid argList[FUNC_MAX_ARGS];
char *userName; char *userName;
char *typename; char *typename;
int i; int i;
MemSet(argList, 0, 8 * sizeof(Oid)); MemSet(argList, 0, FUNC_MAX_ARGS * sizeof(Oid));
for (i = 0; i < nargs; i++) for (i = 0; i < nargs; i++)
{ {
typename = strVal(lfirst(argNameList)); typename = strVal(lfirst(argNameList));
......
...@@ -41,7 +41,7 @@ void ...@@ -41,7 +41,7 @@ void
CreateTrigger(CreateTrigStmt *stmt) CreateTrigger(CreateTrigStmt *stmt)
{ {
int16 tgtype; int16 tgtype;
int16 tgattr[8] = {0}; int16 tgattr[FUNC_MAX_ARGS] = {0};
Datum values[Natts_pg_trigger]; Datum values[Natts_pg_trigger];
char nulls[Natts_pg_trigger]; char nulls[Natts_pg_trigger];
Relation rel; Relation rel;
...@@ -53,7 +53,7 @@ CreateTrigger(CreateTrigStmt *stmt) ...@@ -53,7 +53,7 @@ CreateTrigger(CreateTrigStmt *stmt)
Relation idescs[Num_pg_trigger_indices]; Relation idescs[Num_pg_trigger_indices];
Relation ridescs[Num_pg_class_indices]; Relation ridescs[Num_pg_class_indices];
MemoryContext oldcxt; MemoryContext oldcxt;
Oid fargtypes[8]; Oid fargtypes[FUNC_MAX_ARGS];
int found = 0; int found = 0;
int i; int i;
char constrtrigname[NAMEDATALEN]; char constrtrigname[NAMEDATALEN];
...@@ -144,7 +144,7 @@ CreateTrigger(CreateTrigStmt *stmt) ...@@ -144,7 +144,7 @@ CreateTrigger(CreateTrigStmt *stmt)
} }
heap_endscan(tgscan); heap_endscan(tgscan);
MemSet(fargtypes, 0, 8 * sizeof(Oid)); MemSet(fargtypes, 0, FUNC_MAX_ARGS * sizeof(Oid));
tuple = SearchSysCacheTuple(PROCNAME, tuple = SearchSysCacheTuple(PROCNAME,
PointerGetDatum(stmt->funcname), PointerGetDatum(stmt->funcname),
Int32GetDatum(0), Int32GetDatum(0),
...@@ -473,7 +473,7 @@ RelationBuildTriggers(Relation relation) ...@@ -473,7 +473,7 @@ RelationBuildTriggers(Relation relation)
build->tgdeferrable = pg_trigger->tgdeferrable; build->tgdeferrable = pg_trigger->tgdeferrable;
build->tginitdeferred = pg_trigger->tginitdeferred; build->tginitdeferred = pg_trigger->tginitdeferred;
build->tgnargs = pg_trigger->tgnargs; build->tgnargs = pg_trigger->tgnargs;
memcpy(build->tgattr, &(pg_trigger->tgattr), 8 * sizeof(int16)); memcpy(build->tgattr, &(pg_trigger->tgattr), FUNC_MAX_ARGS * sizeof(int16));
val = (struct varlena *) fastgetattr(&tuple, val = (struct varlena *) fastgetattr(&tuple,
Anum_pg_trigger_tgargs, Anum_pg_trigger_tgargs,
tgrel->rd_att, &isnull); tgrel->rd_att, &isnull);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.64 1999/11/12 06:39:34 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.65 2000/01/10 17:14:34 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -656,7 +656,7 @@ ExecMakeFunctionResult(Node *node, ...@@ -656,7 +656,7 @@ ExecMakeFunctionResult(Node *node,
bool *isNull, bool *isNull,
bool *isDone) bool *isDone)
{ {
Datum argV[MAXFMGRARGS]; Datum argV[FUNC_MAX_ARGS];
FunctionCachePtr fcache; FunctionCachePtr fcache;
Func *funcNode = NULL; Func *funcNode = NULL;
Oper *operNode = NULL; Oper *operNode = NULL;
...@@ -690,7 +690,7 @@ ExecMakeFunctionResult(Node *node, ...@@ -690,7 +690,7 @@ ExecMakeFunctionResult(Node *node,
{ {
bool argDone; bool argDone;
if (fcache->nargs > MAXFMGRARGS) if (fcache->nargs > FUNC_MAX_ARGS)
elog(ERROR, "ExecMakeFunctionResult: too many arguments"); elog(ERROR, "ExecMakeFunctionResult: too many arguments");
/* /*
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.25 2000/01/05 18:23:47 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.26 2000/01/10 17:14:35 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -57,7 +57,7 @@ PQfn(int fnid, ...@@ -57,7 +57,7 @@ PQfn(int fnid,
int nargs) int nargs)
{ {
char *retval; /* XXX - should be datum, maybe ? */ char *retval; /* XXX - should be datum, maybe ? */
char *arg[8]; char *arg[FUNC_MAX_ARGS];
int i; int i;
/* ---------------- /* ----------------
...@@ -304,8 +304,8 @@ pqtest_PQfn(char *q) ...@@ -304,8 +304,8 @@ pqtest_PQfn(char *q)
v, v,
f, f,
offsets; offsets;
char *fields[8]; char *fields[FUNC_MAX_ARGS];
PQArgBlock pqargs[7]; PQArgBlock pqargs[FUNC_MAX_ARGS];
int res; int res;
char *pqres; char *pqres;
...@@ -313,7 +313,7 @@ pqtest_PQfn(char *q) ...@@ -313,7 +313,7 @@ pqtest_PQfn(char *q)
* parse q into fields * parse q into fields
* ---------------- * ----------------
*/ */
i = strparse(q, fields, &offsets, 8); i = strparse(q, fields, &offsets, FUNC_MAX_ARGS);
printf("pqtest_PQfn: strparse returns %d fields\n", i); /* debug */ printf("pqtest_PQfn: strparse returns %d fields\n", i); /* debug */
if (i == 0) if (i == 0)
return -1; return -1;
...@@ -331,7 +331,7 @@ pqtest_PQfn(char *q) ...@@ -331,7 +331,7 @@ pqtest_PQfn(char *q)
* build a PQArgBlock * build a PQArgBlock
* ---------------- * ----------------
*/ */
for (j = 1; j < i && j < 8; j++) for (j = 1; j < i && j < FUNC_MAX_ARGS; j++)
{ {
k = j - 1; k = j - 1;
v = atoi(fields[j]); v = atoi(fields[j]);
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.26 1999/12/10 07:37:35 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.27 2000/01/10 17:14:36 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -142,7 +142,7 @@ can_coerce_type(int nargs, Oid *input_typeids, Oid *func_typeids) ...@@ -142,7 +142,7 @@ can_coerce_type(int nargs, Oid *input_typeids, Oid *func_typeids)
HeapTuple ftup; HeapTuple ftup;
int i; int i;
Type tp; Type tp;
Oid oid_array[MAXFARGS]; Oid oid_array[FUNC_MAX_ARGS];
/* run through argument list... */ /* run through argument list... */
for (i = 0; i < nargs; i++) for (i = 0; i < nargs; i++)
...@@ -170,7 +170,7 @@ can_coerce_type(int nargs, Oid *input_typeids, Oid *func_typeids) ...@@ -170,7 +170,7 @@ can_coerce_type(int nargs, Oid *input_typeids, Oid *func_typeids)
*/ */
else if (input_typeids[i] != UNKNOWNOID) else if (input_typeids[i] != UNKNOWNOID)
{ {
MemSet(oid_array, 0, MAXFARGS * sizeof(Oid)); MemSet(oid_array, 0, FUNC_MAX_ARGS * sizeof(Oid));
oid_array[0] = input_typeids[i]; oid_array[0] = input_typeids[i];
/* /*
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.65 1999/12/16 22:19:48 wieck Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.66 2000/01/10 17:14:36 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -236,7 +236,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs, ...@@ -236,7 +236,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
Oid relid; Oid relid;
int nargs = length(fargs); int nargs = length(fargs);
Func *funcnode; Func *funcnode;
Oid oid_array[MAXFARGS]; Oid oid_array[FUNC_MAX_ARGS];
Oid *true_oid_array; Oid *true_oid_array;
Node *retval; Node *retval;
bool retset; bool retset;
...@@ -435,7 +435,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs, ...@@ -435,7 +435,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
* transform relation name arguments into varnodes of the appropriate * transform relation name arguments into varnodes of the appropriate
* form. * form.
*/ */
MemSet(oid_array, 0, MAXFARGS * sizeof(Oid)); MemSet(oid_array, 0, FUNC_MAX_ARGS * sizeof(Oid));
nargs = 0; nargs = 0;
foreach(i, fargs) foreach(i, fargs)
...@@ -496,12 +496,12 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs, ...@@ -496,12 +496,12 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
} }
/* Most of the rest of the parser just assumes that functions do not /* Most of the rest of the parser just assumes that functions do not
* have more than MAXFARGS parameters. We have to test here to protect * have more than FUNC_MAX_ARGS parameters. We have to test here to protect
* against array overruns, etc. * against array overruns, etc.
*/ */
if (nargs >= MAXFARGS) if (nargs >= FUNC_MAX_ARGS)
elog(ERROR, "Cannot pass more than %d arguments to a function", elog(ERROR, "Cannot pass more than %d arguments to a function",
MAXFARGS); FUNC_MAX_ARGS);
oid_array[nargs++] = toid; oid_array[nargs++] = toid;
} }
...@@ -710,8 +710,8 @@ func_get_candidates(char *funcname, int nargs) ...@@ -710,8 +710,8 @@ func_get_candidates(char *funcname, int nargs)
current_candidate = (CandidateList) current_candidate = (CandidateList)
palloc(sizeof(struct _CandidateList)); palloc(sizeof(struct _CandidateList));
current_candidate->args = (Oid *) current_candidate->args = (Oid *)
palloc(MAXFARGS * sizeof(Oid)); palloc(FUNC_MAX_ARGS * sizeof(Oid));
MemSet(current_candidate->args, 0, MAXFARGS * sizeof(Oid)); MemSet(current_candidate->args, 0, FUNC_MAX_ARGS * sizeof(Oid));
for (i = 0; i < nargs; i++) for (i = 0; i < nargs; i++)
current_candidate->args[i] = pgProcP->proargtypes[i]; current_candidate->args[i] = pgProcP->proargtypes[i];
...@@ -1067,9 +1067,9 @@ argtype_inherit(int nargs, Oid *oid_array) ...@@ -1067,9 +1067,9 @@ argtype_inherit(int nargs, Oid *oid_array)
{ {
Oid relid; Oid relid;
int i; int i;
InhPaths arginh[MAXFARGS]; InhPaths arginh[FUNC_MAX_ARGS];
for (i = 0; i < MAXFARGS; i++) for (i = 0; i < FUNC_MAX_ARGS; i++)
{ {
if (i < nargs) if (i < nargs)
{ {
...@@ -1203,7 +1203,7 @@ gen_cross_product(InhPaths *arginh, int nargs) ...@@ -1203,7 +1203,7 @@ gen_cross_product(InhPaths *arginh, int nargs)
Oid *oneres; Oid *oneres;
int i, int i,
j; j;
int cur[MAXFARGS]; int cur[FUNC_MAX_ARGS];
nanswers = 1; nanswers = 1;
for (i = 0; i < nargs; i++) for (i = 0; i < nargs; i++)
...@@ -1217,8 +1217,8 @@ gen_cross_product(InhPaths *arginh, int nargs) ...@@ -1217,8 +1217,8 @@ gen_cross_product(InhPaths *arginh, int nargs)
/* compute the cross product from right to left */ /* compute the cross product from right to left */
for (;;) for (;;)
{ {
oneres = (Oid *) palloc(MAXFARGS * sizeof(Oid)); oneres = (Oid *) palloc(FUNC_MAX_ARGS * sizeof(Oid));
MemSet(oneres, 0, MAXFARGS * sizeof(Oid)); MemSet(oneres, 0, FUNC_MAX_ARGS * sizeof(Oid));
for (i = nargs - 1; i >= 0 && cur[i] > arginh[i].nsupers; i--) for (i = nargs - 1; i >= 0 && cur[i] > arginh[i].nsupers; i--)
continue; continue;
...@@ -1508,7 +1508,7 @@ ParseComplexProjection(ParseState *pstate, ...@@ -1508,7 +1508,7 @@ ParseComplexProjection(ParseState *pstate,
void void
func_error(char *caller, char *funcname, int nargs, Oid *argtypes, char *msg) func_error(char *caller, char *funcname, int nargs, Oid *argtypes, char *msg)
{ {
char p[(NAMEDATALEN + 2) * MAXFMGRARGS], char p[(NAMEDATALEN + 2) * FUNC_MAX_ARGS],
*ptr; *ptr;
int i; int i;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.50 1999/12/10 07:37:35 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.51 2000/01/10 17:14:36 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -318,14 +318,14 @@ SizeTargetExpr(ParseState *pstate, ...@@ -318,14 +318,14 @@ SizeTargetExpr(ParseState *pstate,
int32 attrtypmod) int32 attrtypmod)
{ {
char *funcname; char *funcname;
Oid oid_array[MAXFARGS]; Oid oid_array[FUNC_MAX_ARGS];
HeapTuple ftup; HeapTuple ftup;
int i; int i;
funcname = typeidTypeName(attrtype); funcname = typeidTypeName(attrtype);
oid_array[0] = attrtype; oid_array[0] = attrtype;
oid_array[1] = INT4OID; oid_array[1] = INT4OID;
for (i = 2; i < MAXFARGS; i++) for (i = 2; i < FUNC_MAX_ARGS; i++)
oid_array[i] = InvalidOid; oid_array[i] = InvalidOid;
/* attempt to find with arguments exactly as specified... */ /* attempt to find with arguments exactly as specified... */
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.32 2000/01/10 16:13:13 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.33 2000/01/10 17:14:37 momjian Exp $
* *
* NOTES * NOTES
* This cruft is the server side of PQfn. * This cruft is the server side of PQfn.
...@@ -116,7 +116,7 @@ SendFunctionResult(Oid fid, /* function id */ ...@@ -116,7 +116,7 @@ SendFunctionResult(Oid fid, /* function id */
/* /*
* This structure saves enough state so that one can avoid having to * This structure saves enough state so that one can avoid having to
* do catalog lookups over and over again. (Each RPC can require up * do catalog lookups over and over again. (Each RPC can require up
* to MAXFMGRARGS+2 lookups, which is quite tedious.) * to FUNC_MAX_ARGS+2 lookups, which is quite tedious.)
* *
* The previous incarnation of this code just assumed that any argument * The previous incarnation of this code just assumed that any argument
* of size <= 4 was by value; this is not correct. There is no cheap * of size <= 4 was by value; this is not correct. There is no cheap
...@@ -127,8 +127,8 @@ struct fp_info ...@@ -127,8 +127,8 @@ struct fp_info
{ {
Oid funcid; Oid funcid;
int nargs; int nargs;
bool argbyval[MAXFMGRARGS]; bool argbyval[FUNC_MAX_ARGS];
int32 arglen[MAXFMGRARGS]; /* signed (for varlena) */ int32 arglen[FUNC_MAX_ARGS]; /* signed (for varlena) */
bool retbyval; bool retbyval;
int32 retlen; /* signed (for varlena) */ int32 retlen; /* signed (for varlena) */
TransactionId xid; TransactionId xid;
...@@ -278,7 +278,7 @@ HandleFunctionRequest() ...@@ -278,7 +278,7 @@ HandleFunctionRequest()
int argsize; int argsize;
int nargs; int nargs;
int tmp; int tmp;
char *arg[8]; char *arg[FUNC_MAX_ARGS];
char *retval; char *retval;
int i; int i;
uint32 palloced; uint32 palloced;
...@@ -317,7 +317,7 @@ HandleFunctionRequest() ...@@ -317,7 +317,7 @@ HandleFunctionRequest()
* need to remember, so that we pfree() it after the call. * need to remember, so that we pfree() it after the call.
*/ */
palloced = 0x0; palloced = 0x0;
for (i = 0; i < 8; ++i) for (i = 0; i < FUNC_MAX_ARGS; ++i)
{ {
if (i >= nargs) if (i >= nargs)
arg[i] = (char *) NULL; arg[i] = (char *) NULL;
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.48 2000/01/10 16:13:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.49 2000/01/10 17:14:38 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -238,7 +238,6 @@ oidvectortypes(Oid *oidArray) ...@@ -238,7 +238,6 @@ oidvectortypes(Oid *oidArray)
HeapTuple typetup; HeapTuple typetup;
text *result; text *result;
int num; int num;
Oid *sp;
if (oidArray == NULL) if (oidArray == NULL)
{ {
...@@ -247,16 +246,16 @@ oidvectortypes(Oid *oidArray) ...@@ -247,16 +246,16 @@ oidvectortypes(Oid *oidArray)
return result; return result;
} }
result = (text *) palloc(NAMEDATALEN * 8 + 8 + VARHDRSZ); result = (text *) palloc(NAMEDATALEN * FUNC_MAX_ARGS +
FUNC_MAX_ARGS + VARHDRSZ);
*VARDATA(result) = '\0'; *VARDATA(result) = '\0';
sp = oidArray; for (num = 0; num < FUNC_MAX_ARGS; num++)
for (num = 8; num != 0; num--, sp++)
{ {
if (*sp != InvalidOid) if (oidArray[num] != InvalidOid)
{ {
typetup = SearchSysCacheTuple(TYPEOID, typetup = SearchSysCacheTuple(TYPEOID,
ObjectIdGetDatum(*sp), ObjectIdGetDatum(oidArray[num]),
0, 0, 0); 0, 0, 0);
if (HeapTupleIsValid(typetup)) if (HeapTupleIsValid(typetup))
{ {
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.45 2000/01/09 00:26:20 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.46 2000/01/10 17:14:38 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -512,10 +512,10 @@ convert_to_scale(Datum value, Oid typid, ...@@ -512,10 +512,10 @@ convert_to_scale(Datum value, Oid typid,
/* See whether there is a registered type-conversion function, /* See whether there is a registered type-conversion function,
* namely a procedure named "float8" with the right signature. * namely a procedure named "float8" with the right signature.
*/ */
Oid oid_array[MAXFARGS]; Oid oid_array[FUNC_MAX_ARGS];
HeapTuple ftup; HeapTuple ftup;
MemSet(oid_array, 0, MAXFARGS * sizeof(Oid)); MemSet(oid_array, 0, FUNC_MAX_ARGS * sizeof(Oid));
oid_array[0] = typid; oid_array[0] = typid;
ftup = SearchSysCacheTuple(PROCNAME, ftup = SearchSysCacheTuple(PROCNAME,
PointerGetDatum("float8"), PointerGetDatum("float8"),
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.33 1999/11/22 17:56:33 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.34 2000/01/10 17:14:39 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -44,9 +44,9 @@ fmgr_pl(char *arg0,...) ...@@ -44,9 +44,9 @@ fmgr_pl(char *arg0,...)
values.data[0] = arg0; values.data[0] = arg0;
if (n_arguments > 1) if (n_arguments > 1)
{ {
if (n_arguments > MAXFMGRARGS) if (n_arguments > FUNC_MAX_ARGS)
elog(ERROR, "fmgr_pl: function %u: too many arguments (%d > %d)", elog(ERROR, "fmgr_pl: function %u: too many arguments (%d > %d)",
fmgr_pl_finfo->fn_oid, n_arguments, MAXFMGRARGS); fmgr_pl_finfo->fn_oid, n_arguments, FUNC_MAX_ARGS);
va_start(pvar, arg0); va_start(pvar, arg0);
for (i = 1; i < n_arguments; i++) for (i = 1; i < n_arguments; i++)
values.data[i] = va_arg(pvar, char *); values.data[i] = va_arg(pvar, char *);
...@@ -165,22 +165,93 @@ fmgr_c(FmgrInfo *finfo, ...@@ -165,22 +165,93 @@ fmgr_c(FmgrInfo *finfo,
values->data[6], values->data[7]); values->data[6], values->data[7]);
break; break;
case 9: case 9:
returnValue = (*user_fn) (values->data[0], values->data[1],
values->data[2], values->data[3],
values->data[4], values->data[5],
values->data[6], values->data[7],
values->data[8]);
break;
case 10:
returnValue = (*user_fn) (values->data[0], values->data[1],
values->data[2], values->data[3],
values->data[4], values->data[5],
values->data[6], values->data[7],
values->data[8], values->data[9]);
break;
case 11:
returnValue = (*user_fn) (values->data[0], values->data[1],
values->data[2], values->data[3],
values->data[4], values->data[5],
values->data[6], values->data[7],
values->data[8], values->data[9],
values->data[10]);
break;
case 12:
returnValue = (*user_fn) (values->data[0], values->data[1],
values->data[2], values->data[3],
values->data[4], values->data[5],
values->data[6], values->data[7],
values->data[8], values->data[9],
values->data[10], values->data[11]);
break;
case 13:
returnValue = (*user_fn) (values->data[0], values->data[1],
values->data[2], values->data[3],
values->data[4], values->data[5],
values->data[6], values->data[7],
values->data[8], values->data[9],
values->data[10], values->data[11],
values->data[12]);
break;
case 14:
returnValue = (*user_fn) (values->data[0], values->data[1],
values->data[2], values->data[3],
values->data[4], values->data[5],
values->data[6], values->data[7],
values->data[8], values->data[9],
values->data[10], values->data[11],
values->data[12], values->data[13]);
break;
case 15:
returnValue = (*user_fn) (values->data[0], values->data[1],
values->data[2], values->data[3],
values->data[4], values->data[5],
values->data[6], values->data[7],
values->data[8], values->data[9],
values->data[10], values->data[11],
values->data[12], values->data[13],
values->data[14]);
break;
case 16:
returnValue = (*user_fn) (values->data[0], values->data[1],
values->data[2], values->data[3],
values->data[4], values->data[5],
values->data[6], values->data[7],
values->data[8], values->data[9],
values->data[10], values->data[11],
values->data[12], values->data[13],
values->data[14], values->data[15]);
break;
case 17:
/* /*
* XXX Note that functions with >8 arguments can only be * XXX Note that functions with >FUNC_MAX_ARGS arguments can only be
* called from inside the system, not from the user level, * called from inside the system, not from the user level,
* since the catalogs only store 8 argument types for user * since the catalogs only store FUNC_MAX_ARGS argument types for user
* type-checking! * type-checking!
*/ */
returnValue = (*user_fn) (values->data[0], values->data[1], returnValue = (*user_fn) (values->data[0], values->data[1],
values->data[2], values->data[3], values->data[2], values->data[3],
values->data[4], values->data[5], values->data[4], values->data[5],
values->data[6], values->data[7], values->data[6], values->data[7],
values->data[8]); values->data[8], values->data[9],
values->data[10], values->data[11],
values->data[12], values->data[13],
values->data[14], values->data[15]);
break; break;
default: default:
elog(ERROR, "fmgr_c: function %u: too many arguments (%d > %d)", elog(ERROR, "fmgr_c: function %u: too many arguments (%d > %d)",
finfo->fn_oid, n_arguments, MAXFMGRARGS); finfo->fn_oid, n_arguments, FUNC_MAX_ARGS);
break; break;
} }
return returnValue; return returnValue;
...@@ -323,9 +394,9 @@ fmgr(Oid procedureId,...) ...@@ -323,9 +394,9 @@ fmgr(Oid procedureId,...)
fmgr_info(procedureId, &finfo); fmgr_info(procedureId, &finfo);
pronargs = finfo.fn_nargs; pronargs = finfo.fn_nargs;
if (pronargs > MAXFMGRARGS) if (pronargs > FUNC_MAX_ARGS)
elog(ERROR, "fmgr: function %u: too many arguments (%d > %d)", elog(ERROR, "fmgr: function %u: too many arguments (%d > %d)",
procedureId, pronargs, MAXFMGRARGS); procedureId, pronargs, FUNC_MAX_ARGS);
va_start(pvar, procedureId); va_start(pvar, procedureId);
for (i = 0; i < pronargs; ++i) for (i = 0; i < pronargs; ++i)
...@@ -364,10 +435,10 @@ fmgr_ptr(FmgrInfo *finfo,...) ...@@ -364,10 +435,10 @@ fmgr_ptr(FmgrInfo *finfo,...)
va_start(pvar, finfo); va_start(pvar, finfo);
n_arguments = va_arg(pvar, int); n_arguments = va_arg(pvar, int);
local_finfo->fn_nargs = n_arguments; local_finfo->fn_nargs = n_arguments;
if (n_arguments > MAXFMGRARGS) if (n_arguments > FUNC_MAX_ARGS)
{ {
elog(ERROR, "fmgr_ptr: function %u: too many arguments (%d > %d)", elog(ERROR, "fmgr_ptr: function %u: too many arguments (%d > %d)",
func_id, n_arguments, MAXFMGRARGS); func_id, n_arguments, FUNC_MAX_ARGS);
} }
for (i = 0; i < n_arguments; ++i) for (i = 0; i < n_arguments; ++i)
values.data[i] = va_arg(pvar, char *); values.data[i] = va_arg(pvar, char *);
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.130 2000/01/10 16:13:16 momjian Exp $ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.131 2000/01/10 17:14:40 momjian Exp $
* *
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
* *
...@@ -1069,7 +1069,7 @@ clearFuncInfo(FuncInfo *fun, int numFuncs) ...@@ -1069,7 +1069,7 @@ clearFuncInfo(FuncInfo *fun, int numFuncs)
free(fun[i].proname); free(fun[i].proname);
if (fun[i].usename) if (fun[i].usename)
free(fun[i].usename); free(fun[i].usename);
for (a = 0; a < 8; ++a) for (a = 0; a < FUNC_MAX_ARGS ; ++a)
if (fun[i].argtypes[a]) if (fun[i].argtypes[a])
free(fun[i].argtypes[a]); free(fun[i].argtypes[a]);
if (fun[i].prorettype) if (fun[i].prorettype)
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: pg_dump.h,v 1.43 1999/12/27 15:42:44 momjian Exp $ * $Id: pg_dump.h,v 1.44 2000/01/10 17:14:40 momjian Exp $
* *
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2 * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
* *
...@@ -61,7 +61,7 @@ typedef struct _funcInfo ...@@ -61,7 +61,7 @@ typedef struct _funcInfo
char *proowner; char *proowner;
int lang; int lang;
int nargs; int nargs;
char *argtypes[8]; /* should be derived from obj/fmgr.h char *argtypes[FUNC_MAX_ARGS]; /* should be derived from obj/fmgr.h
* instead of hardwired */ * instead of hardwired */
char *prorettype; char *prorettype;
int retset; /* 1 if the function returns a set, 0 int retset; /* 1 if the function returns a set, 0
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: funcindex.h,v 1.7 1999/02/13 23:20:50 momjian Exp $ * $Id: funcindex.h,v 1.8 2000/01/10 17:14:42 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
typedef struct typedef struct
{ {
int nargs; int nargs;
Oid arglist[8]; Oid arglist[FUNC_MAX_ARGS];
Oid procOid; Oid procOid;
NameData funcName; NameData funcName;
} FuncIndexInfo; } FuncIndexInfo;
......
...@@ -93,9 +93,11 @@ ...@@ -93,9 +93,11 @@
#define INDEXSCAN_PATCH #define INDEXSCAN_PATCH
/* /*
* Maximum number of columns in an index. * Maximum number of columns in an index and maximum number of args
* to a function. They must be the same value.
*/ */
#define INDEX_MAX_KEYS 8 #define INDEX_MAX_KEYS 8
#define FUNC_MAX_ARGS INDEX_MAX_KEYS
/* /*
* Enables debugging print statements in the date/time support routines. * Enables debugging print statements in the date/time support routines.
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: parse_func.h,v 1.20 1999/12/10 07:37:33 tgl Exp $ * $Id: parse_func.h,v 1.21 2000/01/10 17:14:43 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -15,9 +15,6 @@ ...@@ -15,9 +15,6 @@
#include "parser/parse_node.h" #include "parser/parse_node.h"
#define MAXFARGS 8 /* max # args to a c or postquel function */
/* /*
* This structure is used to explore the inheritance hierarchy above * This structure is used to explore the inheritance hierarchy above
* nodes in the type tree in order to disambiguate among polymorphic * nodes in the type tree in order to disambiguate among polymorphic
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: rel.h,v 1.30 1999/11/16 04:14:03 momjian Exp $ * $Id: rel.h,v 1.31 2000/01/10 17:14:44 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -51,7 +51,7 @@ typedef struct Trigger ...@@ -51,7 +51,7 @@ typedef struct Trigger
bool tgdeferrable; bool tgdeferrable;
bool tginitdeferred; bool tginitdeferred;
int16 tgnargs; int16 tgnargs;
int16 tgattr[8]; int16 tgattr[FUNC_MAX_ARGS];
char **tgargs; char **tgargs;
} Trigger; } Trigger;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* procedural language * procedural language
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.14 1999/12/20 01:41:32 tgl Exp $ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_comp.c,v 1.15 2000/01/10 17:14:45 momjian Exp $
* *
* This software is copyrighted by Jan Wieck - Hamburg. * This software is copyrighted by Jan Wieck - Hamburg.
* *
...@@ -114,7 +114,7 @@ plpgsql_compile(Oid fn_oid, int functype) ...@@ -114,7 +114,7 @@ plpgsql_compile(Oid fn_oid, int functype)
PLpgSQL_row *row; PLpgSQL_row *row;
PLpgSQL_rec *rec; PLpgSQL_rec *rec;
int i; int i;
int arg_varnos[MAXFMGRARGS]; int arg_varnos[FUNC_MAX_ARGS];
/* ---------- /* ----------
* Initialize the compiler * Initialize the compiler
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* procedural language * procedural language
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.4 1999/07/17 20:18:47 momjian Exp $ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/plpgsql.h,v 1.5 2000/01/10 17:14:45 momjian Exp $
* *
* This software is copyrighted by Jan Wieck - Hamburg. * This software is copyrighted by Jan Wieck - Hamburg.
* *
...@@ -377,7 +377,7 @@ typedef struct PLpgSQL_function ...@@ -377,7 +377,7 @@ typedef struct PLpgSQL_function
bool fn_retset; bool fn_retset;
int fn_nargs; int fn_nargs;
int fn_argvarnos[MAXFMGRARGS]; int fn_argvarnos[FUNC_MAX_ARGS];
int found_varno; int found_varno;
int new_varno; int new_varno;
int old_varno; int old_varno;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* procedural language (PL) * procedural language (PL)
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.16 2000/01/05 18:23:54 momjian Exp $ * $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.17 2000/01/10 17:14:46 momjian Exp $
* *
* This software is copyrighted by Jan Wieck - Hamburg. * This software is copyrighted by Jan Wieck - Hamburg.
* *
...@@ -67,10 +67,10 @@ typedef struct pltcl_proc_desc ...@@ -67,10 +67,10 @@ typedef struct pltcl_proc_desc
Oid result_in_elem; Oid result_in_elem;
int result_in_len; int result_in_len;
int nargs; int nargs;
FmgrInfo arg_out_func[MAXFMGRARGS]; FmgrInfo arg_out_func[FUNC_MAX_ARGS];
Oid arg_out_elem[MAXFMGRARGS]; Oid arg_out_elem[FUNC_MAX_ARGS];
int arg_out_len[MAXFMGRARGS]; int arg_out_len[FUNC_MAX_ARGS];
int arg_is_rel[MAXFMGRARGS]; int arg_is_rel[FUNC_MAX_ARGS];
} pltcl_proc_desc; } pltcl_proc_desc;
......
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