How to view temp tables

Started by pcabout 18 years ago4 messagesgeneral
Jump to latest
#1pc
chavanpriya@gmail.com

My php code is creating temporary table named mytemp,but when I run a
selec * from mytemp I cannot see the table.How can I see the table
from postgresql command prompt?

#2Chris
dmagick@gmail.com
In reply to: pc (#1)
Re: How to view temp tables

pc wrote:

My php code is creating temporary table named mytemp,but when I run a
selec * from mytemp I cannot see the table.How can I see the table
from postgresql command prompt?

temp tables are automatically deleted when the connection is closed.

make it a non-temp table :)

--
Postgresql & php tutorials
http://www.designmagick.com/

#3Scott Marlowe
scott.marlowe@gmail.com
In reply to: pc (#1)
Re: How to view temp tables

On Wed, Feb 20, 2008 at 7:30 PM, pc <chavanpriya@gmail.com> wrote:

My php code is creating temporary table named mytemp,but when I run a
selec * from mytemp I cannot see the table.How can I see the table
from postgresql command prompt?

Got a code sample that shows this problem? I.e. create table
statement, php script that tries to hit it. Error codes are nice too.

#4Kevin Kempter
kevin@kevinkempterllc.com
In reply to: Chris (#2)
Re: How to view temp tables

On Thursday 21 February 2008 00:17:56 Chris wrote:

pc wrote:

My php code is creating temporary table named mytemp,but when I run a
selec * from mytemp I cannot see the table.How can I see the table
from postgresql command prompt?

temp tables are automatically deleted when the connection is closed.

make it a non-temp table :)

Temp tables are also limited in scope to the current session, so if your PHP
process created the temp table, then ONLY your PHP process can see the temp
table (and even then only until a dis-connect occurs)