4 ms·
Except you can have objects in Postgres via jsonb; there's no trade off and you're both future and vendor proofed.
by cpursley 3y ago
Except you can have objects in Postgres via jsonb; there's no trade off and you're both future and vendor proofed.
- winrid 3y agoYeah, there is. PG has its own warts that Mongo does not have. Also the JSONB query language sucks. See appending an array in PG [0] vs Mongo [1]. Also PG does not provide a way to atomically append to the array, you have to lock the row via SELECT ... FOR UPDATE. Mongo's $push, $set, etc, are atomic. [0] https://pastebin.com/v2MiV8PE https://pastebin.com/v2MiV8PE [1] https://pastebin.com/RmLuGzAY https://pastebin.com/RmLuGzAY