(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)
(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) #\\))