r8936: merged classic-tests into tests
[clsql.git] / db-postgresql-socket / postgresql-socket-api.lisp
index 572e5cf7b16794caee2dd2934031c75f0d7cef0c..40c904fca70e487261b496d3ad4abd46cc081d02 100644 (file)
@@ -375,6 +375,21 @@ 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
+     (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