in reply to DBI - MySQL vs. PgSQL

I don't know MySQL nor PgSQL, but the following may work:

$dbh->tables;
returns a list of tables
$sql = "select * from $table"
returns the data
and
$sth->{NAME}->[0];
is the name of the first column. etc

rdfield