3 ms·
Sorry but PostgreSQL's JSON query syntax is insanely complicated compared to MongoDB. And that is a big deal for a lot of developers.
by threeseed 13y ago
Sorry but PostgreSQL's JSON query syntax is insanely complicated compared to MongoDB.
And that is a big deal for a lot of developers.
- tensor 13y agoI just took a look, and if I'm getting this right, it looks about as simple as it gets: SELECT json_data FROM people WHERE json_data->'age' > 15 vs db.people.find( { age: { $gt: 10 } } ) Personally, I prefer the postgres syntax. It's much clearer. I also don't buy your claims below about performance. Can you provide a real benchmark? Are you running with the safeties off meaning you lose data?
- dbcfd 13y agoWhat is the syntax on finding an array value matching some key? E.g. given a user with field "favFoods":[String], how do I determine that pizza is in there?
- jessedhillon 13y agoselect ... where "pizza" in person -> favFoods
- jessedhillon 13y agoSorry I'm stupid, I was thinking Python select ... where person -> favFood in ("pizza")
- gfodor 13y agoYour ORM will give you whatever syntax is natural, eventually.