Re: Temp rows - is it possible?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Temp rows - is it possible?
Дата
Msg-id 200311102151.hAALprE13511@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Temp rows - is it possible?  (Boris Popov <boris@procedium.com>)
Ответы Re: Temp rows - is it possible?  (Alvaro Herrera <alvherre@dcc.uchile.cl>)
Список 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 по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: SQL-question: returning the id of an insert querry
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: PL/Perl returning multiple rows