Re: [HACKERS] DefaultHost - Mailing list pgsql-hackers

From Edmund Mergl
Subject Re: [HACKERS] DefaultHost
Date
Msg-id 34B7832A.F5495AFD@bawue.de
Whole thread Raw
In response to DefaultHost  (Edmund Mergl <E.Mergl@bawue.de>)
Responses Re: [HACKERS] DefaultHost  (Goran Thyni <goran@bildbasen.se>)
List pgsql-hackers
Goran Thyni wrote:
>
>    in the current snapshot there is no default for PGHOST
>    in src/interfaces/libpq/fe-connect.c.
>    In 6.2 this was 'localhost', which is a reasonable default.
>
>    If there is no real reason for not having a default for
>    the host-option, please provide 'localhost' as default.
>
> No host means connect with unix domain socket.
> If host (PGHOST) is set connection is made with tcp socket.
>
> This is related to the problem I mentioned before with
> DBD::Pg and libpq.
>
>         regards,
> --
> ---------------------------------------------
> Göran Thyni, sysadm, JMS Bildbasen, Kiruna


ok, but there is still no reasonable default. The only way
I got things working is starting the postmaster with -i
and setting the environment-variable PGHOST to 'localhost'.

It should be possible to connect to the backend on the
localhost without having to define the host in the environment
or as argument in PQconnectdb().

Edmund
--
Edmund Mergl       mailto:E.Mergl@bawue.de
Im Haldenhau 9     http://www.bawue.de/~mergl
D 70565 Stuttgart  fon: +49 711 747503
Germany            gsm: +49 171 2645325

pgsql-hackers by date:

Previous
From: darcy@druid.net (D'Arcy J.M. Cain)
Date:
Subject: Can't run current PostgreSQL
Next
From: Goran Thyni
Date:
Subject: Re: [HACKERS] DefaultHost