Re: Re: UUNET socket-file-location patch - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Re: UUNET socket-file-location patch
Date
Msg-id Pine.LNX.4.21.0011151736160.779-100000@peter.localdomain
Whole thread Raw
In response to Re: Re: UUNET socket-file-location patch  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Re: UUNET socket-file-location patch
List pgsql-hackers
Bruce Momjian writes:

> > Hmm.  I think it would make more sense to make the parameter be just
> > the directory, not the full path including filename --- for one thing,
> > doing it like that renders the port-number parameter useless.  Why not
> > 
> > #define UNIXSOCK_PATH(sun,port,defpath) \
> >     snprintf((sun).sun_path, sizeof((sun).sun_path), "%s/.s.PGSQL.%d", \
> >              (((defpath) && *(defpath) != '\0') ? (defpath) : "/tmp"), \
> >              (port))
> 
> I can do that.  Of course, I have to now change all the documentation to
> match it.  :-)

Rather:

#define UNIXSOCK_PATH(sun,port,defpath) \   snprintf((sun).sun_path, sizeof((sun).sun_path), "%s/.s.PGSQL.%d", \
   (defpath), (port))
 

and make "/tmp" the default in guc.c.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Syslog Facility Patch
Next
From: Tom Lane
Date:
Subject: Re: Re: UUNET socket-file-location patch