It turns out that $dbh->{'Name'} is not a reliable source for the database name; DBI docs say:
Holds the "name" of the database. Usually (and recommended to be) the same as the "dbi:DriverName:..." string used to connect to the database, but with the leading "dbi:DriverName:" removed.
DBD::Pg complies wth that description: it simply returns the connectionstring minus the prefix.
So it would seem that if $dbh->{'Name'} returns the database name it's by accident.
In reply to Re^2: DBI:how to get name of the db ?
by erix
in thread DBI:how to get name of the db ?
by ansh batra
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |