 
 (defn- gs-collection-attributes [db dataset collection]
   ;(println "attributes")
-  (let [table (visualization dataset collection)
+  (let [table collection
         columns (pg/table-columns db dataset table)
         no-defaults (filter #(not (some #{(:column_name %)} ["gid"
                                                              "_id"

    attributes))

(defn- gs-add-attribute [db dataset collection attribute-name attribute-type]
  (let [table (visualization dataset collection)]
    (try
      (pg/add-column db dataset table attribute-name attribute-type)
      (catch java.sql.SQLException e


(defn- execute-update-sql [db dataset collection columns update-vals]
  (try
    (let [table collection
          sql (gs-update-sql dataset table (map name columns))]
      (j/execute! db (cons sql update-vals) :multi? true :transaction? false))
    (catch java.sql.SQLException e
      (log/with-logs ['pdok.featured.projectors :error :error] (j/print-sql-exception-chain e)))))
