Re: Q: Executing functions at connect/disconnect? - Mailing list pgsql-general

From Darko Prenosil
Subject Re: Q: Executing functions at connect/disconnect?
Date
Msg-id 002501c34192$1d5d4bb0$538abfd5@darko
Whole thread Raw
In response to Q: Executing functions at connect/disconnect?  ("Mattias Kregert" <mattias@kregert.se>)
Responses Re: Q: Executing functions at connect/disconnect?
List pgsql-general
----- Original Message -----
From: "Mattias Kregert" <mattias@kregert.se>
To: <pgsql-general@postgresql.org>
Cc: "Darko Prenosil" <darko.prenosil@finteh.hr>
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 !


pgsql-general by date:

Previous
From: "Darko Prenosil"
Date:
Subject: Re: Q: Executing functions at connect/disconnect?
Next
From: Bruno Wolff III
Date:
Subject: Re: Q: Executing functions at connect/disconnect?