Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^4: DBI:how to get name of the db ?

by erix (Parson)
on Dec 14, 2011 at 12:04 UTC ( #943535=note: print w/replies, xml ) Need Help??

in reply to Re^3: DBI:how to get name of the db ?
in thread DBI:how to get name of the db ?

The fact the DBD::Pg in your case returns the correct database name,

We are in complete agreement. You just didn't read my post well ;-) I log 'passwordless' into postgres with PGPASSFILE and friends (PGHOST, PGPORT, PGDATABASE), so my $dbh->{'Name'} returns empty.

(and btw, your example ("dbi:Pg:dbname=test", ...) will return not 'test', but 'dbname=test', although I suppose you understand that. (Apparently DBD::Pg was actually changed a while ago to give this DBI-compliant behavior, instead of the database name.))

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://943535]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2018-06-19 10:40 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (113 votes). Check out past polls.