Re: [SQL] Query to retrieve all indexed columns

2008-11-19 Thread Tom Lane
"Bart van Houdt" <[EMAIL PROTECTED]> writes: > I am working on a query to retrieve all indexed columns and came up with > the following query: > ... > Tis query works for single column indexes, but with multiple column > indexes I get incorrect results... I'm having a hard time figuring out > how t

[SQL] Query to retrieve all indexed columns

2008-11-19 Thread Bart van Houdt
Hi, I am working on a query to retrieve all indexed columns and came up with the following query: select pgc.relname as indexname ,pgc2.relname as tablename ,pga.attname as columnname ,pga.attnum as columnnumber ,replace(pgi.indkey::text, ' ', ',') as columnindex