cast namespace array for postgresql to prevent type missmatch when empty
first cut of search queries for postgresql