r9050: Automated commit for Debian build of clsql upstream-version-2.7.6
[clsql.git] / sql / classes.lisp
index 5a22584f5f3e304ae8cd7758af2a93984e2ad2f7..7098ca2c81eafb294522578b648d896f0f20782f 100644 (file)
@@ -644,13 +644,14 @@ uninclusive, and the args from that keyword to the end."
 (defmethod output-sql ((stmt sql-create-table) &optional
                        (database *default-database*))
   (flet ((output-column (column-spec)
-           (destructuring-bind (name type &rest constraints)
+           (destructuring-bind (name type &optional db-type &rest constraints)
                column-spec
              (let ((type (listify type)))
                (output-sql name database)
                (write-char #\Space *sql-stream*)
                (write-string
-                (database-get-type-specifier (car type) (cdr type) database)
+                (if (stringp db-type) db-type ; override definition
+                    (database-get-type-specifier (car type) (cdr type) database))
                 *sql-stream*)
                (let ((constraints
                       (database-constraint-statement constraints database)))