I'm not sure if PostgreSQL provides such a feature, but the closest I can relate it is to generated columns where you can put the expression to be evaluated. It doesn't allow variables but you can use other columns in expresssion - https://www.postgresql.org/docs/12/ddl-generated-columns.html
Can we use variables in any column and then have (Boolean) constraints over the variables?
Eg. x as a variable value and then corresponding condition (x ≠ 5 || x ≠ 10).
So that this condition is satisfied when queried with values of column (with variable x) other than the above two and the condition converts to actual constant values, and returns tuples with that actual value.
Is there any existing feature that enables the use of conditional tables on PostGreSQL, specifically the usage of variables, and implementing those variables in our (complex) queries?