File/db-postgres.php

Description
Functions
lockrows_exclusive (line 388)

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.

void lockrows_exclusive (string $tablelist)
  • string $tablelist: List of tables to lock, comma-delimited
lockrows_share (line 370)

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.

void lockrows_share (string $tablelist)
  • string $tablelist: List of tables to lock, comma-delimited
locktable_exclusive (line 422)

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.

void locktable_exclusive (string $tablelist)
  • string $tablelist: List of tables to lock, comma-delimited
locktable_share (line 406)

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.

void locktable_share (string $tablelist)
  • string $tablelist: List of tables to lock, comma-delimited

Documentation generated by phpDocumentor 1.3.0RC3