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.
This commit is contained in:
Dimitri Fontaine 2014-12-12 15:10:46 +01:00
parent 9fb03d2d2e
commit 3cbaea52f5

View File

@ -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))