Hello Dennis, Friday, November 7, 2003, 1:29:32 PM, you wrote:
DG> Boris Popov wrote: >>Hello pgsql-general, >> >>I'm trying to implement a table with rows that are automatically >>deleted when the session that inserted them disconnects, sort of like >>our own alternative to pg_stat_activity. Is it possible and what >>approach should I be trying to achieve such a thing? >> DG> who do you want it visible to? If you don't want it visible to DG> anybody but the session you are writing them from, just don't DG> commit them and use the right kind of transaction that allows you DG> to see them from the session you are in. I do want them to be visible to everybody. This is a sessions pool, where sessions are inserted when our app connects and removed when it disconnects, however this would only work for graceful disconnects, which we all know isn't always the case. So I want a table that is somehow notified of a session disconnect and deletes rows created by that session. Any ideas? -- -Boris ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly