Re: Trigger to run @ connection time?

Поиск
Список
Период
Сортировка
От Andrej Ricnik-Bay
Тема Re: Trigger to run @ connection time?
Дата
Msg-id b35603930803111351s3bf605fer82f12246149ab57e@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Trigger to run @ connection time?  ("Kynn Jones" <kynnjo@gmail.com>)
Ответы Re: Trigger to run @ connection time?  ("Kynn Jones" <kynnjo@gmail.com>)
Список pgsql-general
On 12/03/2008, Kynn Jones <kynnjo@gmail.com> wrote:

> If one can set up this insert operation so that it happens automatically
> whenever a new connection is made, I'd like to learn how it's done.  But if
> not, then I don't see how performing the insert "manually" every time one
> connects would be any easier than simply executing the perl_setup()
> procedure directly.
After having thought about this for a few seconds <BEG> you
could conceivably use some OS/DB integration to achieve this.
Just make sure postmaster writes new connections to a log,
monitor that log from a script, and if it sees a "connect" have
that insert a value into "special table" of yours that then can
do the trigger you looked for?   Of course I may not have quite
understood how that  "this procedure adds useful definitions,
mostly subs, to Perl's main package.  This needs to be done
for each connection" is meant to work.


Cheers,
Andrej



--
Please don't top post, and don't use HTML e-Mail :}  Make your quotes concise.

http://www.american.edu/econ/notes/htmlmail.htm

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: How to convert postgres timestamp to date: yyyy-mm-dd
Следующее
От: sam
Дата:
Сообщение: Trouble with Savepoints in postgres