File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 22
22
*
23
23
*
24
24
* IDENTIFICATION
25
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.250 2002/04/19 23:13:54 tgl Exp $
25
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.251 2002/04/21 05:21:17 petere Exp $
26
26
*
27
27
*-------------------------------------------------------------------------
28
28
*/
@@ -1636,9 +1636,13 @@ clearFuncInfo(FuncInfo *fun, int numFuncs)
1636
1636
free (fun [i ].proname );
1637
1637
if (fun [i ].usename )
1638
1638
free (fun [i ].usename );
1639
- for (a = 0 ; a < FUNC_MAX_ARGS ; ++ a )
1640
- if (fun [i ].argtypes [a ])
1641
- free (fun [i ].argtypes [a ]);
1639
+ if (fun [i ].argtypes )
1640
+ {
1641
+ for (a = 0 ; a < fun [i ].nargs ; ++ a )
1642
+ if (fun [i ].argtypes [a ])
1643
+ free (fun [i ].argtypes [a ]);
1644
+ free (fun [i ].argtypes );
1645
+ }
1642
1646
if (fun [i ].prorettype )
1643
1647
free (fun [i ].prorettype );
1644
1648
if (fun [i ].prosrc )
@@ -2066,12 +2070,7 @@ getFuncs(int *numFuncs)
2066
2070
write_msg (NULL , "WARNING: owner of function \"%s\" appears to be invalid\n" ,
2067
2071
finfo [i ].proname );
2068
2072
2069
- if (finfo [i ].nargs < 0 || finfo [i ].nargs > FUNC_MAX_ARGS )
2070
- {
2071
- write_msg (NULL , "failed sanity check: function %s has more than %d (namely %d) arguments\n" ,
2072
- finfo [i ].proname , FUNC_MAX_ARGS , finfo [i ].nargs );
2073
- exit_nicely ();
2074
- }
2073
+ finfo [i ].argtypes = malloc (finfo [i ].nargs * sizeof (finfo [i ].argtypes [0 ]));
2075
2074
parseNumericArray (PQgetvalue (res , i , i_proargtypes ),
2076
2075
finfo [i ].argtypes ,
2077
2076
finfo [i ].nargs );
Original file line number Diff line number Diff line change 6
6
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
7
7
* Portions Copyright (c) 1994, Regents of the University of California
8
8
*
9
- * $Id: pg_dump.h,v 1.81 2002/04/11 20:00:08 tgl Exp $
9
+ * $Id: pg_dump.h,v 1.82 2002/04/21 05:21:18 petere Exp $
10
10
*
11
11
* Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
12
12
*
@@ -66,7 +66,7 @@ typedef struct _funcInfo
66
66
char * proowner ;
67
67
Oid lang ;
68
68
int nargs ;
69
- char * argtypes [ FUNC_MAX_ARGS ] ;
69
+ char * * argtypes ;
70
70
char * prorettype ;
71
71
int retset ; /* 1 if the function returns a set, else 0 */
72
72
char * prosrc ;
You can’t perform that action at this time.
0 commit comments