Re: a question for the way-back machine - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: a question for the way-back machine
Date
Msg-id 20061215100457.GA958@svana.org
Whole thread Raw
In response to Re: a question for the way-back machine  ("Gurjeet Singh" <singh.gurjeet@gmail.com>)
List pgsql-general
On Fri, Dec 15, 2006 at 02:29:48PM +0530, Gurjeet Singh wrote:
> Is it session level !!??? I think it is query level; don't we discard the
> plan after each query? AFAIK, only the plpgsql and other pl/ sisters cache
> the plan for the queries inside their code-blocks. I am under the impression
> that if a query is fired multiple times, it will be planned every time,
> unless we user PREPAREd stetements.

In the OP's case, he's talking about query fired from a trigger written
in pl/pgsql, so it's cached for the session. Normal queries sent by the
client are not cached ofcourse. In his example it's not the INSERT
that's being cached, it's a query in the trigger.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: could not write to log -> PANIC -> System down
Next
From: Henrik Zagerholm
Date:
Subject: Needed files - embedded postgres