Retrieves a snapshot of the database at the moment the read-only
transaction starts. Other users can update rows in the table
you are using, but your transaction retrieves the rows as they
existed at the time the transaction started. You cannot update,
insert, or delete rows, or execute data definition statements
in a read-only transaction with the exception of declaring a
local temporary table or modifying data in a created or declared
temporary table. Read-only transactions are implicitly isolation
level serializable.
Because a read-only transaction uses the snapshot (.snp) version
of the database, any changes that other users make and commit
during the transaction are invisible to you. Using a read-only
transaction lets you read data without incurring the overhead of
row locking. (You do incur overhead for keeping a snapshot of the
tables you specify in the RESERVING clause, but this overhead is
less than that of a comparable read/write transaction.)
Because of the limited nature of read-only transactions, they are
subject to several restrictions.