Temporary table

From: "Juris Krumins" <juriskr(at)komin(dot)lv>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Temporary table
Date: 2003-08-08 09:25:28
Message-ID: 001f01c35d8f$046cc6d0$0201010a@ntbdc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

There is a query:
$sqlcmd = "CREATE TEMP TABLE tmp_table1 AS SELECT " .$p_distinct. " "
.$sql_columns. " FROM " .$sql_table ;
Next I have command:
$sqlcmd_tmp = $sqlcmd;
$tmp_res = pg_Exec( $conn, $sqlcmd_tmp );
Always it's ok, so it's execute without any problems. But sometimes I get
error like this :
Warning: pg_exec()[function.pg-exec]:Query failed:ERROR: cache lookup of
relation 149064743 failed.

A little bit further I have code like this :
$sqlcmd_count = "SELECT * FROM tmp_table1";
$tmp_count = pg_Exec( $conn, $sqlcmd_count );
So it's also working well, but as in previous example sometimes I'm getting
error like that:
Warning: pg_exec()[function.pg-exec]:Query failed: ERROR: Relation
"tmp_table1" does not exist.

So I'd like to know why it is so. Are there any config parameters, which are
responsible for creating temporaty tables and so on. And the other thing is
can't it be depend on max amount of clients server can support (or maybe
shared memory and so on).
Anyway thanks for answers.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dennis Björklund 2003-08-08 10:37:25 Re: problem with timeofday() function in cvs PostgreSQL
Previous Message Pavel Stehule 2003-08-08 09:19:50 problem with timeofday() function in cvs PostgreSQL