Given an arbitrary SELECT in a parse tree that has been 
resolved via sqlite3SelectResolve, and assuming that 
Expr.op==TK_COLUMN does Expr.iTable always yield the 
correct index into the Expr.pTab array in the same Expr 
struct?

i.e., is this valid?

 // assume Select.pEList->a[c].pExpr->op == TK_COLUMN
 Select.pSrc->a[Select.pEList->a[c].pExpr->iTable]

Or must I perform a for loop over Select.pSrc->a[i] to find
the matching iCursor for the given 
Select.pEList->a[c].pExpr->iTable?

Basically, I'm trying to find out which table in the FROM
clause's SrcList belongs to which pEList expression element.

On a related topic, do you forsee any problem with recursively
descending the entire parse tree and calling sqlite3SelectResolve()
on every Select prior to any code generation? This would greatly
simplify my AST manipulation code.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to