I have an Oracle query that is structured as followed:
SELECT *
FROM table
WHERE X=\'true\' OR
Y IN (complicated subquery)
<
I came here looking for an answer on how to avoid crashing using short circuit evaluation. What I eventually got working is:
...
where case when [its not going to crash]
then [short circuit expression]
else [safe, never used value]
end = comparison_value
...
So, for example, if you are worried about a to_number expression crashing, you would put something like "REGEXP_LIKE(my_possible_number, '^[[:digit:]]+$')" in the when clause (for positive integers - adjust for non-positive or non-integer).