Re: Perl/DBI vs Native

Поиск
Список
Период
Сортировка
От Jeffrey Baker
Тема Re: Perl/DBI vs Native
Дата
Msg-id fd145f7d0807221335l3a105df4v1d963d981792b8b4@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Perl/DBI vs Native  ("Greg Sabino Mullane" <greg@turnstep.com>)
Ответы Re: Perl/DBI vs Native  (Valentin Bogdanov <valiouk@yahoo.co.uk>)
Список pgsql-performance
On Tue, Jul 22, 2008 at 9:48 AM, Greg Sabino Mullane <greg@turnstep.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

В списке pgsql-performance по дате отправления:

Предыдущее
От: Greg Smith
Дата:
Сообщение: Re: Performance on Sun Fire X4150 x64 (dd, bonnie++, pgbench)
Следующее
От: "Jeffrey W. Baker"
Дата:
Сообщение: Samsung 32GB SATA SSD tested