Re: Execute a function upon a connection made/closed - Mailing list pgsql-general

From Uyelik
Subject Re: Execute a function upon a connection made/closed
Date
Msg-id 452F609D.8070306@yorukoglu.name.tr
Whole thread Raw
In response to Re: Execute a function upon a connection made/closed  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Responses Re: Execute a function upon a connection made/closed
List pgsql-general

A. Kretschmer wrote, On 13.10.2006 12:32:
am  Fri, dem 13.10.2006, um 12:25:38 +0300 mailte Uyelik folgendes: 
Hi,
Is there any way to execute a function upon a new connection made or existing
one closed?   
IIRC no, but you can set variables, perhaps this will help you.
ALTER name SET parameter { TO | = } { value | DEFAULT }
 
Do you mean; after a connection made by a client, client first set a variable? I need a server side solution?
 
Is active connections info stored on a table or (?) ?   
In a system-view, pg_stat_activity. You can select from there.
 
Yes, i can query this view, but i need to do some thing on database upon a new connection info added to this (view) or deleted. But this is a view and i cant add trigger? More deeply where is the connection info stored?

HTH, Andreas 
Thanks,
Mustafa

pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: Execute a function upon a connection made/closed
Next
From: Ron Johnson
Date:
Subject: Partitioning vs. View of a UNION ALL