From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | Hackers List <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: location of Unix socket |
Date: | 2000-11-27 21:00:44 |
Message-ID: | 200011272100.QAA21928@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Well, actually, unixsocket can be specified by PQconnectdb. Sounds like
it is a big mess. Care to tame it? I am heading to Japan tomorrow and
don't want to leave it 1/2 done.
> 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/
>
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2000-11-27 21:02:33 | Re: location of Unix socket |
Previous Message | Dave | 2000-11-27 20:47:00 | JDBC charSet patch |