psql's "\d" and CLUSTER

Started by Igor Shevchenkoabout 22 years ago4 messagesgeneral
Jump to latest
#1Igor Shevchenko
igor@carcass.ath.cx

Hi,

Are there any plans on adding CLUSTER-related information to "\d tablename" ?

--
Best regards,
Igor Shevchenko

#2Bruce Momjian
bruce@momjian.us
In reply to: Igor Shevchenko (#1)
Re: psql's "\d" and CLUSTER

Igor Shevchenko wrote:

Hi,

Are there any plans on adding CLUSTER-related information to "\d tablename" ?

Is this a TODO?

-- 
  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
#3Bruce Momjian
bruce@momjian.us
In reply to: Igor Shevchenko (#1)
Re: [GENERAL] psql's "\d" and CLUSTER

Igor Shevchenko wrote:

Hi,

Are there any plans on adding CLUSTER-related information to "\d tablename" ?

The attached patch displays cluster information for \d "table" and \di
"index":

test=> \d test2
Table "public.test2"
Column | Type | Modifiers
--------+---------+-----------
y | integer | not null
Indexes:
"test2_pkey" PRIMARY KEY, btree (y) CLUSTER

test=> \d test2_pkey
Index "public.test2_pkey"
Column | Type
--------+---------
y | integer
PRIMARY KEY, btree, for table "public.test2", CLUSTER

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

Attachments:

/pgpatches/clustertext/plainDownload+19-14
#4Bruce Momjian
bruce@momjian.us
In reply to: Igor Shevchenko (#1)
Re: psql's "\d" and CLUSTER

Igor Shevchenko wrote:

Hi,

Are there any plans on adding CLUSTER-related information to "\d tablename" ?

This will be in the 7.5 release:

test=> create table test (x int);
CREATE TABLE
test=> create index i on test(x);
CREATE INDEX
test=> cluster i on test;
CLUSTER
test=> \d test
Table "public.test"
Column | Type | Modifiers
--------+---------+-----------
x | integer |
Indexes:
"i" btree (x) CLUSTER

test=> \d i
Index "public.i"
Column | Type
--------+---------
x | integer
btree, for table "public.test", CLUSTER

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