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

Depending on at which point these transactions are started and committed and the isolation level of the transaction this would either result in {"a": 1, "b", 22}, failure at step 3, failure at step 4 or failure when one of the transactions is committed. However, since locks are on row level rather than on value (cell) level, this would be the same even if these values were stored separately in ordinary column types.

You could still achieve what you want by using read committed transaction isolation and keeping your values in separate rows, e.g. a row with a/1 and a second row with b/2. But basically you would need a separate record for every property in your object graph that you want this behaviour to apply to, which could get pretty messy. Does that make sense to you?



I think you are answering a different question. He's asking if you can update part of a json column.


I don’t think so? I mean that’s how his question started out but his real question was in the last two paragraphs.




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

Search: