Tom Lane writes:
> > #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.
>
> No, because this has to work on the client side too. The default path
> *must* be determined at compile time, or clients and servers will be
> unable to find each other.
The only difference between your snippet and mine is that yours sets the
default to "" and interprets it as "/tmp" when it is used, whereas mine
sets the default to "/tmp" to begin with. Clients don't see the
difference.
--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/