This page in other versions: 9.0 / 9.1 / 9.2 / 9.3 / 9.4  |  Development versions: devel  |  Unsupported versions: 7.1 / 7.2 / 7.3 / 7.4 / 8.0 / 8.1 / 8.2 / 8.3 / 8.4

41.4. Visibility of Data Changes

The following two rules govern the visibility of data changes in functions that use SPI (or any other C function):

  • During the execution of an SQL command, any data changes made by the command (or by function called by the command, including trigger functions) are invisible to the command. For example, in command

    INSERT INTO a SELECT * FROM a;
    

    the inserted rows are invisible to the SELECT part.

  • Changes made by a command C are visible to all commands that are started after C, no matter whether they are started inside C (during the execution of C) or after C is done.

The next section contains an example that illustrates the application of these rules.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group