summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-07-31 15:50:01 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-07-31 15:50:01 +0000
commitbfe4f481460fc7d489f0adbe3eb63f2037ddab2a (patch)
tree82ca4061fb8bed951b1ffaec02b6b2befd4cbfaa /src
parentb25d3e4db09dd61fc3753853d2de49bf98ceaea2 (diff)
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 4d9aa23be5a..f380ad428d0 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.97.2.1 2005/11/22 18:23:23 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.97.2.2 2007/07/31 15:50:01 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -793,6 +793,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),