Fix filtering on year for Postgres.