Re: Check the existance of temporary table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Check the existance of temporary table
Дата
Msg-id 8345.1174845383@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Check the existance of temporary table  ("dfx" <dfx@dfx.it>)
Ответы Re: Check the existance of temporary table  ("Dmitry Koterov" <dmitry@koterov.ru>)
Список pgsql-general
"dfx" <dfx@dfx.it> writes:
> how I can check  the existance of temporary table?
> I.e. wich query I have to use to know if MY_TEMP_TABLE exists?

As of 8.2 you can do

SELECT ... FROM pg_class
  WHERE relname = 'whatever' AND relnamespace = pg_my_temp_schema();

In earlier releases pg_my_temp_schema() isn't built in, so you have
to do some pushups to determine which schema is your temp schema.

            regards, tom lane

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

Предыдущее
От: "Webb Sprague"
Дата:
Сообщение: Re: Matrix (linear algebra) operations and types in PG?
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Matrix (linear algebra) operations and types in PG?