sqliteDequote(aCol[i].zName);
Table *sqliteResultSetOfSelect(Parse *pParse, char *zTabName, Select *pSelect){  Table *pTab;  int i, j;  ExprList *pEList;  Column *aCol;  if( fillInColumnList(pParse, pSelect) ){    return 0;  }  pTab = sqliteMalloc( sizeof(Table) );  if( pTab==0 ){    return 0;  }  pTab->zName = zTabName ? sqliteStrDup(zTabName) : 0;  pEList = pSelect->pEList;  pTab->nCol = pEList->nExpr;  assert( pTab->nCol>0 );  pTab->aCol = aCol = sqliteMalloc( sizeof(pTab->aCol[0])*pTab->nCol );  for(i=0; i<pTab->nCol; i++){    Expr *p, *pR;    if( pEList->a[i].zName ){      aCol[i].zName = sqliteStrDup(pEList->a[i].zName);    }else if( (p=pEList->a[i].pExpr)->op==TK_DOT                && (pR=p->pRight)!=0 && pR->token.z && pR->token.z[0] ){      int cnt;      sqliteSetNString(&aCol[i].zName, pR->token.z, pR->token.n, 0);      for(j=cnt=0; j<i; j++){        if( sqliteStrICmp(aCol[j].zName, aCol[i].zName)==0 ){          int n;          char zBuf[30];          sprintf(zBuf,"_%d",++cnt);          n = strlen(zBuf);          sqliteSetNString(&aCol[i].zName, pR->token.z, pR->token.n, zBuf, n,0);          j = -1;        }      }    }else if( p->span.z && p->span.z[0] ){      sqliteSetNString(&pTab->aCol[i].zName, p->span.z, p->span.n, 0);    }else{      char zBuf[30];      sprintf(zBuf, "column%d", i+1);      pTab->aCol[i].zName = sqliteStrDup(zBuf);    }  }  pTab->iPKey = -1;  return pTab;}