Re: Dynamic prepare possible in plpgsql?

From: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
To: "Collin Peters" <cadiolis(at)gmail(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Dynamic prepare possible in plpgsql?
Date: 2007-05-01 17:16:42
Message-ID: 36e682920705011016u6af5810bv4fc3ad7feb0fbe8e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 5/1/07, Collin Peters <cadiolis(at)gmail(dot)com> wrote:
> Is it faster to use PREPARE for the various INSERT statements inside a
> plpgsql function? Perhaps I am wrong and it does its PREPARE work
> when the function is parsed.

IIRC, PLpgSQL automagically prepares each statement behind the scenes
on the first use.

--
Jonah H. Harris, Software Architect | phone: 732.331.1324
EnterpriseDB Corporation | fax: 732.331.1301
33 Wood Ave S, 3rd Floor | jharris(at)enterprisedb(dot)com
Iselin, New Jersey 08830 | http://www.enterprisedb.com/

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Dmitry Turin 2007-05-02 05:05:00 Re: We all are looped on Internet: request + transport = invariant
Previous Message Collin Peters 2007-05-01 16:52:52 Re: Dynamic prepare possible in plpgsql?