Re: Exposing DEFAULT_PGSOCKET_DIR via a libpq function? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Exposing DEFAULT_PGSOCKET_DIR via a libpq function?
Date
Msg-id 8683.1143607635@sss.pgh.pa.us
Whole thread Raw
In response to Re: Exposing DEFAULT_PGSOCKET_DIR via a libpq function?  ("Larry Rosenman" <ler@lerctr.org>)
Responses Re: Exposing DEFAULT_PGSOCKET_DIR via a libpq function?
List pgsql-hackers
"Larry Rosenman" <ler@lerctr.org> writes:
> What's the harm of a (pseudo code):

>  const char *PQgetunixsocketdir(void)
>  {
>     return(DEFAULT_PGSOCKET_DIR)
>  }

> In libpq, and a psql command line switch to call it. 

By the time you get done adding the infrastructure and documentation for
those two layers of features, you're talking about many hundreds of
lines of stuff, not four.  There are also definitional issues (what does
this do on platforms without Unix sockets) and future proofing (will we
always have DEFAULT_PGSOCKET_DIR).  So "what's the harm" is not the
appropriate measure --- especially when this proposal clearly doesn't
help in a lot of the scenarios in which one might wish to know the
information.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Larry Rosenman"
Date:
Subject: Re: Exposing DEFAULT_PGSOCKET_DIR via a libpq function?
Next
From: "Larry Rosenman"
Date:
Subject: Re: Exposing DEFAULT_PGSOCKET_DIR via a libpq function?