From: Michael Paquier Date: Tue, 2 Oct 2018 07:37:16 +0000 (+0900) Subject: Fix documentation of pgrowlocks using "lock_type" instead of "modes" X-Git-Tag: REL9_3_25~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b2fb124d1d998b159a2f891c15fe12f6372e5ed;p=thirdparty%2Fpostgresql.git Fix documentation of pgrowlocks using "lock_type" instead of "modes" The example used in the documentation is outdated as well. This is an oversight from 0ac5ad5, which bumped up pgrowlocks but forgot some bits of the documentation. Reported-by: Chris Wilson Discussion: https://postgr.es/m/153838692816.2950.12001142346234155699@wrigleys.postgresql.org Backpatch-through: 9.3 --- diff --git a/doc/src/sgml/pgrowlocks.sgml b/doc/src/sgml/pgrowlocks.sgml index 3e3e57f356a..4bf0aa1fdba 100644 --- a/doc/src/sgml/pgrowlocks.sgml +++ b/doc/src/sgml/pgrowlocks.sgml @@ -63,7 +63,7 @@ pgrowlocks(text) returns setof record Transaction IDs of lockers (more than one if multitransaction) - lock_type + modes text[] Lock mode of lockers (more than one if multitransaction), an array of Key Share, Share, @@ -121,14 +121,14 @@ SELECT * FROM accounts AS a, pgrowlocks('accounts') AS p Sample Output - -test=# SELECT * FROM pgrowlocks('t1'); - locked_row | lock_type | locker | multi | xids | pids -------------+-----------+--------+-------+-----------+--------------- - (0,1) | Shared | 19 | t | {804,805} | {29066,29068} - (0,2) | Shared | 19 | t | {804,805} | {29066,29068} - (0,3) | Exclusive | 804 | f | {804} | {29066} - (0,4) | Exclusive | 804 | f | {804} | {29066} + +=# SELECT * FROM pgrowlocks('t1'); + locked_row | locker | multi | xids | modes | pids +------------+--------+-------+-------+----------------+-------- + (0,1) | 609 | f | {609} | {"For Share"} | {3161} + (0,2) | 609 | f | {609} | {"For Share"} | {3161} + (0,3) | 607 | f | {607} | {"For Update"} | {3107} + (0,4) | 607 | f | {607} | {"For Update"} | {3107} (4 rows)