pgrx icon indicating copy to clipboard operation
pgrx copied to clipboard

Textual references to "null" should be unambiguous

Open workingjubilee opened this issue 3 years ago • 1 comments

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.

workingjubilee avatar Aug 12 '22 19:08 workingjubilee

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

workingjubilee avatar Aug 24 '22 22:08 workingjubilee

Also see:

  • https://github.com/tcdi/pgx/issues/792

workingjubilee avatar Oct 26 '22 17:10 workingjubilee