Re: location of Unix socket - Mailing list pgsql-hackers

From Tom Lane
Subject Re: location of Unix socket
Date
Msg-id 12335.975359068@sss.pgh.pa.us
Whole thread Raw
In response to Re: location of Unix socket  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: location of Unix socket  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> 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.

It's probably cleanest to do that the way you are doing it.  However,
one could argue we should make PQhost() returnpghost ? pghost : pgunixsocket
which'd make the external behavior compatible with the way one specifies
the connection.

Basically, the idea was to *not* have a distinct unixsocket spec
anywhere in libpq's external API, so that existing apps wouldn't need
a rewrite to support this feature.  Keeping unixsocket separate inside
the library is a good idea, but it's independent of the API.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: location of Unix socket
Next
From: Bruce Momjian
Date:
Subject: Re: location of Unix socket