Re: CREATE TEMP TABLE

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Juris Krumins <juriskr(at)komin(dot)lv>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: CREATE TEMP TABLE
Date: 2004-03-26 17:42:43
Message-ID: 200403261742.i2QHghX12601@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


See the FAQ entry about temp tables in function. Use EXECUTE.

---------------------------------------------------------------------------

Juris Krumins wrote:
>
> Hi everybody. I have a problem with my PostgreSQL DBMS.
> In serverl log file I periodicly have errors like:
>
> 2004-03-24 11:43:18 ERROR: Relation "tmp_table1" does not exist
> 2004-03-24 11:43:18 ERROR: Relation "tmp_table1" does not exist
> 2004-03-24 11:43:18 ERROR: Relation 'tmp_table1' already exists
> 2004-03-24 11:43:18 ERROR: Relation "tmp_table1" does not exist
> 2004-03-24 11:43:18 ERROR: Relation "tmp_table1" does not exist
>
> I figure out that this is connected with query I use in one of the
> function:
>
> CREATE TEMP TABLE tmp_table1 AS SELECT bla-bla-bla.
>
> The problem is that when I had no so many users I have rigth now
> everything was ok, but now I have quite more users, so this problem
> appeared. Function , which use this query, is used all over my web site,
> which is base on PostgreSQL.
>
> So anybody have any idea how to correct this or maybe I have to change my
> query. Any help would be appreciated.
>
> I'm using PostgreSQL 7.3.4
>
> Thanks a lot.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2004-03-26 17:43:09 Re: prob with really simple insert
Previous Message Tom Lane 2004-03-26 17:23:46 Re: pg_dump is missing data