r9479: * sql/generic-postgresql.lisp: (string n) => (CHAR n)
[clsql.git] / sql / generic-postgresql.lisp
index af0ef61fabb0ff15a91f65792d33313771af8677..55d3a9082b8c6984781a58ed84cd3aef8662c979 100644 (file)
   (declare (ignore type args database))
   "VARCHAR")
 
-(defmethod database-get-type-specifier ((type (eql 'simple-base-string)) args database
-                                       (db-type (eql :postgresql)))
-  (declare (ignore database))
-  (if args
-      (format nil "VARCHAR(~A)" (car args))
-      "VARCHAR"))
-
-(defmethod database-get-type-specifier ((type (eql 'simple-string)) args database
-                                       (db-type (eql :postgresql)))
-  (declare (ignore database))
-  (if args
-      (format nil "VARCHAR(~A)" (car args))
-      "VARCHAR"))
-
 (defmethod database-get-type-specifier ((type (eql 'string)) args database
                                        (db-type (eql :postgresql)))
   (declare (ignore database))
   (if args
-      (format nil "VARCHAR(~A)" (car args))
+      (format nil "CHAR(~A)" (car args))
       "VARCHAR"))
 
 (defmethod database-get-type-specifier ((type (eql 'wall-time)) args database
            (sql-escape (string-downcase table)))
    database :auto nil))
 
+
+;; Capabilities
+
+(defmethod db-type-has-fancy-math? ((db-type (eql :postgresql)))
+  t)
+
+(defmethod db-type-default-case ((db-type (eql :postgresql)))
+  :lower)
+