Skip site navigation (1) Skip section navigation (2)

Re: prepared statements & functions

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Andreas Kretschmer <akretschmer(at)spamfence(dot)net>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: prepared statements & functions
Date: 2011-12-05 17:52:23
Message-ID: CAHyXU0y6g6q4nm_mL-qpLr3WpaBpA+RbZQ0j6txJjYhC3=zi-g@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Mon, Dec 5, 2011 at 11:16 AM, Andreas Kretschmer
<akretschmer(at)spamfence(dot)net> wrote:
> Jean-Yves F. Barbier <12ukwn(at)gmail(dot)com> wrote:
>
>> On Sun, 4 Dec 2011 09:38:40 +0100
>> Andreas Kretschmer <akretschmer(at)spamfence(dot)net> wrote:
>>
>> > > AFAI understand prepared statements they can accelerate
>> > > repetitive queries very much - but is it possible to
>> > > prepare them from within a function (let say when the user
>> > > connects), and if so, will they be erased as soon as the
>> > > user disconnects?
>> >
>> > We haven't TRIGGERs for events like 'USER LOGGED IN' or so ...
>>
>> That was not my thinking; it was more like:
>> user connects
>> user calls the function
>> function creates prepared statements
>> user call other fun that uses these prepared statements
>
> Okay, i think, that should be possible.

also, prepared statements are deallocated automatically when the
connection drops.

merlin

In response to

pgsql-novice by date

Next:From: LukasDate: 2011-12-05 20:24:17
Subject: Setting bigger OS cache on Windows server
Previous:From: Andreas KretschmerDate: 2011-12-05 17:16:44
Subject: Re: prepared statements & functions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group