temp table problem

Поиск
Список
Период
Сортировка
От Abbas
Тема temp table problem
Дата
Msg-id 1216265799.5509.2.camel@abbas-laptop
обсуждение исходный текст
Ответы Re: temp table problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,
I have come across a problem. When you try to access a temp table
created via SPI_EXEC, you get a table not found error.
 SPI_EXEC("CREATE TEMP TABLE my_temp_table(first_name text, last_name
text)", UTILITY); SPI_EXEC("REVOKE ALL ON TABLE my_temp_table FROM PUBLIC", UTILITY);

The second statement generates a table not found error, although the
first statement was successful.

After initdb the system has no temp namespace to hold
temp objects and hence the search path does not contain 
any temp namespace either.
On first call to create a temp table the system first creates
a temp namespace. At this point the system calls recomputeNamespacePath
thinking that it would update search path and include the temp namespace
in it, but that does not happen beccause of override search path stack.
Hence subsquent calls to say insert into the temp table fail.

Any suggestions on how to tackle this problem?

Regards
Abbas
EnterpriseDB   http://www.enterprisedb.com




В списке pgsql-hackers по дате отправления:

Предыдущее
От: daveg
Дата:
Сообщение: Re: [PATCHES] pg_dump lock timeout
Следующее
От: Tom Lane
Дата:
Сообщение: autovacuum crash due to null pointer