Re: Temp rows - is it possible?

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Boris Popov <boris(at)procedium(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Mattias Kregert <mattias(at)kregert(dot)se>, TANIDA Yutaka <tanida(at)sra(dot)co(dot)jp>, pgsql-general(at)postgresql(dot)org
Subject: Re: Temp rows - is it possible?
Date: 2003-11-10 21:51:53
Message-ID: 200311102151.hAALprE13511@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2003-11-10 21:52:32 Re: PL/Perl returning multiple rows
Previous Message Bruno Wolff III 2003-11-10 21:46:11 Re: SQL-question: returning the id of an insert querry