Updated get-database-type-specifier to handle text/longchar type
[clsql.git] / sql / generic-postgresql.lisp
index 4c726da68d5be6b83fff7decd8e9feeec6aa1004..feeaced389b125c371f40475cfd8bb0ba79e021a 100644 (file)
@@ -22,7 +22,8 @@
 
 (defmethod database-get-type-specifier (type args database
                                         (db-type (eql :postgresql)))
-  (declare (ignore type args database))
+  (warn "Could not determine a valid :postgresqlsql type specifier for ~A ~A ~A, defaulting to VARCHAR "
+        type args database)
   "VARCHAR")
 
 (defmethod database-get-type-specifier ((type (eql 'string)) args database
 
 (defmethod database-add-autoincrement-sequence
     ((self standard-db-class) (database generic-postgresql-database))
-  (let ((ordered-slots (if (normalizedp self)
-                           (ordered-class-direct-slots self)
-                           (ordered-class-slots self))))
+  (let ((ordered-slots (slots-for-possibly-normalized-class self)))
     (dolist (slotdef ordered-slots)
-
       ;; ensure that referenceed sequences actually exist before referencing them
       (let ((sequence-name (auto-increment-sequence-name self slotdef database)))
         (when (and sequence-name
 (defmethod database-remove-autoincrement-sequence
     ((table standard-db-class)
      (database generic-postgresql-database))
-  (let ((ordered-slots
-          (if (normalizedp table)
-              (ordered-class-direct-slots table)
-              (ordered-class-slots table))))
+  (let ((ordered-slots (slots-for-possibly-normalized-class table)))
     (dolist (slotdef ordered-slots)
       ;; ensure that referenceed sequences are dropped with the table
       (let ((sequence-name (auto-increment-sequence-name table slotdef database)))