Обсуждение: Cant find temp tables

Поиск
Список
Период
Сортировка

Cant find temp tables

От
sconeek@gmail.com
Дата:
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.


Re: Cant find temp tables

От
Chris
Дата:
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/

Re: Cant find temp tables

От
sconeek@gmail.com
Дата:
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.


Re: Cant find temp tables

От
"Dave Page"
Дата:

> -----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.

Re: Cant find temp tables

От
Mike Adams
Дата:
Dave Page wrote:
>
>
>> -----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
>

...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?

Вложения