diff --exclude '*~' -urN postmodern-1.12/s-sql/s-sql.lisp postmodern-1.12-or-db-null/s-sql/s-sql.lisp
--- postmodern-1.12/s-sql/s-sql.lisp	2008-04-29 13:42:23.000000000 -0700
+++ postmodern-1.12-or-db-null/s-sql/s-sql.lisp	2008-05-09 23:46:57.000000000 -0700
@@ -580,11 +580,20 @@
 
 (def-sql-op :create-table (name (&rest columns) &rest options)
   (labels ((dissect-type (type)
-             (if (and (consp type) (eq (car type) 'or) (member 'db-null type) (= (length type) 3))
-                 (if (eq (second type) 'db-null)
-                     (values (third type) t)
-                     (values (second type) t))
-                 (values type nil)))
+	     (when (eq type 'db-null)
+	       ;; 'db-null formatted as value for package prefix, in-case DB-NULL
+	       ;; is not imported into the caller's current package.
+	       (error "Column type cannot be only ~S." 'db-null))
+	     (if (and (listp type) (eq (first type) 'or))
+		 (let ((member-types (rest type)))
+		   (unless (= 1 (count 'db-null member-types))
+		     (error "~S ~:[must~;can only~] occur once in ~S column type: ~S"
+			    'db-null (member 'db-null member-types) 'or type))
+		   (unless (= (length member-types) 2)
+		     (error "Expected 2 member types to be given in ~S column type, but got ~D: ~S"
+			    'or (length member-types) type))
+		   (values (first (remove 'db-null member-types)) t))
+		 (values type nil)))
            (reference-action (action)
              (case action
                (:restrict "RESTRICT")
