472,353 Members | 1,390 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Temporary table

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.

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?


Nov 11 '05 #1
1 1658
"Juris Krumins" <ju*****@komin.lv> writes:
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.

Hmm, that seems bad. Is the given relation number always the same? Is
there a row with that OID in pg_class? (Try "select * from pg_class
where oid = 149064743".)

What PG version is this?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Corrine | last post by:
Hi, I am creating a global temporary table that is session-specific. I insert a BLOB into this table, and then select the BLOB from this table...
by: Jim Garrison | last post by:
Scenario: 1) Create a GLOBAL TEMPORARY table and populate it with one (1) row. 2) Join that table to another with about 1 million rows. The...
by: Didier ROS | last post by:
Hi, I am a newbie I want to create a temporary table and I get the following error message : mysql> CREATE TEMPORARY TABLE tempemp AS SELECT *...
by: gonzal | last post by:
Hi Dose any body know why a temporary table gets deleted after querying it the first time (using SELECT INTO)? When I run the code bellow I'm...
by: randi_clausen | last post by:
Using SQL against a DB2 table the 'with' key word is used to dynamically create a temporary table with an SQL statement that is retained for the...
by: nedbollard | last post by:
Hi, Having checked out a declared (rather than created) temporary table successfully in SPUFI, I have hit a problem in running the same SQL in...
by: prasad | last post by:
I am getting sql error during binding a program which access a temporary table. The temporary table declaration and access methods are given below....
by: Larry | last post by:
Hi, I have unbelievable problems just to save a record! I make an input to a record in a subform, which has a temporary table as its...
by: Adam W. Saxton | last post by:
We have a few existing stored procedures which create a Global Temporary Table (##), do some work on the table and then delete the table. The...
by: Kburton | last post by:
All, I am trying to declare a cursor on global temporary table. I declared the global temporary table first and then the cursor but I got the...
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.