Skip to content

Commit 310578e

Browse files
committed
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.
1 parent dffad02 commit 310578e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/utils/fmgr/fmgr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.107 2007/07/13 02:25:48 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.108 2007/07/31 15:49:49 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -859,6 +859,7 @@ fmgr_security_definer(PG_FUNCTION_ARGS)
859859

860860
fmgr_info_cxt_security(fcinfo->flinfo->fn_oid, &fcache->flinfo,
861861
fcinfo->flinfo->fn_mcxt, true);
862+
fcache->flinfo.fn_expr = fcinfo->flinfo->fn_expr;
862863

863864
tuple = SearchSysCache(PROCOID,
864865
ObjectIdGetDatum(fcinfo->flinfo->fn_oid),

0 commit comments

Comments
 (0)