[prev] 55 [next]

PostgreSQL Query Evaluation (cont)

Each query is represented by a Query structure
  • defined in src/include/nodes/parsenodes.h
  • holds all components of the SQL query, including
    • required columns as list of TargetEntrys
    • referenced tables as list of RangeTblEntrys
    • where clause as node in FromExpr struct
    • sorting requirements as list of SortGroupClauses
  • queries may be nested, so forms a tree structure