From: | Hannu Krosing <hannu(at)tm(dot)ee> |
---|---|
To: | Hannu Krosing <hannu(at)tm(dot)ee> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Rod Taylor <rbt(at)zort(dot)ca>, Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Temporary Views |
Date: | 2002-08-13 20:10:51 |
Message-ID: | 1029269451.4742.71.camel@rh72.home.ee |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 2002-08-13 at 21:50, Hannu Krosing wrote:
> On Tue, 2002-08-13 at 20:43, Tom Lane wrote:
> > Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > > I can go either way on this.
> >
> > AFAICS "create temp view" would have some small advantage of keeping the
> > view's name out of possibly-public permanent namespaces, so the step of
> > just adding the TEMP option to CREATE VIEW may be worth doing. The
> > advantage isn't very big but neither is the amount of work.
>
> Actually I think that having the views on any temp table also temp is
> mandatory, or else these views will be broken in all other backends than
> the one that created them (or expose other backends temp tables and are
> thereby a security risk).
It seems to be a broken view not security risk in 7.2.1
backend 1:
hannu=# create temp table tmp_t1( i int);
CREATE
hannu=# create view tmp_v1 as select * from tmp_t1;
CREATE
hannu=# select * from tmp_v1;
i
---
(0 rows)
backend 2:
hannu=# select * from tmp_v1;
ERROR: Relation "tmp_t1" does not exist
hannu=# create temp table tmp_t1( i int);
CREATE
hannu=# select * from tmp_v1;
ERROR: Relation "tmp_t1" with OID 34281 no longer exists
----------------
Hannu
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2002-08-13 20:16:38 | Re: libpqxx |
Previous Message | Peter Eisentraut | 2002-08-13 19:53:43 | Re: [GENERAL] Linux Largefile Support In Postgresql RPMS |