From: | "Mattias Kregert" <mattias(at)kregert(dot)se> |
---|---|
To: | "TANIDA Yutaka" <tanida(at)sra(dot)co(dot)jp>, "Boris Popov" <boris(at)procedium(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Temp rows - is it possible? |
Date: | 2003-11-10 10:34:34 |
Message-ID: | 00d901c3a776$3c415540$09000a0a@kregert.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
This is great! I have been looking for this too... I think this should go in the manual as an example of how application sessions can be recorded in the db. Very useful!
/M
----- Original Message -----
From: "TANIDA Yutaka" <tanida(at)sra(dot)co(dot)jp>
To: "Boris Popov" <boris(at)procedium(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Sent: Monday, November 10, 2003 2:41 AM
Subject: Re: [GENERAL] Temp rows - is it possible?
> I found one way to do by combining temporary table and inhertis.
> Temporary table will automatically dropped when disconnects, and
> table can show inherited tables result, too.I assume SQL_Inheritance is
> on.
>
> Or you can use union too.
>
> ex.
>
> create table a(...);
> insert into a(...); # fixed values
>
> create table b() inherits (a);
> insert into b values(...); # temporary values
>
> select * from a; # You can get both global and temporary values.
>
>
>
> On Fri, 07 Nov 2003 13:09:15 -0800
> Boris Popov <boris(at)procedium(dot)com> 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
>
> --
> TANIDA Yutaka <tanida(at)sra(dot)co(dot)jp>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>
From | Date | Subject | |
---|---|---|---|
Next Message | Rajesh Kumar Mallah | 2003-11-10 10:49:00 | PL/PGSQL help for getting number of rows matched. |
Previous Message | Jean-Michel POURE | 2003-11-10 10:31:56 | Re: performance: time & disk access measurment |