Temporary table - Mailing list pgsql-general

From Juris Krumins
Subject Temporary table
Date
Msg-id 001f01c35d8f$046cc6d0$0201010a@ntbdc
Whole thread Raw
Responses Re: Temporary table
List 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.



pgsql-general by date:

Previous
From: nzanella@cs.mun.ca (Neil Zanella)
Date:
Subject: PostgreSQL and ACID properties support
Next
From: Bruno Wolff III
Date:
Subject: Re: PostgreSQL and ACID properties support