Thanks Pierre-Nicolas Rigal for the report.
Regression in c67ea79aa981ae82595d89f8018a41fcd842e7c9.
Backport of 9cc0d7f7f85cecc3ad15bbc471fe6a08e4f515b6 from main
By using `select_related(None)` instead of `select_related()`, the
unnecessary joins are completely avoided. Note that the current tests
already covers the change, when the field is not `null=True`.
Regression in f9936deed1ff13b20e18bd9ca2b0750b52706b6c.
Backport of 517d3bb4dd17e9c51690c98d747b86a0ed8b2fbf from main
The __isnull lookup of JSONField must special case
Value(None, JSONField()) left-hand-side in order to be coherent with
its convoluted null handling.
Since psycopg>=3 offers no way to pass a NULL::jsonb the issue is
resolved by optimizing IsNull(Value(None), True | False) to
True | False.
Regression in 5c23d9f0c32f166c81ecb6f3f01d5077a6084318.
Thanks Alexandre Collet for the report.
Backport of 3434dbd39d373df7193ad006b970c09c1a909ea3 from main