postgresql7.1
select CASE WHEN (timestamp :date > now()) = 't'
THEN 1
ELSE 0
END
select CASE WHEN (timestamp :end_date > timestamp :start_date) = 't'
THEN 1
ELSE 0
END
select CASE WHEN ((now() + interval :future_years) > timestamp :start_date) = 't'
THEN 1
ELSE 0
END