Re: SQL Functions and plan time - Mailing list pgsql-general

From Richard Huxton
Subject Re: SQL Functions and plan time
Date
Msg-id 200307082001.10558.dev@archonet.com
Whole thread Raw
In response to Re: SQL Functions and plan time  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Tuesday 08 Jul 2003 7:48 pm, Tom Lane wrote:
> Richard Huxton <dev@archonet.com> 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.)

Ah - I see. Fair enough

Thanks Tom.
--
  Richard Huxton

pgsql-general by date:

Previous
From: "Maksim Likharev"
Date:
Subject: Re: PG crash on simple query, story continues
Next
From: "Jay O'Connor"
Date:
Subject: Re: Transaction Blocks