in reply to Re: DBI determine primary key
in thread DBI determine primary key

I would use the DBI catalog methods instead, which provide a cross-DB way of finding the primary key (and other stuff) of tables.