Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

DBI connect

by prafulltc (Acolyte)
on Nov 02, 2011 at 13:27 UTC ( #935395=perlquestion: print w/ replies, xml ) Need Help??
prafulltc has asked for the wisdom of the Perl Monks concerning the following question:

Hi ,

Can we connect to server using DBI->connect() without
mentioning dbname ?

Regards,
Prafull

Comment on DBI connect
Re: DBI connect
by moritz (Cardinal) on Nov 02, 2011 at 13:31 UTC
Re: DBI connect
by erix (Vicar) on Nov 02, 2011 at 14:35 UTC

    It depends on the DBI driver. PostgreSQL/DBD:Pg can work without dbname: for instance, it will default to the user name as database name, or it can take the value of environment variable 'PGDATABASE'.

    Updated 2011.12.14 (default dbname is user name, which is not necessarily 'postgres'...)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://935395]
Approved by moritz
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2014-12-29 05:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (184 votes), past polls