get_bit ( bytes bytea, n bigint ) → integerExtracts n'th bit from binary string.
get_bit('\x1234567890'::bytea, 30) → 1Functions / Binary String Functions And Operators
Extracts n'th bit from binary string.
Reading PG 18current·documented in 25 of 27 versions, 7.3 to 20
get_bit ( bytes bytea, n bigint ) → integerExtracts n'th bit from binary string.
get_bit('\x1234567890'::bytea, 30) → 1get_bit ( bits bit, n integer ) → integerExtracts
n'th bit from bit string; the first (leftmost) bit is bit 0.get_bit(B'101010101010101010', 6) → 1
Definition snapshot: b7bd9cda · English manual source