Fix filtering by tag for PostgreSQL.