postgres.git / summary / log / commit / refs
commit 5bd7b8342685a7d6d5ab134b321f8e4ccfdeaa16
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Tue Jul 31 15:49:54 2007 +0000
First released in: 8.3.0, 7.4.18, 8.0.14, 8.1.10, 8.2.5
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 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c
index df4594b4358..e493aba7877 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.102 2006/10/04 00:30:01 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/fmgr/fmgr.c,v 1.102.2.1 2007/07/31 15:49:54 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),
[parent: eda73a5df91d]