Re: Include tablespace information in psql \d footers

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Gavin Sherry <swm(at)linuxworld(dot)com(dot)au>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Include tablespace information in psql \d footers
Date: 2004-07-12 20:40:16
Message-ID: 200407122040.i6CKeGj02539@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Patch applied. Thanks.

I removed the display of tablespaces for sequences and toast tables:

test=> \d test
Table "public.test"
Column | Type | Modifiers
--------+---------+-----------
x | integer |

test=> \d test2
Table "public.test2"
Column | Type | Modifiers
--------+---------+-----------
x | integer |
Tablespace:
"tmp"

Why is the tablespace name printed on a separate line?

---------------------------------------------------------------------------

Gavin Sherry wrote:
> On Fri, 25 Jun 2004, Tom Lane wrote:
>
> > Gavin Sherry <swm(at)linuxworld(dot)com(dot)au> writes:
> > > Attached.
> >
> > Couple of problems with this:
> >
> > 1. Don't #ifndef WIN32 it. In the first place, we might have tablespace
> > support on Windows later, and in the second place, even if psql is
> > running on Windows that doesn't mean the server it's talking to is.
>
> Oops.
>
> >
> > 2. Printing "pg_default" when reltblspace is zero is wrong. Get the
> > database's default tablespace and print that. Or perhaps better,
> > don't print anything at all; that would avoid cluttering the display
> > for people who don't use tablespaces.
>
> Ahhh yes of course. Attached is a patch with docs which excludes reporting
> of the default tablespace.
>
> Gavin

Content-Description:

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
> joining column's datatypes do not match

--
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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-07-13 00:06:48 pgsql-server: Cause libpq and ecpg libraries to be built as proper
Previous Message Bruce Momjian 2004-07-12 20:23:31 Re: has_tablespace_privilege #2