ERROR: syntax error at or near ")" LINE 7: ...d = '1') AND (co.foreign_type = 'P') AND (cat_id IN ()) AND ^