Re: location of Unix socket
От | Peter Eisentraut |
---|---|
Тема | Re: location of Unix socket |
Дата | |
Msg-id | Pine.LNX.4.21.0011272150590.832-100000@peter.localdomain обсуждение исходный текст |
Ответ на | Re: location of Unix socket (Bruce Momjian <pgman@candle.pha.pa.us>) |
Ответы |
Re: location of Unix socket
Re: location of Unix socket |
Список | 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@gmx.net http://yi.org/peter-e/
В списке pgsql-hackers по дате отправления: