2011-02-14 09:06:41 +08:00
|
|
|
/* contrib/pgrowlocks/pgrowlocks--1.0.sql */
|
2006-04-23 09:12:58 +08:00
|
|
|
|
2011-10-13 03:45:03 +08:00
|
|
|
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
|
|
|
|
\echo Use "CREATE EXTENSION pgrowlocks" to load this file. \quit
|
|
|
|
|
2011-02-14 10:24:14 +08:00
|
|
|
CREATE FUNCTION pgrowlocks(IN relname text,
|
2007-08-27 08:13:51 +08:00
|
|
|
OUT locked_row TID, -- row TID
|
|
|
|
OUT lock_type TEXT, -- lock type
|
|
|
|
OUT locker XID, -- locking XID
|
|
|
|
OUT multi bool, -- multi XID?
|
|
|
|
OUT xids xid[], -- multi XIDs
|
|
|
|
OUT pids INTEGER[]) -- locker's process id
|
|
|
|
RETURNS SETOF record
|
2006-04-23 09:12:58 +08:00
|
|
|
AS 'MODULE_PATHNAME', 'pgrowlocks'
|
2007-08-27 08:13:51 +08:00
|
|
|
LANGUAGE C STRICT;
|