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

From Tom Lane
Subject Re: SQL Functions and plan time
Date
Msg-id 22720.1057642794@sss.pgh.pa.us
Whole thread Raw
In response to SQL Functions and plan time  (Richard Huxton <dev@archonet.com>)
Responses Re: SQL Functions and plan time  (nolan@celery.tssi.com)
Re: SQL Functions and plan time  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Richard Huxton <dev@archonet.com> writes:
> Does the plan for the body get built at creation or execution time? I could
> have sworn it was execution time, but timings on one function suggest
> creation?

It's planned once per query.  There's been some talk of building a
cross-query plan cache for SQL functions, like plpgsql has, but
nothing done yet.

            regards, tom lane

pgsql-general by date:

Previous
From: "Maksim Likharev"
Date:
Subject: Re: PG crash on simple query, story continues
Next
From: nolan@celery.tssi.com
Date:
Subject: Re: SQL Functions and plan time