-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> It should be at the front of the line for 7.3 though.
No problem, it's already aimed at 7.3 in my mind. We need to
get 7.2 out the door already! :)
> 1. \di probably should be extended as well. I haven't got any fixed
> opinions about what its output should look like, but surely \di index
> should convey at least as much info as \d parent provides. Right now
> I don't believe it knows much about functional or partial indexes.
I'm working on these. (mostly done actually). I'm also trying to
add support for viewing temporary relations (e.g. tables and
indexes) and promise to put in some doc patches when evreything
is done.
I'm also adding a "table" display to the index viewing, for the
benefit of those people who don't give their indexes (I still
want to type "indices" sometime....) good, meaningful names
(er...like I was guilty of in my previous example).
Sample output:
bakery=# \di carrot
Index "carrot"
Column | Type
- ----------+-----------------------
dressing | character varying(20)
btree for table "salad"
bakery=# \di
List of relations
Name | Type | Owner | Table
- ------------+-------+----------+-------
apple | index | postgres | pizza
banana | index | postgres | pizza
carrot | index | postgres | salad
peach | index | postgres | pizza
pizza_pkey | index | postgres | pizza
watermelon | index | postgres | pizza
By the way, that "Index predicate" at the end of \di output
is pretty ugly IMO. What is the purpose of it? I'm not going to
document *that* one. ;)
bakery=# \di apple
Index "apple"
Column | Type
- ---------+---------
topping | integer
hash for table "pizza" WHERE (topping > 99)
Index predicate: ({ EXPR :typeOid 16 :opType op :oper { OPER :opno 521 :opid 14
7 :opresulttype 16 } :args ({ VAR :varno 1 :varattno 3 :vartype 23 :vartypmod -1
:varlevelsup 0 :varnoold 1 :varoattno 3} { CONST :consttype 23 :constlen 4 :co
nstbyval true :constisnull false :constvalue 4 [ 99 0 0 0 ] })})
Greg Sabino Mullane
greg@turnstep.com
PGP Key: 0x14964AC8 200111090946
-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html
iQA/AwUBO+vtMLybkGcUlkrIEQKDxgCgkRvTH9H2afTML5R3k3zTrJVhBh4AniHH
N4Nt+7QOofoygRSKeeRh/2tt
=uSmD
-----END PGP SIGNATURE-----