Re: Connecting via localhost pg-8.0.3

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Connecting via localhost pg-8.0.3
Дата
Msg-id 10056.1118894915@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Connecting via localhost pg-8.0.3  (David <dbree@duo-county.com>)
Ответы $_SERVER['SERVER_ADDR'] ; returns wrong value "::1"  (Bill Hernandez <pgsql@mac-specialist.com>)
Re: Connecting via localhost pg-8.0.3  (David <dbree@duo-county.com>)
Список pgsql-admin
David <dbree@duo-county.com> writes:
> Well, you guessed correctly.  It was a configuration problem.  By
> inserting the line:
>         unix_socket_directory = '/var/run/postgresql'
> into postgresql.conf, it works as expected.

Well, you've still got an issue here somewhere, because if your server
and client libraries came from the same build then they ought to agree
on this without any help from the config file.  AFAIK, Debian hasn't
changed their policy about where to put the socket, so it seems like you
must be using a server that didn't come from Debian.

> I must confess that I was a bit unclear about the connection parameters.
> I thought that (in php) "host=localhost" meant to use sockets, but this
> means connect through TCP/IP over lo, correct?

Correct --- "localhost" is an IP-ism referring to TCP loopback
connections.  In the Unix-socket world there is no name for the local
machine at all, since that is the whole universe anyway ... all you
need for that is a filesystem pathname.

            regards, tom lane

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

Предыдущее
От: Postgres Admin
Дата:
Сообщение: PostgreSQL and Delphi 6
Следующее
От: Bill Hernandez
Дата:
Сообщение: $_SERVER['SERVER_ADDR'] ; returns wrong value "::1"