| 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 |
| Subject: | Re: Temp rows - is it possible? |
| Date: | 2003-11-10 01:41:39 |
| Message-ID: | 20031110103502.F5C0.TANIDA@sra.co.jp |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kenneth Gonsalves | 2003-11-10 02:17:58 | Re: Questions from a beginner! |
| Previous Message | William Harazim | 2003-11-10 01:32:28 | Tables spanning db's in cluster |