docs: function pg_create_index_query_internal_v1(self, ObjType, type, field, typefield, is_unique) {
  	var query;
  	var pgcast = parse_predicate_pgcast(ObjType, type, field);
  	var colname = _parse_predicate_key(ObjType, {'epoch':false}, field);
  	var name = pg_create_index_name(self, ObjType, type, field, typefield);
  	query = "CREATE " + (is_unique?'UNIQUE ':'') + "INDEX "+name+" ON " + (ObjType.meta.table) + " USING btree ";
  	if( (ObjType === NoPg.Document) && (typefield !== undefined)) {
  		if(!typefield) {
  			throw new TypeError("No typefield set for NoPg.Document!");
  		}
  		query += "(" + typefield+", "+ wrap_casts(pgcast(colname.getString())) + ")";
  	} else {
  		query += "(" + wrap_casts(pgcast(colname.getString())) + ")";
  	}
  	return query;
  }