----- Original Message ----- From: "Mattias Kregert" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Darko Prenosil" <[EMAIL PROTECTED]> Sent: Friday, July 04, 2003 7:11 PM Subject: Re: [GENERAL] Q: Executing functions at connect/disconnect?
Is it possible to use pg_backend_pid() or pg_stat_activity in some way? I tried to put a rule on pg_stat_activity: create rule cleanup as on delete to pg_stat_activity do ... <cleanup code> ...but it does not work... i disconnected and the backend was removed from pg_stat_activity, but the rule did not execute... does anybody know why?? This is an interesting idea ! But unfortunately, I think that triggers and rules are not working on system objects. However, I'll try it myself. Regards ! ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org