postgresql-socket3: Handle unix sockets db names
[clsql.git] / db-postgresql-socket3 / sql.lisp
index f8573a200b7e7432514900dc51eb22a5aec7743f..3172e6dbd7b2881aaebc1f9c2008fe1aa6aa1eeb 100644 (file)
       (etypecase host
         (null
          "localhost")
+        (keyword "unix")
         (pathname (namestring host))
         (string host))
       (when port
 
 (defmethod query ((obj command-object) &key (database *default-database*)
                   (result-types :auto) (flatp nil) (field-names t))
-  (clsql-sys::record-sql-command (expression obj) database)
+  (clsql-sys::record-sql-command
+   (format nil "~&~A~&{Params: ~{~A~^, ~}}"
+           (expression obj)
+           (parameters obj))
+   database)
   (multiple-value-bind (rows names)
       (database-query obj database result-types field-names)
     (let ((result (if (and flatp (= 1 (length (car rows))))
   (clsql-sys:initialize-database-type :database-type :postgresql-socket3))
 
 
-;; Type munging functions
-
-(defmethod read-sql-value (val (type (eql 'boolean)) (database postgresql-socket3-database) db-type)
-  (declare (ignore database db-type))
-  val)
-
-(defmethod read-sql-value (val (type (eql 'generalized-boolean)) (database postgresql-socket3-database) db-type)
-  (declare (ignore database db-type))
-  val)