On Fri, May 08, 2009 at 04:43:44PM -0400, Alvaro Herrera wrote: > Ricardo Bessa escribió: > > Hi, > > > > I think that can be useful the command \di on psql show the method of > > index (hash, btree, ...) like: > > > > test=# \di > > List of relations > > Schema | Name | Type | Owner | Table | Method > > --------+---------------+-------+------------+--------+-------- > > public | test_id_idx | index | postgresql | table1 | btree > > public | test_name_idx | index | postgresql | table1 | hash > > (2 rows) > > Well, you can see that with \d on the table, but IMHO this should be > present on \di too, so +1. > > One gripe I had with \d and indexes the other day is that it sucks > on functional indexes -- it just says "pg_expression_1".
So after a little wrong-tree-up-barking, I grepped the source tree for pg_expression, and it turns out that the fault lies not in psql, but in src/backend/catalog/index.c's ConstructTupleDescriptor, which automatically names the with this, um, somewhat uninformative name. I see this comment just above the offending code: /* * Make the attribute's name "pg_expresssion_nnn" (maybe * think of * something better later) */ Any ideas for a better naming convention? Cheers, David. -- David Fetter <da...@fetter.org> http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fet...@gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers