Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D4802650449 for ; Tue, 22 Jul 2008 17:28:29 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 36309-08-2 for ; Tue, 22 Jul 2008 17:28:09 -0300 (ADT) Received: from mx3.hub.org (mx3.hub.org [206.223.169.73]) by postgresql.org (Postfix) with ESMTP id 6AF2265044E for ; Tue, 22 Jul 2008 16:50:47 -0300 (ADT) X-Greylist: delayed 00:30:49.265435 by SQLgrey-1.7.6 Received: from tinlc.com (unknown [72.18.206.65]) by mx3.hub.org (Postfix) with ESMTP id 82AE537C859 for ; Tue, 22 Jul 2008 14:22:42 -0300 (ADT) Received: from biglumber.com ([72.18.206.64] helo=localhost) by tinlc.com with smtp (Exim 4.60) (envelope-from ) id 1KLL2Y-0001GW-NU; Tue, 22 Jul 2008 11:48:42 -0500 From: "Greg Sabino Mullane" To: pgsql-performance@postgresql.org Subject: Re: Perl/DBI vs Native X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: <698916.49812.qm@web25803.mail.ukl.yahoo.com> Date: Tue, 22 Jul 2008 16:48:42 -0000 X-Mailer: JoyMail 2.01 Message-ID: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200807/208 X-Sequence-Number: 30808 -----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-----