X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=db-postgresql%2Fpostgresql-sql.lisp;h=ac13a3054deb0e178d2e9a4a0af496e911f94041;hp=a199ba5494c7be6e2906d58a8bef8768e918d066;hb=cf0a1997b66f3e09e595c3c6fb04b08c0d2a4e61;hpb=1b1554c5206df9cbaa8268cc6d210cd31d19667d diff --git a/db-postgresql/postgresql-sql.lisp b/db-postgresql/postgresql-sql.lisp index a199ba5..ac13a30 100644 --- a/db-postgresql/postgresql-sql.lisp +++ b/db-postgresql/postgresql-sql.lisp @@ -96,7 +96,17 @@ (destructuring-bind (host db user password &optional port options tty) connection-spec (declare (ignore password options tty)) - (concatenate 'string host (if port ":") (if port port) "/" db "/" user))) + (concatenate 'string + (etypecase host + (pathname (namestring host)) + (string host)) + (when port + (concatenate 'string + ":" + (etypecase port + (integer (write-to-string port)) + (string port)))) + "/" db "/" user))) (defmethod database-connect (connection-spec (database-type (eql :postgresql)))