From: Kevin M. Rosenberg Date: Fri, 9 Apr 2004 01:41:26 +0000 (+0000) Subject: r8893: initial openmcl port X-Git-Tag: v3.8.6~700 X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=5d6de675e75567edd02a8a175fc2c68ebb0a8597 r8893: initial openmcl port --- diff --git a/ChangeLog b/ChangeLog index 348d919..39957cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,7 +10,7 @@ * db-sqlite/sqlite-api-{uffi,sql}.lisp: Multiple UFFI fixes, now passes tests on all support UFFI platforms. * db-postgresql-socket/postgresql-socket-api.list: Ported to - SBCL + SBCL and OpenMCL * multiple: Finish renaming of :types keyword to :result-types for greater CommonSQL compatibility, including documentation * sql/basic-cmds.lisp: Remove obsolete file diff --git a/TODO b/TODO index 1b03176..977095a 100644 --- a/TODO +++ b/TODO @@ -4,7 +4,6 @@ GENERAL individuals; * implement remaining functions for CLSQL AODBC backend; * port Oracle and ODBC backend to UFFI. -* port postgresql-socket backend to OpenMCL COMMONSQL SPEC diff --git a/db-postgresql-socket/postgresql-socket-api.lisp b/db-postgresql-socket/postgresql-socket-api.lisp index 572e5cf..a128395 100644 --- a/db-postgresql-socket/postgresql-socket-api.lisp +++ b/db-postgresql-socket/postgresql-socket-api.lisp @@ -375,6 +375,23 @@ socket interface" :remote-port port :remote-host host :connect :active :nodelay t)))))) +#+openmcl +(defun open-postgresql-socket-stream (host port) + (etypecase host + (pathname + (let ((path (namestring + (make-pathname :name ".s.PGSQL" :type (princ-to-string port) + :defaults host)))) + (ccl:make-socket :type :stream :address-family :file + :connect :active + :remote-filename path :local-filename path))) + (string + (socket:with-pending-connect + (mp:with-timeout (*postgresql-server-socket-timeout* (error "connect failed")) + (ccl:make-socket :type :stream :address-family :internet + :remote-port port :remote-host host + :connect :active :nodelay t)))))) + #+lispworks (defun open-postgresql-socket-stream (host port) (etypecase host