From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Merlin Moncure <mmoncure(at)gmail(dot)com> |
Cc: | "Gauthier, Dave" <dave(dot)gauthier(at)intel(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: init script or procedure |
Date: | 2011-08-24 14:51:08 |
Message-ID: | CAFj8pRCRD14emELEtLR=PrM_WoJsMix7QdZe1AyhMvZsKx7jFg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2011/8/24 Merlin Moncure <mmoncure(at)gmail(dot)com>:
> On Wed, Aug 24, 2011 at 9:30 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>> Hello
>>
>> 2011/8/24 Gauthier, Dave <dave(dot)gauthier(at)intel(dot)com>:
>>> Does PG support the use of an init script or procedure? I'm looking for
>>> something that'll run unconditionally every time someone makes a DB
>>> connection. This script will create a temp table and stuff some data in it
>>> for general use within that session.
>>>
>>
>> no, there is nothing similar. You have to call a own procedure after
>> login explicitly
>
> We could really use this. It's kinda sorta possible to script SQL on
> connection close via C hook through dblink but not on session startup.
> It's not always possible for the client know when a backend session is
> fired up -- for example in connection pools.
connection pooling is problem every time. This is not task for server,
but for connection pooling maintainer. Once we used a workaround - on
a start every function we tested if session is well initialized, and
if not, then we called a init function. But it has a problem with
pooling, so we changed to explicitly call a init function.
Regards
Pavel Stehule
>
> merlin
>
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2011-08-24 14:54:29 | Re: init script or procedure |
Previous Message | Merlin Moncure | 2011-08-24 14:50:27 | Re: strange exclusive lock in relation --- ideas |