Search Postgresql Archives

Re: Trigger to run @ connection time?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/03/2008, Kynn Jones <kynnjo@xxxxxxxxx> 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

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux