|
Home > Archive > PostgreSQL Discussion > April 2006 > Cant find temp tables
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Cant find temp tables
|
|
| sconeek@gmail.com 2006-04-02, 8:26 pm |
| hi all,
i am struggling with temp tables. i have a statement like CREATE TEMP
TABLE test (a BIGINT);
it executes successfully, hence i know that the table has been created.
but i cant see the table within the DB using PGADMIN. if i do SELECT *
FROM test; it returns 0 records, but it still tells me that the table
exists with no data inside it. if i do a DROP TABLE test; it deletes
the table too. so everything is pointing to the fact that the table is
created, contains no data, but i cant see it. there is only one schema
(public) too.
can somebody please help me out.
thanks.
| |
|
| sconeek@gmail.com wrote:
> hi all,
> i am struggling with temp tables. i have a statement like CREATE TEMP
> TABLE test (a BIGINT);
> it executes successfully, hence i know that the table has been created.
> but i cant see the table within the DB using PGADMIN. if i do SELECT *
> FROM test; it returns 0 records, but it still tells me that the table
> exists with no data inside it. if i do a DROP TABLE test; it deletes
> the table too. so everything is pointing to the fact that the table is
> created, contains no data, but i cant see it. there is only one schema
> (public) too.
> can somebody please help me out.
Sounds like a bug in pgadmin.
Might be better asking that list though:
http://www.pgadmin.org/support/
--
Postgresql & php tutorials
http://www.designmagick.com/
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
| |
| sconeek@gmail.com 2006-04-02, 8:27 pm |
| could be. i will have a look at the pgadmin site and see if i can find
anything. but the pgadmin guys couldnt have missed this problem, seems
to be pretty important functionality. thanks.
| |
| Dave Page 2006-04-05, 3:27 am |
|
> -----Original Message-----
> From: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] On Behalf Of
> sconeek@gmail.com
> Sent: 03 April 2006 01:21
> To: pgsql-general@postgresql.org
> Subject: Re: [GENERAL] Cant find temp tables
>
> could be. i will have a look at the pgadmin site and see if i
> can find anything. but the pgadmin guys couldnt have missed
> this problem, seems to be pretty important functionality. thanks.
Hi, pgAdmin guy here!
There are a couple of issues to consider when trying to use temp tables
in pgAdmin:
1) They live in pg_temp_NN schemas, which by default are hidden. Turn on
Display -> System Objects to see them.
2) pgAdmin uses a separate connection for query tool windows. Because
temp tables exist only for the life of the session, if you close the
query tool (or whatever other session you created the table in), all the
pg_class/pg_attribute rows will be removed so pgAdmin won't see them no
matter how much you refresh the tree.
Regards, Dave.
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
| |
| Mike Adams 2006-04-06, 8:25 pm |
| Dave Page wrote:
>
>
>
....snip
>
> 2) pgAdmin uses a separate connection for query tool windows. Because
> temp tables exist only for the life of the session, if you close the
> query tool (or whatever other session you created the table in), all the
> pg_class/pg_attribute rows will be removed so pgAdmin won't see them no
> matter how much you refresh the tree.
>
Regarding item 2), is there a way to *disconnect* pgAdmin from a
database (ie drop the connection) thereby allowing you to modify
template1 for example, disconnect from template1 so another person can
initdb using template1 on another connection w/o you having to shutdown
pgAdmin?
|
|
|
|
|