get_bit ( bytes bytea, n bigint ) → integer → integerExtracts n'th bit from binary string.
get_bit
Extracts n'th bit from binary string.
English manual coverage begins with PostgreSQL 7.1. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
- group
- binarystring
- group label
- Binary String Functions And Operators
- lang
- en
- layout
- table-new
- pages
- functions-binarystring.html, functions-bitstring.html
- prose only
- false
Definition PG 18
Extracts n'th bit from binary string.
Signatures and overloads
get_bit ( bits bit, n integer ) → integer → integerExtracts
n'th bit from bit string; the first (leftmost) bit is bit 0.Compare versions
Source references
Full definition and evidence JSON
Definition sources
center · PostgreSQL 18 · wiki-repair-20261023:c5b10b4a89e96ae1b871ee4fb1932a5cf2c34270016ff30e593e80d2c892aeb9
Text language: en · wiki-repair-20261023:c5b10b4a89e96ae1b871ee4fb1932a5cf2c34270016ff30e593e80d2c892aeb9