Given that PostgreSQL gives no guarantees as to the order in which operands are evaluated, could this expression return UNKNOWN if the last condition is evaluated before the middle one?
"TradeOffer".status = 'Pending' AND
"TradeOffer".expiration_date IS NOT NULL AND
CURRENT_TIMESTAMP > "TradeOffer".expiration_date
2
Answers
No, because
select false and null;
returnsfalse
.Or, in the
where
,select 1 where false and null;
returns nothing (the where condition is still false)Youu could rewrite your query, to make it deterministic again
fiddle