aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-07-31 15:49:49 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-07-31 15:49:49 +0000
commit310578efee210f891c5952cfdbae7c17a4bcadba (patch)
tree71df17d69fa8edc726b0d4eddda43c142e24c0fe /src
parentdffad0285672af8a65a6d8d6b01d6870435e40e4 (diff)
downloadpostgresql-310578efee210f891c5952cfdbae7c17a4bcadba.tar.gz
postgresql-310578efee210f891c5952cfdbae7c17a4bcadba.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/utils/fmgr/fmgr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c
index 360cd5555da..4294e10f5db 100644
--- a/src/backend/utils/fmgr/fmgr.c
+++ b/src/backend/utils/fmgr/fmgr.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.107 2007/07/13 02:25:48 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.108 2007/07/31 15:49:49 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -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),