Richard Huxton <[EMAIL PROTECTED]> writes:
> Can I ask why, since the plan is constructed at query-time the parameters 
> aren't substitued *before* planning?

Because then the plan couldn't be re-used.  A SQL function may be
executed many times in a query, so the plan has to be reusable.
(Or, if you prefer, we have query-level caching of SQL function plans.)

                        regards, tom lane

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

Reply via email to