This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-23
Channels
- # adventofcode (92)
- # beginners (12)
- # boot (3)
- # boot-dev (38)
- # cider (9)
- # clara (26)
- # cljs-dev (26)
- # cljsrn (3)
- # clojars (3)
- # clojure (48)
- # clojure-france (6)
- # clojure-greece (2)
- # clojure-spec (3)
- # clojurescript (7)
- # datomic (3)
- # fulcro (6)
- # hoplon (19)
- # jobs-discuss (1)
- # leiningen (4)
- # lumo (9)
- # off-topic (8)
- # onyx (43)
- # planck (10)
- # powderkeg (4)
- # precept (44)
- # re-frame (4)
- # shadow-cljs (4)
- # sql (13)
- # uncomplicate (1)
- # unrepl (3)
what does this error mean: org.postgresql.util.PSQLException: This ResultSet is closed.
? I’m trying to just do a basic insert…querying the database works fine, and inserting the value via psql….is this another jdbc sensitivity toward subqueries (one of the fields has a default value of now()
:P)
my first suspicion is that you used a lazy function on the db results, and the value wasn't forced until the resultset was closed
that classic io inside laziness problem
Maybe, this is the function I’m using right now
(defn ^:private add-rule [req]
(j/insert-multi! (:db conf) :rule [{:team_id 1 :league_id 1 :season_start "2017-12-24" :season_end "2018-12-24"}])
(common/body-for-404)
)
it doesn't seem like anything lazy would be done with that resultset - in fact it doesn't look like anything would bedone with it at all
yeah that was my first thought was maybe I was doing something wrong with the result, so im just trying to do the insert without the result at all
weird…i made a table that is just those four columns + a primary key (bigserial) and i’m still getting that error
that error should mean that the result set is being closed prematurely before being consumed