4 ms·
So, I love Postgres to death, but I'm a bit let-down by the json and jsonb stuff. It's really great for document storage and retrieval, but the fact that there
by angersock 12y ago
So, I love Postgres to death, but I'm a bit let-down by the json and jsonb stuff.
It's really great for document storage and retrieval, but the fact that there doesn't seem to be any story for partial updates kind of kills it for me. If it just had that, it'd cover every use case I could possibly want (except for maybe some of the Cassandra stuff).
It's annoying, though, because clearly that's what people often may want--just look at Mongo.
- deleted 12y ago[deleted]
- ahachete 12y agoOr ToroDB ;) https://github.com/torodb/torodb https://github.com/torodb/torodb
- deleted 12y ago[deleted]
- munro 12y agoYou can write a function to do partial updates, and it wouldn't be any different than if it was in core. If you're using Amazon RDS they include PLV8 to make it even easier. :D Here's someone building functions for a MongoDB API on top of Postgres 9.2. I'm glad the MongoDB API isn't in core, but they've laid the ground work so you can easily build whatever you want. [1] http://legitimatesounding.com/blog/building_a_mongodb_clone_in_postgres_part_1.html http://legitimatesounding.com/blog/building_a_mongodb_clone_... http://legitimatesounding.com/blog/building_a_mongodb_clone_in_postgres_part_2.html http://legitimatesounding.com/blog/building_a_mongodb_clone_...
- tomiko_nakamura 12y agoPostgreSQL does not have in-place update in the first place, on every UPDATE it does a DELETE+INSERT. So "partial update" does not make much sense, because you'll create a new copy of the row anyway.
- NickNameNick 12y agoThat's not quite how PostgreSQL's Multi-value-Concurrency system works.
- tomiko_nakamura 12y agoMVCC means "Multiversion Concurrency Control" and yes, that's pretty much exactly how it works (creating copies of the rows, so that different snapshots see different rows). In practice it's more complicated of course. A nice intro to MVCC is available here: http://momjian.us/main/writings/pgsql/mvcc.pdf http://momjian.us/main/writings/pgsql/mvcc.pdf (and in the Bruce's other talks http://momjian.us/main/presentations/internals.html http://momjian.us/main/presentations/internals.html). Or maybe you mean something else by Multi-value-Concurrency. In that case please elaborate.