Обсуждение: Is a table temporary

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

Is a table temporary

От
"Walker, Jed S"
Дата:

Is there a way to determine if a table is temporary. Currently I have a cursor that goes through pg_class for all tables and views owned by a particular owner, but I need to exclude temporary tables. How can I do this?

Thanks,

Jed

Re: Is a table temporary

От
Tom Lane
Дата:
"Walker, Jed S" <Jed_Walker@cable.comcast.com> writes:
> Is there a way to determine if a table is temporary.

Temporary tables live in schemas named pg_temp_NNN.

            regards, tom lane

Re: Is a table temporary

От
"Walker, Jed S"
Дата:
Thanks, that works great.

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Thursday, September 15, 2005 2:21 PM
To: Walker, Jed S
Cc: pgsql-novice@postgresql.org
Subject: Re: [NOVICE] Is a table temporary

"Walker, Jed S" <Jed_Walker@cable.comcast.com> writes:
> Is there a way to determine if a table is temporary.

Temporary tables live in schemas named pg_temp_NNN.

            regards, tom lane