Extracting attnums from targetlist via strcmp... Does not throw any error on failure!
Created by: Piiit
Make this code more stable!
foreach(l, qry->targetList)
{
TargetEntry *tle = (TargetEntry *) lfirst(l);
if(!tle->resname)
continue;
if (strcmp(tle->resname, ts) == 0)
tc->attNumTs = tle->resno;
else if (strcmp(tle->resname, te) == 0)
tc->attNumTe = tle->resno;
else if (t && strcmp(tle->resname, t) == 0)
tc->attNumRangeT = tle->resno;
}
//PEMOSER TODO Check if all needed information was extracted from targetlist