Re: [GENERAL] Temporary tables and miscellaneous schemas
От | Bruce Momjian |
---|---|
Тема | Re: [GENERAL] Temporary tables and miscellaneous schemas |
Дата | |
Msg-id | 200312222201.hBMM1g012233@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [GENERAL] Temporary tables and miscellaneous schemas (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: [GENERAL] Temporary tables and miscellaneous schemas
|
Список | pgsql-patches |
Tom Lane wrote: > Bruce Momjian <pgman@candle.pha.pa.us> writes: > > Tom Lane wrote: > >> Why are you doing any of this? We had agreed to suppress all temp > >> schemas, period. The query should be simple. > > > I know some feel that showing any temporary schemas is wrong, but it > > seems that the local temp schema has valuable information. If I do \d > > pg_temp_1.*, I see all my temporary tables. I know we have a TODO to > > show all existing prepared statements, and giving people a way to see > > their temp tables seems important. > > We already have a way to find out your temp table schema name: > current_schemas. > > regression=# create temp table foo(f1 int); > CREATE TABLE > regression=# select current_schemas(true); > current_schemas > ------------------------------- > {pg_temp_1,pg_catalog,public} > (1 row) > > regression=# select (current_schemas(true))[1]; > current_schemas > ----------------- > pg_temp_1 > (1 row) > > regression=# select relname from pg_class c join pg_namespace n > regression-# on relnamespace = n.oid > regression-# where nspname = (current_schemas(true))[1]; > relname > --------- > foo > (1 row) > > > I don't think it's reasonable to complicate \dn so much in order to > provide an alternative way of learning your temp schema name. Is current_schemas(true))[1] always the temp schema name? That would clean things up nicely. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
В списке pgsql-patches по дате отправления: