Maybe this is a dumb beginner question, but I cannot find an answer anywhere. Everywhere I read about the Transaction Isolation which solves the visibility of data within the concurrent transactions. My concern is the behavior within a single transaction.
If I start a transaction, insert some data, am I going to be able to select them right after - still within the same, yet uncommitted, transaction? If yes, can this behavior be changed in a similar way like the mentioned Transaction Isolation in the case of concurrent transactions?
To be specific, I'm targetting PostgreSQL 9.4.
UPDATEin transaction X locks the row, so transaction Z has to wait till X commits / rolls back. And X can rely on seeing what it did earlier in the same transaction. That is true for defaultREAD_COMMITTEDor stricter. – Erwin Brandstetter Feb 14 '23 at 21:35