Bruce Momjian <[EMAIL PROTECTED]> 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:

regression=# create temp table foo(f1 int);
regression=# select current_schemas(true);
(1 row)

regression=# select (current_schemas(true))[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];
(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.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?


Reply via email to