14
Top-down Trace of QOpt
(cont)
pg_analyze_and_rewrite()
take a parse tree (from SQL parser)
transforms Parse tree into Query tree
(SQL → RA)
applies rewriting rules
(e.g. views)
returns a list of Query trees
Code in:
backend/tcop/postgres.c