Postgresql: Getting index

select indexrelid::regclass::text , indrelid::regclass, indisvalid, indisready from pg_index where indexrelid::regclass::text = 'pk_vpx_entity';


vcdb=> select pg_get_indexdef(indexrelid) from pg_index where indrelid::regclass::text = 'vpx_entity';
                           pg_get_indexdef
----------------------------------------------------------------------
CREATE UNIQUE INDEX pk_vpx_entity ON vpx_entity USING btree (id)
CREATE INDEX vpx_entity_f1 ON vpx_entity USING btree (parent_id)
CREATE INDEX vpxi_entity_type_id ON vpx_entity USING btree (type_id)
(3 rows)

No comments:

Post a Comment