From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Hackers List <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: location of Unix socket |
Date: | 2000-11-27 21:02:33 |
Message-ID: | Pine.LNX.4.21.0011272150590.832-100000@peter.localdomain |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Bruce Momjian writes:
> Am I handling this properly? I hate to be dragging around the unix
> socket directory name in pghost for too long and hate to be propogating
> the slash test throughout the code.
ISTM that you could just do this in connectDBStart() where it actually
decides on AF_UNIX. It's just a different place to do it and you don't
have to maintain it in two different places (PQconnectdb-style and
PQsetdbLogin-style).
For symmetry PQhost() should return what was put in as host. Since you
cannot put in a unix socket as a separate connection parameter there
cannot be a function PQunixsocket to get one out. In fact, ISTM there
should not be anything that's explicitly called 'unixsocket'.
I don't like the code in fe-connect.c one bit, it's way messed up.
Evidently there's even some code in there that allows you to do this:
$ psql tcp:postgresql://localhost:5432/peter
which is certainly a cool idea, only that it ends up with
psql: connectDBStart() -- unknown hostname: J"J"@st
Eventually I think the URL-style is the way to go, especially with SSL
becoming mainline, so I'd hate to publish too many new functions of
questionable value for a feature which is not very well thought out yet.
--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-11-27 21:04:28 | Re: location of Unix socket |
Previous Message | Bruce Momjian | 2000-11-27 21:00:44 | Re: location of Unix socket |