pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Collin Peters <cadiolis@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Dynamic prepare possible in plpgsql?
Date: Thu, 03 May 2007 01:55:18 -0400
Message-ID: <27835.1178171718@sss.pgh.pa.us> (raw)
In-Reply-To: <df01c91b0705020853s6add0536i6eed538149ffb279@mail.gmail.com>
References: <df01c91b0704301658r71068bf1jea60b8f6d6c5769c@mail.gmail.com>
	<11208.1177980742@sss.pgh.pa.us>
	<df01c91b0705010952s4fb5fd5fpd9f4f61ff9673875@mail.gmail.com>
	<36e682920705011016u6af5810bv4fc3ad7feb0fbe8e@mail.gmail.com>
	<df01c91b0705020853s6add0536i6eed538149ffb279@mail.gmail.com>

"Collin Peters" <cadiolis@gmail.com> writes:
> So if I have an INSERT inside a LOOP in a plpgsql function, it is only
> prepared once?

Once per session, yes (barring some special cases like polymorphic
functions and trigger functions, which would get prepared once per
session per calling situation)

			regards, tom lane



view thread (7+ messages)  latest in thread

Message-ID: <27835.1178171718@sss.pgh.pa.us>
Permalink:  ../27835.1178171718@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/27835.1178171718@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, cadiolis@gmail.com
  Subject: Re: Dynamic prepare possible in plpgsql?
  In-Reply-To: <27835.1178171718@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox