Re: Temp rows - is it possible? - Mailing list pgsql-general

From Bruce Momjian
Subject Re: Temp rows - is it possible?
Date
Msg-id 200311102151.hAALprE13511@candle.pha.pa.us
Whole thread Raw
In response to Re: Temp rows - is it possible?  (Boris Popov <boris@procedium.com>)
Responses Re: Temp rows - is it possible?  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
List pgsql-general
Boris Popov wrote:
> BM> In your requested setup, once your session exists, all the session rows
> BM> disappear for everyone --- that seems to be a strange application
> BM> requirement.
>
> Imagine a table containing miscellaneous information about connected
> clients. For instance I could have an app that does:
>
> insert into sessions (ip_addr,client_version)
>               values ('192.168.0.33','1.0.1');
>
> but lifetime of those rows has to correspond with lifetime of actual
> connections, as soon as client disconnects (pulls the network cable or
> crashes) that row should be cleaned up.
>
> I can do (listen "session:192.168.0.33:1.0.1";) and then just parse
> the relname from pg_listener to get the same effect, but you see why
> I'd like a different solution?

Yes, I can see that being useful --- but I doubt we are going to modify
the db system to enable behavior for this case unless we can do it in an
area that doesn't make the db less useful for more general purposes.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-general by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: SQL-question: returning the id of an insert querry
Next
From: Alvaro Herrera
Date:
Subject: Re: PL/Perl returning multiple rows