pgrx
pgrx copied to clipboard
Textual references to "null" should be unambiguous
There are four different kinds of "null" in PGX:
The SQL Null type.
The pointer to NULL (0x0 on most machines, but sometimes also usize::MAX).
The null byte aka \0.
is_null boolean markers.
These all have wildly different implications.
PGX should not, in source or documentation, use the term "null" unqualified. Anywhere. Ever.
Postgres also has the concept of a "nullbitmap" and indices into it, which work like the is_null: [bool] periodically witnessed elsewhere, except bitpacked.
- Support for one case of this was added in https://github.com/tcdi/pgx/pull/662
Also see:
- https://github.com/tcdi/pgx/issues/792