[SQL] Temporary Views or tables

2006-08-28 Thread Sumeet
Hi all,I'm trying to use temporary views in my application, before i proceed and go ahead for creating the temorary view i would like more abt it.1) when is the temporary view automatically deleted. Is it after we close the connection or when the session endsfor.e.g  my website doesnt   use a p

Re: [SQL] temporary views

2001-10-08 Thread Bruce Momjian
> Bruce Momjian wrote: > > > > We can handle the temp views thing two ways, either allow views to map > > to temp tables by name, or allow temp views to map to temp tables that > > exist at creation time and drop the views on session exit. The original > > poster clearly wanted the first behavio

Re: [SQL] temporary views

2001-10-08 Thread Tomasz Myrta
Bruce Momjian wrote: > > We can handle the temp views thing two ways, either allow views to map > to temp tables by name, or allow temp views to map to temp tables that > exist at creation time and drop the views on session exit. The original > poster clearly wanted the first behavior, but I agr

Re: [SQL] temporary views

2001-10-07 Thread Bruce Momjian
> Peter Eisentraut <[EMAIL PROTECTED]> writes: > > Bruce Momjian writes: > >> * Allow views on temporary tables to behave as temporary views > > > I don't think this is a good idea. Especially since our temp tables are > > allowed to shadow persistent tables, it would not be obvious whether the

Re: [SQL] temporary views

2001-10-07 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Bruce Momjian writes: >> * Allow views on temporary tables to behave as temporary views > I don't think this is a good idea. Especially since our temp tables are > allowed to shadow persistent tables, it would not be obvious whether the > view you'r

Re: [SQL] temporary views

2001-10-07 Thread Peter Eisentraut
Bruce Momjian writes: > Seems like a TODO item, at least. What we could do is to create views > as TEMP if they use temp tables and drop the view as soon as the session > ends . You of course would have to recreate the view each time but > because it is a _temp_ view, it could be done reliably

Re: [SQL] temporary views

2001-10-05 Thread Alex Pilosov
On Fri, 5 Oct 2001, Bruce Momjian wrote: > > What actually should happen is that the view should go away at the end > of the session. However, unlike indexes, we can have several tables > involved in a view so it is hard to know exactly how to handle this. > > Seems like a TODO item, at least.

Re: [SQL] temporary views

2001-10-05 Thread Bruce Momjian
> Bruce Momjian wrote: > > > > > Hi > > > I have simple question: How to create view on a temporary table? > > > I need this, because pl/pgsql function returns data via temporary table. > > > > > > View created on a temporary table is useful only to the end of session. > > > Next time i create th

Re: [SQL] temporary views

2001-10-05 Thread Tomasz Myrta
Bruce Momjian wrote: > > > Hi > > I have simple question: How to create view on a temporary table? > > I need this, because pl/pgsql function returns data via temporary table. > > > > View created on a temporary table is useful only to the end of session. > > Next time i create the same temp tabl

Re: [SQL] temporary views

2001-10-04 Thread Bruce Momjian
> Hi > I have simple question: How to create view on a temporary table? > I need this, because pl/pgsql function returns data via temporary table. > > View created on a temporary table is useful only to the end of session. > Next time i create the same temp table i get > "Table xxx with oid xxx

[SQL] temporary views

2001-10-04 Thread Tomasz Myrta
Hi I have simple question: How to create view on a temporary table? I need this, because pl/pgsql function returns data via temporary table. View created on a temporary table is useful only to the end of session. Next time i create the same temp table i get "Table xxx with oid xxx doesn't exist