Fork me on GitHub
#sql
<
2019-06-07
>
asier14:06:59

Hi All, I am trying to insert JSON object into postgres as follows:

asier14:06:36

I get this nice error message:

mpenet14:06:14

you need to wrap the json into a PGObject and set the type on it

mpenet14:06:43

something like

(doto (PGobject.)
    (.setType "jsonb")
    (.setValue (json/generate-string x)))

asier15:06:09

it worked!

fabrao20:06:24

Hello all,

fabrao20:06:37

I want to execute this

DECLARE @value int
SET @value = 1
WHILE 1=1
BEGIN
SET @value = @value
END
and leave it running if I execute it in unit test, it will block the execution for the rest of test so, I want to execute it async without leave thread executing, only in database If I use in thread, I´ll kill both if stop thread it´s kind of execute and forget it Is that possible?