File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1397,9 +1397,6 @@ func_get_detail(List *funcname,
1397
1397
FuncCandidateList raw_candidates ;
1398
1398
FuncCandidateList best_candidate ;
1399
1399
1400
- /* Passing NULL for argtypes is no longer allowed */
1401
- Assert (argtypes );
1402
-
1403
1400
/* initialize output arguments to silence compiler warnings */
1404
1401
* funcid = InvalidOid ;
1405
1402
* rettype = InvalidOid ;
@@ -1423,7 +1420,9 @@ func_get_detail(List *funcname,
1423
1420
best_candidate != NULL ;
1424
1421
best_candidate = best_candidate -> next )
1425
1422
{
1426
- if (memcmp (argtypes , best_candidate -> args , nargs * sizeof (Oid )) == 0 )
1423
+ /* if nargs==0, argtypes can be null; don't pass that to memcmp */
1424
+ if (nargs == 0 ||
1425
+ memcmp (argtypes , best_candidate -> args , nargs * sizeof (Oid )) == 0 )
1427
1426
break ;
1428
1427
}
1429
1428
Original file line number Diff line number Diff line change @@ -833,7 +833,6 @@ pg_get_triggerdef_worker(Oid trigid, bool pretty)
833
833
char * tgname ;
834
834
char * tgoldtable ;
835
835
char * tgnewtable ;
836
- Oid argtypes [1 ]; /* dummy */
837
836
Datum value ;
838
837
bool isnull ;
839
838
@@ -1045,7 +1044,7 @@ pg_get_triggerdef_worker(Oid trigid, bool pretty)
1045
1044
1046
1045
appendStringInfo (& buf , "EXECUTE FUNCTION %s(" ,
1047
1046
generate_function_name (trigrec -> tgfoid , 0 ,
1048
- NIL , argtypes ,
1047
+ NIL , NULL ,
1049
1048
false, NULL , EXPR_KIND_NONE ));
1050
1049
1051
1050
if (trigrec -> tgnargs > 0 )
You can’t perform that action at this time.
0 commit comments