Re: Perl/DBI vs Native

From: Valentin Bogdanov <valiouk(at)yahoo(dot)co(dot)uk>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Perl/DBI vs Native
Date: 2008-07-23 10:46:59
Message-ID: 665252.73017.qm@web25806.mail.ukl.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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 places I was thinking of writing something myself but now that I know of pg_service.conf, problem solved.

Regards,
Val

--- On Tue, 22/7/08, Jeffrey Baker <jwbaker(at)gmail(dot)com> wrote:

> From: Jeffrey Baker <jwbaker(at)gmail(dot)com>
> Subject: Re: [PERFORM] Perl/DBI vs Native
> To: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
> Cc: pgsql-performance(at)postgresql(dot)org
> Date: Tuesday, 22 July, 2008, 9:35 PM
> On Tue, Jul 22, 2008 at 9:48 AM, Greg Sabino Mullane
> <greg(at)turnstep(dot)com> 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.
>
> 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=whatever, and
> change the
> definition of "whatever" in pg_service.conf.
> This has the same
> semantics as PGSERVICE=whatever when using psql. It's
> a good idea to
> keep these connection details out of your program code.
>
> -jwb
>
> --
> Sent via pgsql-performance mailing list
> (pgsql-performance(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance

__________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Miernik 2008-07-23 15:21:12 how to fix problem then when two queries run at the same time, it takes longer to complete then if run in sequence
Previous Message Craig Ringer 2008-07-23 01:15:22 Re: Performance of jobs