36.3. Visibility of Data Changes

If you are using the SPI interface to execute SQL commands in your trigger functions written in C (or you are using a different language and execute SQL commands in some way, which internally goes through SPI as well), be sure to read Section 37.4 so that you know which data is visible at which point during the execution of a trigger. For triggers, the most important consequences of the data visibility rules are:

The next section contains a demonstration of these rules applied.