                                (map #(feature-to-sparse-record proj-fn % (all-fields-constructor all-attributes) import-nil-geometry?)
                                     grouped-features))]
            (if (not (empty? records))
-             (let [fields (concat [:_id :_parent_id :_version :_geometry_point :_geometry_line :_geometry_polygon :_geo_group]
+             (let [fields (concat [:_id :_parent_id :_version]
                                   all-attributes)
                    sql (gs-insert-sql dataset collection fields)]
                (j/execute! db (cons sql records) :multi? true :transaction? (:transaction? db)))))))

        no-defaults (filter #(not (some #{(:column_name %)} ["gid"
                                                             "_id"
                                                             "_parent_id"
                                                             "_version"
                                                             "_geometry_point"
                                                             "_geometry_line"
                                                             "_geometry_polygon"
                                                             "_geo_group"])) columns)
        attributes (reduce (fn [acc c] (conj acc c)) #{} (map #(:column_name %) no-defaults))]
    attributes))



(defn- gs-create-collection [{:keys [db dataset]} ndims srid collection]
  "Create table with default fields"
  (let [table collection]
    (pg/create-table db dataset table
                     [:gid "serial" :primary :key]
                     [:_id "text"]
                     [:_parent_id "text"]
                     [:_version "uuid"])
    (pg/create-index db dataset table "_id")))

(defn- gs-collection-attributes [{:keys [db dataset]} collection]
  (let [table collection
