r9447: * sql/*.lisp: Add db-type parameter to generic functions READ-SQL...
[clsql.git] / sql / classes.lisp
index d1d8ff79a2885a0f4bf7df7a5c915aead099d7b1..3bde105b239238297f8413fd1c38e1670ba97dd9 100644 (file)
@@ -586,9 +586,7 @@ uninclusive, and the args from that keyword to the end."
       (write-string " FROM " *sql-stream*)
       (typecase from 
         (list (output-sql (apply #'vector from) database))
-        (string (write-string 
-                 (sql-escape 
-                  (convert-to-db-default-case from database)) *sql-stream*))
+        (string (write-string from *sql-stream*))
         (t (output-sql from database))))
     (when inner-join
       (write-string " INNER JOIN " *sql-stream*)
@@ -770,7 +768,8 @@ uninclusive, and the args from that keyword to the end."
                (write-char #\Space *sql-stream*)
                (write-string
                 (if (stringp db-type) db-type ; override definition
-                    (database-get-type-specifier (car type) (cdr type) database))
+                 (database-get-type-specifier (car type) (cdr type) database
+                                              (database-underlying-type database)))
                 *sql-stream*)
                (let ((constraints (database-constraint-statement  
                                    (if (and db-type (symbolp db-type))