On Tue, 2002-08-13 at 21:50, Hannu Krosing wrote: > On Tue, 2002-08-13 at 20:43, Tom Lane wrote: > > Bruce Momjian <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster