Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

One viable option:

    CREATE TABLE mongodb (
        key VARCHAR(256) PRIMARY KEY,
        value JSON
    );


I'd use a uuid for the key.

Also, see https://github.com/umitanuki/mongres

Postgresql speaking the mongodb protocol.


from the github page mentioned above:

    This is currently a prototype. The following operations are supported.

    db.collection.find()
    db.collection.insert()
Two methods only, well, that's too little.


I think you're onto something here.


Mongo (and other document stores) let you do pretty complex querying within JSON objects. Postgres unfortunately doesn't let you do so; that's really the only thing keeping me with Mongo at the moment.


It does with plv8. Just like in mongodb, you get to write javascript functions and use them for queries.

https://postgres.heroku.com/blog/past/2013/6/5/javascript_in...

I don't know how stable/performant it is (I've never needed to use it), however...


Postgresql 9.3 added json functions.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: