Thu Mar 24 17:25:48 CET 2005 ---------------------------- This module and associated pl/pgsql functions have been implemented to provide long locking support required by Web Feature Service specification (https://portal.opengeospatial.org/files/?artifact_id=7176) It is based on original work by David Blasby and has been modified and packaged by Sandro Santilli . Usage: -- Check updates and deletes of rows in -- given table for being authorized. -- Identify rows using value. SELECT CheckAuth([], , ) -- Set lock/authorization for specific row in table -- is a text value, is a timestamp -- defaulting to now()+1hour. -- Returns 1 if lock has been assigned, 0 otherwise -- (already locked by other auth) SELECT LockRow([],
, , , []) -- Remove all locks held by specified authorization id. -- Returns the number of locks released. SELECT UnlockRows() -- Add an authorization token to be used in current -- transaction. SELECT AddAuth() WARNING! users must use serializable transaction level (see http://www.postgresql.org/docs/7.4/static/transaction-iso.html) otherwise locking mechanism would break --strk;