Re: [HACKERS] List of Index Columns & Expressions

2013-01-10 Thread David E. Wheeler
On Jan 10, 2013, at 2:16 PM, Tom Lane wrote: >> Is there some way to only get the relevant index expression from indexprs, >> rather than the whole expression? > > pg_get_indexdef() is your friend. You really, really don't want to > write any client-side code that inspects indexprs directly.

Re: [HACKERS] List of Index Columns & Expressions

2013-01-10 Thread Tom Lane
"David E. Wheeler" writes: > Is there some way to only get the relevant index expression from indexprs, > rather than the whole expression? pg_get_indexdef() is your friend. You really, really don't want to write any client-side code that inspects indexprs directly. It'll break.

[HACKERS] List of Index Columns & Expressions

2013-01-10 Thread David E. Wheeler
Hackers, I'm trying to write a query to give me a list of the columns and/or expressions in an index. For example, given this table: david=# \d foo Table "public.foo" Column | Type| Modifiers -+---+--- id | integer | bar_ids | integer[] | Indexe