Re: Trigger to run @ connection time?

From: "Dawid Kuroczko" <qnex42(at)gmail(dot)com>
To: "Marko Kreen" <markokr(at)gmail(dot)com>
Cc: "pgsql-general General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Trigger to run @ connection time?
Date: 2008-03-13 23:20:51
Message-ID: 758d5e7f0803131620u6175ec31gd46027c96de9dc03@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 13, 2008 at 2:18 PM, Marko Kreen <markokr(at)gmail(dot)com> wrote:
> On 3/13/08, Dawid Kuroczko <qnex42(at)gmail(dot)com> wrote:
> > An application which uses tsearch2 ('SELECT set_curdict() / set_curcfg()' being
> > called upon session start). That is fine and that works.
> >
> > Now, using statement pooling solution like pgbouncer is great benefit for this
> > specific application. There is one little problem however -- one can never be
> > sure when session is started. As a countermeasure there is a need to call
> > set_curdict() in every transaction (which is very fast), but one needs
> > to remember
> > to call that set_curdict() every time.
> >
> > ON CONNECT trigger would solve that neatly!
>
> Hm. It seems to make more sense to implement connect-time
> hook directly in pgbouncer.

Indeed that would solve the issue. But then again it could be argued that
PL/pgSQL could be implemented outside the backend as well. ;-)

I see it as an addition which does have its applications.

Regards,
Dawid

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrej Ricnik-Bay 2008-03-13 23:40:45 Re: postgre vs MySQL
Previous Message Andrej Ricnik-Bay 2008-03-13 23:19:06 Re: Dump format for long term archiving.