(ERROR: invalid input syntax for type integer: "" LINE 1: ...tag_id IN (SELECT id FROM tags WHERE equipo_id = '') ORDER ... ^)