FIX postgres can filter on non text fields

Filtering non text fields in postgres would cause the SQL to fail. This
casts the field to text before the LIKE filter.