1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Document how to create advisory lock "bigint" values in SQL.

David E. Wheeler
This commit is contained in:
Bruce Momjian
2012-08-27 22:36:37 -04:00
parent 7417a8e3dd
commit bf849af7f3

View File

@ -7412,7 +7412,10 @@
A <type>bigint</type> key is displayed with its A <type>bigint</type> key is displayed with its
high-order half in the <structfield>classid</> column, its low-order half high-order half in the <structfield>classid</> column, its low-order half
in the <structfield>objid</> column, and <structfield>objsubid</> equal in the <structfield>objid</> column, and <structfield>objsubid</> equal
to 1. Integer keys are displayed with the first key in the to 1. The original <type>bigint</type> value can be reassembled with the
expression <literal>(classid::int::bit(64) &lt;&lt; 32 |
objid::int::bit(64))::bigint</literal>. Integer keys are displayed with the
first key in the
<structfield>classid</> column, the second key in the <structfield>objid</> <structfield>classid</> column, the second key in the <structfield>objid</>
column, and <structfield>objsubid</> equal to 2. The actual meaning of column, and <structfield>objsubid</> equal to 2. The actual meaning of
the keys is up to the user. Advisory locks are local to each database, the keys is up to the user. Advisory locks are local to each database,