Connection/closedown triggers for backends?

From: "Richard Huxton" <dev(at)archonet(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Connection/closedown triggers for backends?
Date: 2001-03-03 17:07:45
Message-ID: 000f01c0a404$79057880$1001a8c0@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Does such a thing exist (I'm guessing not)

What I'd like is to be able to call a function when someone connects to a
database and another when they disconnect.

Obviously my application can call a function when it first connects, but
might not be able to do so on disconnect (e.g. user pulls plug)

Ideally there'd be a "pg_connections" table with a PID and a time and I
could add triggers to the insert and delete actions.

If there's no way of doing this internally, I've got ways to work around it
but they're not nearly as pleasant.

- Richard Huxton

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2001-03-03 17:44:27 Why is explain horribly optimistic for sorts?
Previous Message Bruce Richardson 2001-03-03 14:08:18 Re: can a trigger on insert -> update other tables?