Re: sessions and prepared statements

From: John DeSoi <desoi(at)pgedit(dot)com>
To: chester c young <chestercyoung(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: sessions and prepared statements
Date: 2006-06-16 12:27:37
Message-ID: 4B156402-1B7D-46E2-8A4F-9DBD3F119CB7@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Jun 15, 2006, at 11:49 AM, chester c young wrote:

> in PHP for example, where there are multiple sessions and which you
> get is random:
>
> how do you know if the session you're in has prepared a particular
> statement?
>
> and/or how do you get a list of prepared statements?
>
> last, is there any after login trigger that one could use to
> prepare statements the session would need? or is this a dumb idea?

If you are using pooled connections, I don't think there is a
reasonable way you could managed prepared statements across requests.
You'll probably want to just prepare the ones you need for the
current request and discard them when the request ends.

I have a short article where you might find some useful information
for managing prepared statements:

http://pgedit.com/resource/php/pgfuncall

You might also post your question to PostgreSQL PHP list -- probably
more PHP expertise there.

Best,

John

John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Rod Taylor 2006-06-16 12:55:16 Re: sessions and prepared statements
Previous Message Richard Huxton 2006-06-16 06:28:16 Re: concurrency problem