1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Make number of args to a function configurable.

This commit is contained in:
Bruce Momjian
2000-01-10 17:14:46 +00:00
parent 6456b17bc1
commit 8a093d0ae3
30 changed files with 377 additions and 308 deletions

View File

@@ -8,7 +8,7 @@
*
*
* 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,
int nargs)
{
char *retval; /* XXX - should be datum, maybe ? */
char *arg[8];
char *arg[FUNC_MAX_ARGS];
int i;
/* ----------------
@@ -304,8 +304,8 @@ pqtest_PQfn(char *q)
v,
f,
offsets;
char *fields[8];
PQArgBlock pqargs[7];
char *fields[FUNC_MAX_ARGS];
PQArgBlock pqargs[FUNC_MAX_ARGS];
int res;
char *pqres;
@@ -313,7 +313,7 @@ pqtest_PQfn(char *q)
* 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 */
if (i == 0)
return -1;
@@ -331,7 +331,7 @@ pqtest_PQfn(char *q)
* build a PQArgBlock
* ----------------
*/
for (j = 1; j < i && j < 8; j++)
for (j = 1; j < i && j < FUNC_MAX_ARGS; j++)
{
k = j - 1;
v = atoi(fields[j]);