Skip site navigation (1) Skip section navigation (2)

Re: Exposing DEFAULT_PGSOCKET_DIR via a libpq function?

From: "Larry Rosenman" <ler(at)lerctr(dot)org>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'Larry Rosenman'" <lrosenman(at)pervasive(dot)com>,"'PostgreSQL Hackers List'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Exposing DEFAULT_PGSOCKET_DIR via a libpq function?
Date: 2006-03-29 03:37:13
Message-ID: 001001c652e2$17bd8260$65c8a8c0@lerctr.org (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane wrote:
> "Larry Rosenman" <ler(at)lerctr(dot)org> writes:
>> Tom Lane wrote:
>>> pg_config would seem to be the appropriate place, not libpq nor
>>> psql. 
> 
>> The issue is what psql (and any libpq using program) is going to use
>> to find the UNIX socket.
> 
> No, the issue is where the server put the socket.  libpq is the wrong
> place because libpq is not the only thing people use to connect to
> the server.  
> 
> If the DBA sets a non-default unix_socket_directory via
> postgresql.conf then you're screwed no matter what: no client-side
> code can hope to tell you where it is.  The only thing that is useful
> to inspect is the server's compile-time default, and pg_config is the
> right mechanism to inspect that with.    
> 
> 			regards, tom lane

The other issue is borked installs where the server and libpq disagree.
What I'm looking for
 is to expose what libpq has for it's default as well as what the server is
using.  There is currently
 no way to determine what libpq has for it's default.  What happened in the
irc case was a partial re-install
 with non-matching server and libpq.

LER


-- 
Larry Rosenman                     http://www.lerctr.org/~ler
Phone: +1 512-248-2683                 E-Mail: ler(at)lerctr(dot)org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3683 US


In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-03-29 03:59:46
Subject: Re: Exposing DEFAULT_PGSOCKET_DIR via a libpq function?
Previous:From: Tom LaneDate: 2006-03-29 03:32:28
Subject: Re: Exposing DEFAULT_PGSOCKET_DIR via a libpq function?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group