Error in query: ERROR: syntax error at or near "ACTIVE" LINE 1: ...Sauvignon, Merlot%) AND (catalogue_item.status = 'ACTIVE' OR... ^