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:
@ -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) << 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,
|
||||||
|
Reference in New Issue
Block a user