4

Why does null and true evaluate to null in PostgreSQL but null or true evaluates to true?

I would have thought using null with and or or would've evaluated to null in both cases?

1
  • OR is defined that if either side is true the expression evaluates to true.
  • AND is defined such that if both sides are true boolean-3VL context, the expression evaluates to true;
  • null is not true.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.