]> granicus.if.org Git - postgresql/commitdiff
Fix security definer functions with polymorphic arguments. This case has
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 31 Jul 2007 15:50:17 +0000 (15:50 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 31 Jul 2007 15:50:17 +0000 (15:50 +0000)
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

index a22a0b27d557ed68228869ceddbcce6301c12bfa..2d5d8b381754e7ebfa8395c5b83dbeaabce033d8 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.76 2003/09/25 06:58:05 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.76.2.1 2007/07/31 15:50:17 tgl Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -663,6 +663,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),