index 9d9efc2cc247aebea93b7f56d6e2f9cddb5dd59d..d9c6dc1901858bfccfe07e07a920c1a8df55afc0 100644 (file)
FuncCandidateList raw_candidates;
FuncCandidateList best_candidate;
- /* Passing NULL for argtypes is no longer allowed */
- Assert(argtypes);
-
/* initialize output arguments to silence compiler warnings */
*funcid = InvalidOid;
*rettype = InvalidOid;
best_candidate != NULL;
best_candidate = best_candidate->next)
{
- if (memcmp(argtypes, best_candidate->args, nargs * sizeof(Oid)) == 0)
+ /* if nargs==0, argtypes can be null; don't pass that to memcmp */
+ if (nargs == 0 ||
+ memcmp(argtypes, best_candidate->args, nargs * sizeof(Oid)) == 0)
break;
}
index c1de869c5216801d8bbb400db53e35084e634d7d..4c83cae5e922b53d2f059f5878f64a0a7797a1d8 100644 (file)
@@ -833,7 +833,6 @@ pg_get_triggerdef_worker(Oid trigid, bool pretty)
char *tgname;
char *tgoldtable;
char *tgnewtable;
- Oid argtypes[1]; /* dummy */
Datum value;
bool isnull;
@@ -1045,7 +1044,7 @@ pg_get_triggerdef_worker(Oid trigid, bool pretty)
appendStringInfo(&buf, "EXECUTE FUNCTION %s(",
generate_function_name(trigrec->tgfoid, 0,
- NIL, argtypes,
+ NIL, NULL,
false, NULL, EXPR_KIND_NONE));
if (trigrec->tgnargs > 0)