Question about retrieving indexes
Posted in 2000
\
Ralf Heydenreich wrote: > How can I get the indexes of some tables of a database via DBI driver > in Perl? Have I really to walk through the sys-entries? Yes, you do. AFAIK, the DBI specification has no method for reporting on the indexes on a table, and DBD::Informix almost certainly doesn't. If you want to find code that does it, then SQLCMD does contain such code. The key item is knowing the table's tabid; with that, you can find out the rest of the information. Indexes are gruesome because of the structure of the sysindexes table -- and the structure differs between OnLine and SE, of course. SQLCMD is available from the IIUG web site. Version 57 has a blind spot when it comes to trailing blanks on VARCHAR values -- I'm working on it. -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"