X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=sql%2Fexpressions.lisp;h=bcf1383189ff83a8c3ef47ce4a83ef4a674b6462;hb=2961f4f122593e9d4875e88e6af159de28c8dd47;hp=7f0ad1f82ff601a6556a8d45080fcb481494ba27;hpb=c4e1422d93b72c1ab1be5c913c48860b1f4e39e2;p=clsql.git diff --git a/sql/expressions.lisp b/sql/expressions.lisp index 7f0ad1f..bcf1383 100644 --- a/sql/expressions.lisp +++ b/sql/expressions.lisp @@ -830,7 +830,7 @@ uninclusive, and the args from that keyword to the end." (defmethod database-output-sql ((str string) database) (declare (ignore database) (optimize (speed 3) (safety 1) #+cmu (extensions:inhibit-warnings 3)) - (type (simple-array * (*)) str)) + (simple-string str)) (let ((len (length str))) (declare (type fixnum len)) (cond ((zerop len) @@ -850,7 +850,11 @@ uninclusive, and the args from that keyword to the end." (setf (aref buf j) #\') (incf j) (setf (aref buf j) #\')) - ((char= char #\\) + ((and (char= char #\\) + ;; MTP: only escape backslash with pgsql/mysql + (member (database-underlying-type database) + '(:postgresql :mysql) + :test #'eq)) (setf (aref buf j) #\\) (incf j) (setf (aref buf j) #\\))