fixed a bug where it was ignoring the new parameters passed in on a setf-er
[clsql.git] / sql / pool.lisp
index d1c0a230bc43255f8d9b3940286e1545c3e7d50d..f3645086e6920decb5c87a9ba7a624f5c6ca47b0 100644 (file)
@@ -44,7 +44,8 @@ command to put the connection back into its default state."
            (handler-case
                (case (database-underlying-type pconn)
                  (:postgresql
-                    (database-execute-command "RESET ALL" pconn))
+                    ;; This resets the connection to "New" state
+                    (database-execute-command "DISCARD ALL;" pconn))
                  (:mysql
                     (database-query "SHOW ERRORS LIMIT 1" pconn nil nil))
                  (:mssql
@@ -74,7 +75,7 @@ Disconnecting.~%"
           (setf (conn-pool conn) pool))
         conn)))
 
-(defun release-to-conn-pool (conn)
+(defmethod release-to-conn-pool (conn)
   (let ((pool (conn-pool conn)))
     (with-process-lock ((conn-pool-lock pool) "Release to pool")
       (vector-push-extend conn (free-connections pool)))))