mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Make pg_dump independent of FUNC_MAX_ARGS.
This commit is contained in:
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.250 2002/04/19 23:13:54 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.251 2002/04/21 05:21:17 petere Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -1636,9 +1636,13 @@ 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 < FUNC_MAX_ARGS; ++a)
|
if (fun[i].argtypes)
|
||||||
if (fun[i].argtypes[a])
|
{
|
||||||
free(fun[i].argtypes[a]);
|
for (a = 0; a < fun[i].nargs; ++a)
|
||||||
|
if (fun[i].argtypes[a])
|
||||||
|
free(fun[i].argtypes[a]);
|
||||||
|
free(fun[i].argtypes);
|
||||||
|
}
|
||||||
if (fun[i].prorettype)
|
if (fun[i].prorettype)
|
||||||
free(fun[i].prorettype);
|
free(fun[i].prorettype);
|
||||||
if (fun[i].prosrc)
|
if (fun[i].prosrc)
|
||||||
@ -2066,12 +2070,7 @@ getFuncs(int *numFuncs)
|
|||||||
write_msg(NULL, "WARNING: owner of function \"%s\" appears to be invalid\n",
|
write_msg(NULL, "WARNING: owner of function \"%s\" appears to be invalid\n",
|
||||||
finfo[i].proname);
|
finfo[i].proname);
|
||||||
|
|
||||||
if (finfo[i].nargs < 0 || finfo[i].nargs > FUNC_MAX_ARGS)
|
finfo[i].argtypes = malloc(finfo[i].nargs * sizeof(finfo[i].argtypes[0]));
|
||||||
{
|
|
||||||
write_msg(NULL, "failed sanity check: function %s has more than %d (namely %d) arguments\n",
|
|
||||||
finfo[i].proname, FUNC_MAX_ARGS, finfo[i].nargs);
|
|
||||||
exit_nicely();
|
|
||||||
}
|
|
||||||
parseNumericArray(PQgetvalue(res, i, i_proargtypes),
|
parseNumericArray(PQgetvalue(res, i, i_proargtypes),
|
||||||
finfo[i].argtypes,
|
finfo[i].argtypes,
|
||||||
finfo[i].nargs);
|
finfo[i].nargs);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pg_dump.h,v 1.81 2002/04/11 20:00:08 tgl Exp $
|
* $Id: pg_dump.h,v 1.82 2002/04/21 05:21:18 petere 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
|
||||||
*
|
*
|
||||||
@ -66,7 +66,7 @@ typedef struct _funcInfo
|
|||||||
char *proowner;
|
char *proowner;
|
||||||
Oid lang;
|
Oid lang;
|
||||||
int nargs;
|
int nargs;
|
||||||
char *argtypes[FUNC_MAX_ARGS];
|
char **argtypes;
|
||||||
char *prorettype;
|
char *prorettype;
|
||||||
int retset; /* 1 if the function returns a set, else 0 */
|
int retset; /* 1 if the function returns a set, else 0 */
|
||||||
char *prosrc;
|
char *prosrc;
|
||||||
|
Reference in New Issue
Block a user