Re: [GENERAL] Temporary tables and miscellaneous schemas

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sean Chittenden <sean(at)chittenden(dot)org>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, btober(at)seaworthysys(dot)com
Subject: Re: [GENERAL] Temporary tables and miscellaneous schemas
Date: 2003-12-23 04:05:10
Message-ID: 200312230405.hBN45A125728@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > Is current_schemas(true))[1] always the temp schema name?
>
> If you have a temp schema; otherwise it'll be whatever is the front of
> your search path.
>
> > That would clean things up nicely.
>
> If you're intent on doing this in \dn, something like
>
> ... AND (nspname not like 'pg\\_temp%'
> OR nspname = (current_schemas(true))[1]) ...
>
> would probably work well enough.

Yep, works fine. Patch attached. I wasn't so worried about telling
people the name of their temporary schema as I was giving them a
complete, reasonable \dn output.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 2.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-12-23 04:28:01 Re: [GENERAL] Temporary tables and miscellaneous schemas
Previous Message Tom Lane 2003-12-22 22:46:38 Re: [COMMITTERS] pgsql-server/doc/src/sgml Tag: REL7_4_STABLE r ...

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-12-23 04:28:01 Re: [GENERAL] Temporary tables and miscellaneous schemas
Previous Message Bruce Momjian 2003-12-23 03:51:41 spinlock configure control