Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id B667B64FD3F for ; Wed, 23 Jul 2008 07:47:05 -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 37593-04 for ; Wed, 23 Jul 2008 07:46:58 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from web25806.mail.ukl.yahoo.com (web25806.mail.ukl.yahoo.com [217.12.10.191]) by postgresql.org (Postfix) with SMTP id B73D664FCCC for ; Wed, 23 Jul 2008 07:47:01 -0300 (ADT) Received: (qmail 73516 invoked by uid 60001); 23 Jul 2008 10:46:59 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Received:X-Mailer:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=TABLjOKwgAbbKY6S7EpMLOoE2PWE3rtlla2MHMME9gXgp4VWTuBiIBFsOTzUuF9bqg/ttqeAuK3Z1mCBwGJ19jWA/AkM9pMX5l5oTk9hUr1dbfXvVW92ukm7QoyhQ+gsU5BS4pP/RbYYr8XXnWRbOL5JBqUqGApi2nAjFgKJp1s=; Received: from [85.189.172.41] by web25806.mail.ukl.yahoo.com via HTTP; Wed, 23 Jul 2008 10:46:59 GMT X-Mailer: YahooMailWebService/0.7.218 Date: Wed, 23 Jul 2008 10:46:59 +0000 (GMT) From: Valentin Bogdanov Reply-To: valiouk@yahoo.co.uk Subject: Re: Perl/DBI vs Native To: pgsql-performance@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID: <665252.73017.qm@web25806.mail.ukl.yahoo.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.315 tagged_above=0 required=5 tests=SARE_MILLIONSOF=0.315 X-Spam-Level: X-Archive-Number: 200807/214 X-Sequence-Number: 30814 Thanks Guys, this is really useful, especially the pg_service.conf. I have = got an app where the connection parameters have to be set in 3 different pl= aces I was thinking of writing something myself but now that I know of pg_s= ervice.conf, problem solved. Regards, Val --- On Tue, 22/7/08, Jeffrey Baker wrote: > From: Jeffrey Baker > Subject: Re: [PERFORM] Perl/DBI vs Native > To: "Greg Sabino Mullane" > Cc: pgsql-performance@postgresql.org > Date: Tuesday, 22 July, 2008, 9:35 PM > On Tue, Jul 22, 2008 at 9:48 AM, Greg Sabino Mullane > wrote: > >> 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. >=20 > For the further illumination of the historical record, the > best > practice here is probably to use the pg_service.conf file, > which may > or may not live in /etc depending on your operating system. > Then you > can connect in DBI using dbi:Pg:service=3Dwhatever, and > change the > definition of "whatever" in pg_service.conf.=20 > This has the same > semantics as PGSERVICE=3Dwhatever when using psql. It's > a good idea to > keep these connection details out of your program code. >=20 > -jwb >=20 > --=20 > Sent via pgsql-performance mailing list > (pgsql-performance@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-performance=0A=0A=0A ______= ____________________________________________________=0ANot happy with your = email address?.=0AGet the one you really want - millions of new email addre= sses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html