From d5fd41b09e991651a1a0e5de9e36ce634583d4c0 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 31 Jul 2007 15:50:17 +0000 Subject: [PATCH] Fix security definer functions with polymorphic arguments. This case has never worked because fmgr_security_definer() neglected to pass the fn_expr information through. Per report from Viatcheslav Kalinin. --- src/backend/utils/fmgr/fmgr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c index 14956301ab..5d8afc34f4 100644 --- a/src/backend/utils/fmgr/fmgr.c +++ b/src/backend/utils/fmgr/fmgr.c @@ -859,6 +859,7 @@ fmgr_security_definer(PG_FUNCTION_ARGS) fmgr_info_cxt_security(fcinfo->flinfo->fn_oid, &fcache->flinfo, fcinfo->flinfo->fn_mcxt, true); + fcache->flinfo.fn_expr = fcinfo->flinfo->fn_expr; tuple = SearchSysCache(PROCOID, ObjectIdGetDatum(fcinfo->flinfo->fn_oid), -- 2.39.5