Re: [GENERAL] plpgsql functions and the planner

2008-04-27 Thread Gregory Stark
"Matthew Dennis" <[EMAIL PROTECTED]> writes: > Do SQL statements inside of plpgsql functions get planned upon every > execution, only when the function is first executed/defined, or something > else entirely? First executed per session. > Now, when bar is executed again, will PG (8.3.1) know th

Re: [GENERAL] plpgsql functions and the planner

2008-04-27 Thread Douglas McNaught
On Sun, Apr 27, 2008 at 2:06 AM, Matthew Dennis <[EMAIL PROTECTED]> wrote: > Do SQL statements inside of plpgsql functions get planned upon every > execution, only when the function is first executed/defined, or something > else entirely? They are planned on first execution and the plan is cached