Re: [GENERAL] Extracting Index Creation Script

2007-10-29 Thread Vyacheslav Kalinin
If you know the index name then: SELECT pg_get_indexdef('your_index_name'::regclass) will do. In case you want a full list of indices for a certain table: SELECT c2.relname, pg_get_indexdef(i.indexrelid, 0, true), c2.reltablespace FROM pg_catalog.pg_class c, pg_catalog.pg_class c2, pg_catalog.pg

Re: [GENERAL] Extracting Index Creation Script

2007-10-24 Thread Paul Silveira
Hello, I answered my own question. :) I continued looking last night after I posted this and found a really easy way to get this info... select * from pg_indexes where tablename like 'YOURTABLENAME' This will give you the DDL to create your indexes. Regards, Paul Paul Silveira wrote: