Re: contrib/sql with postgresql, problem inserting into column of type date

2009-01-08 Thread ssecorp
I don't understand how to use it, can you post an example? I have tried everything and have gotten it to work under circumstances I'm not sure of. However it doesn't work now. (ns progs.netflix.parsing (:require (progs.netflix [pg :as pg])) (:import (java.sql Date))) (load-file "C:/cloj

Re: contrib/sql with postgresql, problem inserting into column of type date

2009-01-07 Thread Stuart Halloway
The sample code for the book now includes a clojure.contrib.sql example with date handling that may be helpful [1]. I tested with HSQLDB, please let me know if it doesn't work with postgresql. Cheers, Stuart [1] http://github.com/stuarthalloway/programming-clojure/tree/master/examples/snipp

contrib/sql with postgresql, problem inserting into column of type date

2009-01-07 Thread ssecorp
(defn inse [] (sql/with-connection db (sql/transaction (insert-rows :r [[1 2 "date '2008-12-03'" 3]]))) nil) I have tried all kinds of variations. it works perfectly with another table, like (int,int,int,int) and passing [1,2,3,4] so it is the type of column 3 that is the problem. "