Hacker News new | ask | show | jobs
by headgasket 4143 days ago
(accidentally posted this to the root of the story)

Postgresql 9.4 with jsonb sends mongo to the dustbin, IMHO. If you have to write it in js close to the data or if plpgsql is too steep of a learning curve, you can play with the experimental plv8. But you should really pick up plpgsql, it's "python" powerful, with the an awesome db (and has a python 2.x consistent API, sadly, but the doc is very good) There is a great sublime 2.0 package that makes the writing and debugging of functions in one file just awesome. Write an uncalled dumb function that has a lot of the API in it at the top of your file, and you'll get autocomplete on this part of the API. Specifically no not miss getting acquainted with json and hstore, specifically using json as a variable size argument passing and returning mechanism, it's just hilariously effective. cheers, and keep making this place(not only HN, our blue dot) better, F

1 comments

It sounds like you are talking about plpython rather than plpgsql.
sorry for the confusion, no I'm really referring to plpgsql, it's quite a powerful language; the APIs for the essential extensions such as hstore, and integrated types such as json, array, strings etc have evolved over several years, so they lack a little consistency in naming conventions, something python2.0 also has IMHO. plpython is quite cool too, but using that or js with plv8 IMHO obscures some of the power of the underlying db server.