3 ms·
It depends on the version. More recent releases (that is, >= 9.2) do have native JSON support, but it's still young — though steadily improving.
by rosser 12y ago
It depends on the version. More recent releases (that is, >= 9.2) do have native JSON support, but it's still young — though steadily improving.
- sk5t 12y agoYup, I've done a bit with 9.2, and it accepts JSON just fine (although not with automatic string conversion) but it's a short road to wishing the data were in standard tables and columns.
- dizzystar 12y agoUse dollar-quoting for automatic string conversion: insert into my_table values ($$ json_goes_here $$); Works for all stringy things.
- sk5t 12y agoCool, thanks. Last time around I used a pg-driver-specific datatype to hold the parameter on its way through sql2o, and felt rather guilty about doing so.