Re: How to get schema name in which TEMPORARY table is created?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to get schema name in which TEMPORARY table is created?
Дата
Msg-id 9914.1299598796@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to get schema name in which TEMPORARY table is created?  ("Gnanakumar" <gnanam@zoniac.com>)
Ответы Re: How to get schema name in which TEMPORARY table is created?  ("Gnanakumar" <gnanam@zoniac.com>)
Список pgsql-admin
"Gnanakumar" <gnanam@zoniac.com> writes:
> We're using PostgreSQL v8.2.3.

> How do I get the schema name in which TEMPORARY table is created using
> "CREATE TEMP TABLE mytable ...." syntax?

Do you need the real schema name, or will the "pg_temp" alias be
sufficient?

regression=# create temp table foo(f1 int);
CREATE TABLE
regression=# select * from pg_temp.foo;
 f1
----
(0 rows)

Note: I think that this might not work in 8.2.3 --- I seem to recall
that it was added as part of the CVE-2007-2138 fix, which appeared in
the 8.2.x series in 8.2.4.  However, there are many good reasons for
you to update to something later than 8.2.3 anyway.

            regards, tom lane

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

Предыдущее
От: Lukasz Brodziak
Дата:
Сообщение: Re: Unable to create function via psql
Следующее
От: "Gnanakumar"
Дата:
Сообщение: Re: How to get schema name in which TEMPORARY table is created?