From: Greg Sabino Mullane <greg@turnstep.com>
To: pgsql-performance@postgresql.org
Subject: Re: Perl/DBI vs Native
Date: Tue, 22 Jul 2008 16:48:42 -0000
Message-ID: <dd0f5dcec7cfaac867cb7ce16c4ee3bf@biglumber.com> (raw)
In-Reply-To: <698916.49812.qm@web25803.mail.ukl.yahoo.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160
> In case someone is wondering, the way to force DBI to use unix
> sockets is by not specifying a host and port in the connect call.
Actually, the host defaults to the local socket. Using the port
may still be needed: if you leave it out, it simply uses the default
value (5432) if left out. Thus, for most purposes, just leaving
the host out is enough to cause a socket connection on the default
port.
For completeness in the archives, you can also specify the complete
path to the unix socket directory in the host line, for those cases in
which the socket is not where you expect it to be:
$dbh = DBI->connect('dbi:Pg:dbname=test;host=/var/local/sockets',
$user, $pass, {AutoCommit=>0, RaiseError=>1});
- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 200807221248
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iEYEAREDAAYFAkiGD1UACgkQvJuQZxSWSsjHTQCfYbGnh3dvs9ggZX0FCSwMro81
sJsAoOUcDyu6vQM43EJOGAay/vXyKWES
=hYLf
-----END PGP SIGNATURE-----
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: greg@turnstep.com
Subject: Re: Perl/DBI vs Native
In-Reply-To: <dd0f5dcec7cfaac867cb7ce16c4ee3bf@biglumber.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox