Lock table in ROW EXCLUSIVE MODE
Lock rows in exclusive mode. This is automatically acquired by UPDATE, DELETE or INSERT queries, so if you used lockrows_share() then no further locking is needed if you then perform an UPDATE. Updated rows will remain exclusive locked until the end of the transaction.
Lock table in ROW SHARE MODE
Reserve table rows for possible future updates, when the lock will be upgraded to an exclusive lock. This allows others to share lock the records too, but not exclusively lock them. The query SELECT...FOR UPDATE does this. You will only be locking the records that you select from the table, and no others.
Lock table in EXCLUSIVE MODE Locks the whole table exclusively. This is very restrictive and prevents any other process getting a share lock on the records (any of them) in the table.
Lock table in SHARE MODE Holds the whole table in share lock mode. This makes sure that no exclusive locks can be acquired and so holds the data in the table constant for the transaction.
Useful if you need to rely on table data remaining constant for a transaction span.
Documentation generated by phpDocumentor 1.3.0RC3