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