X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=db-postgresql%2Fpostgresql-sql.lisp;h=09b72e7bae61ef47adc41ebf46248d95b370f47b;hb=0faf01ab41c363b4adec716d9efb5e814b7ebac7;hp=a199ba5494c7be6e2906d58a8bef8768e918d066;hpb=f890314907bc4add4b0f24ad6883da9838a056b7;p=clsql.git diff --git a/db-postgresql/postgresql-sql.lisp b/db-postgresql/postgresql-sql.lisp index a199ba5..09b72e7 100644 --- a/db-postgresql/postgresql-sql.lisp +++ b/db-postgresql/postgresql-sql.lisp @@ -8,7 +8,7 @@ ;;;; Original code by Pierre R. Mai ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: postgresql-sql.lisp,v 1.3 2003/07/21 01:45:45 kevin Exp $ +;;;; $Id$ ;;;; ;;;; This file, part of CLSQL, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; and Copyright (c) 1999-2001 by Pierre R. Mai @@ -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)))