diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-11-12 17:04:46 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-11-12 17:06:58 -0300 |
commit | dcb7d3cafa3197c5425c129ba0dc5eddd23c0532 (patch) | |
tree | 9cba76bdf06895c94fc2f8e4528c8c7061af60ad /src/pl/tcl/pltcl.c | |
parent | 8c951687f58ad604be13e6addfd56446afb36e13 (diff) |
Have LookupFuncName accept NULL argtypes for 0 args
Prior to this change, it requires to be passed a valid pointer just to
be able to pass it to a zero-byte memcmp, per 0a52d378b03b. Given the
strange resulting code in callsites, it seems better to test for the
case specifically and remove the requirement.
Reported-by: Ranier Vilela
Discussion: https://postgr.es/m/MN2PR18MB2927F24692485D754794F01BE3740@MN2PR18MB2927.namprd18.prod.outlook.com
Discussion: https://postgr.es/m/MN2PR18MB2927F6873DF2774A505AC298E3740@MN2PR18MB2927.namprd18.prod.outlook.com
Diffstat (limited to 'src/pl/tcl/pltcl.c')
-rw-r--r-- | src/pl/tcl/pltcl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c index 73e12788fc0..e7640008fdc 100644 --- a/src/pl/tcl/pltcl.c +++ b/src/pl/tcl/pltcl.c @@ -592,7 +592,6 @@ call_pltcl_start_proc(Oid prolang, bool pltrusted) const char *gucname; ErrorContextCallback errcallback; List *namelist; - Oid fargtypes[1]; /* dummy */ Oid procOid; HeapTuple procTup; Form_pg_proc procStruct; @@ -616,7 +615,7 @@ call_pltcl_start_proc(Oid prolang, bool pltrusted) /* Parse possibly-qualified identifier and look up the function */ namelist = stringToQualifiedNameList(start_proc); - procOid = LookupFuncName(namelist, 0, fargtypes, false); + procOid = LookupFuncName(namelist, 0, NULL, false); /* Current user must have permission to call function */ aclresult = pg_proc_aclcheck(procOid, GetUserId(), ACL_EXECUTE); |