Re: temporary views - Mailing list pgsql-sql

From Tomasz Myrta
Subject Re: temporary views
Date
Msg-id 3BBDCF24.BEF8BB64@lamer.pl
Whole thread Raw
In response to Re: temporary views  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: temporary views  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-sql
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 table i get
> > "Table xxx with oid xxx doesn't exist"
> 
> Just name your temporary table the same name in every session.  Why
> bother with a view.

Creating a view makes my life easier. My temporary table has fields 
like id1,id2,id3,id4 and view translates it using inner joins to
name1,name2,name3,name4. This temp table has always the same
name and I don't want to do the translation inside pl/pgsql function.

Tomek



pgsql-sql by date:

Previous
From: Esteban Gutierrez Abarzua
Date:
Subject: sql + C
Next
From: "Josh Berkus"
Date:
Subject: Re: SQL CONSTRAINTS - Constraining time values from two attributes on a table.