in reply to Re: DBI:how to get name of the db ?
in thread DBI:how to get name of the db ?
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: DBI:how to get name of the db ?
by Tux (Canon) on Dec 14, 2011 at 11:37 UTC | |
by erix (Prior) on Dec 14, 2011 at 12:04 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |