4 ms·
You can, you just need to use savepoints.
by anarazel 2y ago
You can, you just need to use savepoints.
- zokier 2y agoYeah the error handling is a side-note here. The main thing to understand is that postgresql transactions have "read committed" isolation level by default, which means that reads will see the writes from any committed other transactions, which means that there can be arbitrary changes to data between operations, e.g. between insert and select, even if no errors or conflicts are involved. This is pretty much what the sample I posted in parent comment demonstrates.