Viatcheslav Kalinin <[EMAIL PROTECTED]> writes:
> Now we change SECURITY INVOKER clause to SECURITY DEFINER and voila:

>>> select * from array_to_set(array[1,2,3]);
> ERROR:  could not determine actual argument type for polymorphic 
> function "array_to_set"

Wow, apparently you're the first person ever to try that, because it's
never worked in any release since polymorphism was introduced :-(.
Thanks for the report!

The fix is pretty easy if you need it now:

Index: fmgr.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v
retrieving revision 1.102
diff -c -r1.102 fmgr.c
*** fmgr.c      4 Oct 2006 00:30:01 -0000       1.102
--- fmgr.c      31 Jul 2007 15:39:29 -0000
***************
*** 793,798 ****
--- 793,799 ----
  
                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),


                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to