Postgres Add Constraint Not Null Sql Function Between Dates