Hi,
I'm trying to use Postmodern on Linux with a Postgres built from scratch. The default value for the Unix socket directory in that situation is /tmp. Postmodern defaults it to /var/run/postgresql, which is more typical for a vendor-packaged Postgres on Linux.
It's easy enough to alter/bind cl-postgres::*unix-socket-dir* as needed, but I'm always a little reluctant to use ::. Is that variable a candidate for adding to the supported API by exporting its name?
Thanks, Zach
Zach Beane xach@xach.com writes:
Hi,
I'm trying to use Postmodern on Linux with a Postgres built from scratch. The default value for the Unix socket directory in that situation is /tmp. Postmodern defaults it to /var/run/postgresql, which is more typical for a vendor-packaged Postgres on Linux.
It's easy enough to alter/bind cl-postgres::*unix-socket-dir* as needed, but I'm always a little reluctant to use ::. Is that variable a candidate for adding to the supported API by exporting its name?
For what it's worth, the the C client library handles this by checking to see if the host starts with a "/", and uses it for the socket directory if so. Postmodern uses the keyword :unix instead.
Zach
Hi Zach,
I've exported and documented the variable in https://github.com/marijnh/Postmodern/commit/c7b49bd075923bc3861b15c1ae944d2... . The leading-slash thing is nice, but since support for unix sockets is currently a hack only supported on SBCL+Unix, I didn't feel comfortable integrating it too deeply into the interface.
Best, Marijn
postmodern-devel@common-lisp.net