| From: | Tomasz Myrta <jasiek(at)lamer(dot)pl> |
|---|---|
| To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: temporary views |
| Date: | 2001-10-05 15:17:56 |
| Message-ID: | 3BBDCF24.BEF8BB64@lamer.pl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Haller Christoph | 2001-10-05 17:03:41 | Re: challenging query |
| Previous Message | Papp Gyozo | 2001-10-05 13:42:41 | Re: Need Help!! |