File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 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,
13971397 FuncCandidateList raw_candidates ;
13981398 FuncCandidateList best_candidate ;
13991399
1400- /* Passing NULL for argtypes is no longer allowed */
1401- Assert (argtypes );
1402-
14031400 /* initialize output arguments to silence compiler warnings */
14041401 * funcid = InvalidOid ;
14051402 * rettype = InvalidOid ;
@@ -1423,7 +1420,9 @@ func_get_detail(List *funcname,
14231420 best_candidate != NULL ;
14241421 best_candidate = best_candidate -> next )
14251422 {
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 )
14271426 break ;
14281427 }
14291428
Original file line number Diff line number Diff line change @@ -833,7 +833,6 @@ pg_get_triggerdef_worker(Oid trigid, bool pretty)
833833 char * tgname ;
834834 char * tgoldtable ;
835835 char * tgnewtable ;
836- Oid argtypes [1 ]; /* dummy */
837836 Datum value ;
838837 bool isnull ;
839838
@@ -1045,7 +1044,7 @@ pg_get_triggerdef_worker(Oid trigid, bool pretty)
10451044
10461045 appendStringInfo (& buf , "EXECUTE FUNCTION %s(" ,
10471046 generate_function_name (trigrec -> tgfoid , 0 ,
1048- NIL , argtypes ,
1047+ NIL , NULL ,
10491048 false, NULL , EXPR_KIND_NONE ));
10501049
10511050 if (trigrec -> tgnargs > 0 )
You can’t perform that action at this time.
0 commit comments