Expand description
SQL bit-string input, length constraints and output over Core’s packed values.
Enums§
- BitString
Kind - Fixed and varying declarations share a value representation, but have different input and assignment constraints.
Functions§
- coerce_
with_ control - Apply assignment or explicit-cast length semantics without changing the borrowed source or allocating an unpacked temporary.
- from_
integer_ with_ control - Convert an int4 or int8 value already checked by the caller’s integer-type owner. A widened int4 has the same sign-extension and low-bit behavior as int8.
- from_
packed_ with_ control - Copy network-order packed input, discarding unused low padding bits as
PostgreSQL’s binary input does. The span contains exactly the bytes needed for the logical length. - input_
with_ control - Interpret binary or hexadecimal input. An input function checks the declared length before inspecting digits; explicit casts apply their modifier after unconstrained input instead.
- output_
with_ control - Emit exactly the logical bits, preserving leading zeroes and partial final bytes under the invoking output allowance.
- to_
bigint - Interpret at most 64 bits as int8. The fixed upper bound requires no traversal scratch or retained allocation.
- to_
integer - Interpret at most 32 bits as int4. Shorter inputs are unsigned; the full width preserves its sign bit.