code: function parse_predicate_pgcast(ObjType, document_type, key) {
  	var pgtype = parse_predicate_pgtype(ObjType, document_type, key);
  	return parse_predicate_pgcast_by_type(pgtype);
  }
docs: Returns the correct cast from JSON to PostgreSQL type