Re: Temp rows - is it possible?

Поиск
Список
Период
Сортировка
От elein
Тема Re: Temp rows - is it possible?
Дата
Msg-id 20031108113837.D18014@cookie.varlena.com
обсуждение исходный текст
Ответ на Temp rows - is it possible?  (Boris Popov <boris@procedium.com>)
Список pgsql-general
What you really want is an end of session callback.
There is not one in PostgreSQL.  However, if this is
for session management, you can handle this in your
application by bracketing the connection code with
the table management.

That is, in your app (or rather in your session pooling
code) follow up each close with a DELETE of the rows
in question.  The only tricky part is deciding on the
key so that it is known both before and after the connection.

Does this make sense?

elein


On Fri, Nov 07, 2003 at 01:09:15PM -0800, 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?
>
> Thanks!
>
> --
> -Boris
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: int8 primary keys still not using index without manual
Следующее
От: Rajesh Kumar Mallah
Дата:
Сообщение: Problem in restoring data