That is unix socket, but is in other field not in the host
socket=...... if i remember
----- Original Message -----
From: "Guido Piazzi" <[EMAIL PROTECTED]>
To: "DBMail mailinglist" <[email protected]>
Sent: Friday, March 09, 2007 5:18 PM
Subject: Re: [Dbmail] One fix I'd like to see in 2.2.4 Debian package
On Fri, 09 Mar 2007 17:08:54 +0100, Paul J Stevens <[EMAIL PROTECTED]> wrote:
host=/var/run/postgresql
I'm sure I asked this before: what makes you think that is a valid
hostname?
Good question...
Maybe I just looked at the docs for PQconnectdb():
http://www.postgresql.org/docs/8.1/static/libpq.html
"host
Name of host to connect to. If this begins with a slash, it specifies
Unix-domain communication rather than TCP/IP communication; the value is the
name of the directory in which the socket file is stored. The default
behavior when host is not specified is to connect to a Unix-domain socket in
/tmp (or whatever socket directory was specified when PostgreSQL was built).
On machines without Unix-domain sockets, the default is to connect to
localhost."
If I'm not looking at outdated sources, this function is used in db_connect
in modules/dbpgsql.c
By doing a quick test, I just realized it works with an empty host statement
in dbmail.conf (i.e., "host="), thus bypassing the forward slash problem
altogether (libpq just uses the default, hardwired unix domain socket).
Nevertheless, it would be nice to be able to specify a non-default unix
domain socket for the connection, and it would require using the pathname of
the socket directory as the "host" parameter.
Regards
Guido
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail