Re: small psql patch - show Schema name for \dt \dv \dS - Mailing list pgsql-patches

From Tom Lane
Subject Re: small psql patch - show Schema name for \dt \dv \dS
Date
Msg-id 26849.1028261709@sss.pgh.pa.us
Whole thread Raw
In response to Re: small psql patch - show Schema name for \dt \dv \dS  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: small psql patch - show Schema name for \dt \dv \dS  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
>> Backend pid doesn't solve this issue, because the temp schema name for a
>> logged-in user is based on MyBackendId, not pid, i.e. your temp schema
>> name is something like pg_temp_1 when MyBackendId = 1, etc. It would be
>> easy enough to write a function exposing this, the question is whether
>> it is desirable to expose it?

I see no reason to do so at all.

What you want is not the BackendId; what you want is the temp schema
name, and current_schemas() can tell you that.

But so far I haven't seen any convincing argument why any client query
would really want to look at current_schemas(), either.  What you
actually want to know about is visibility, and computing that from
current_schemas() is quite an expensive proposition.  I think what
we need to expose is RelationIsVisible and friends, not BackendId.

            regards, tom lane

pgsql-patches by date:

Previous
From: "Christopher Kings-Lynne"
Date:
Subject: Re: New contrib: pg_reset_stats()
Next
From: greg@turnstep.com
Date:
Subject: Re: small psql patch - show Schema name for \dt \dv \dS