From 3cbaea52f5e98043bec757040e763d7e6439307b Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Fri, 12 Dec 2014 15:10:46 +0100 Subject: [PATCH] Fix pgsql uri parsing for empty hosts. Don't use and empty string as a valid hostname, we want either the default unix socket or "localhost" to be used in that case. --- src/parsers/command-db-uri.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/parsers/command-db-uri.lisp b/src/parsers/command-db-uri.lisp index ded1581..8711c1e 100644 --- a/src/parsers/command-db-uri.lisp +++ b/src/parsers/command-db-uri.lisp @@ -59,7 +59,8 @@ (defrule network-name (and namestring (* (and "." namestring))) (:lambda (name) - (list :host (text name)))) + (let ((host (text name))) + (list :host (unless (string= "" host) host))))) (defrule hostname (or ipv4 socket-directory network-name) (:identity t))