From: | "Collin Peters" <cadiolis(at)gmail(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Dynamic prepare possible in plpgsql? |
Date: | 2007-05-02 15:53:13 |
Message-ID: | df01c91b0705020853s6add0536i6eed538149ffb279@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
So if I have an INSERT inside a LOOP in a plpgsql function, it is only
prepared once?
Regards,
Collin
On 5/1/07, Jonah H. Harris <jonah(dot)harris(at)gmail(dot)com> wrote:
> 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/
>
From | Date | Subject | |
---|---|---|---|
Next Message | Collin Peters | 2007-05-02 19:17:08 | Possible to access value in RECORD without knowing column name? |
Previous Message | Richard Huxton | 2007-05-02 14:19:29 | Re: Fwd: Re[2]: We all are looped on Internet: request + transport = invariant |