M
Mr. M.J. Lush
How can I test for the existance of an index in a postgres (7.4) table
via the perl DBI?
I want to write an function that I can pass database, table and column,
which, if the table already has an index uses REINDEX to rebuild the
index and if the index does not exist use CREATE INDEX.
I've had a look through <http://search.cpan.org/~timb/DBI-1.46/DBI.pm>
and could not see anything relevent (I would have assumend column_info()
would do the job)
A bit of Googling gave me a MySQL solution ("SHOW INDEX FROM table")
but I can't find a postgers equivilant.
What am I missing?
via the perl DBI?
I want to write an function that I can pass database, table and column,
which, if the table already has an index uses REINDEX to rebuild the
index and if the index does not exist use CREATE INDEX.
I've had a look through <http://search.cpan.org/~timb/DBI-1.46/DBI.pm>
and could not see anything relevent (I would have assumend column_info()
would do the job)
A bit of Googling gave me a MySQL solution ("SHOW INDEX FROM table")
but I can't find a postgers equivilant.
What am I missing?