Hello all I have been studying the rule system in Postgres. I understand that the original query tree is the input at the rewrite, and then this query tree is modified by the rewrite in case that there is a rule.
SQL query ----> Parser ----> Rewrite ----> Planner ----> Executor ^^^^ ^^^^ Query New Query tree tree I would like to know how the rewrite detects that a rule in a table exists, and if it possible you indicate me where in the source code it's implemented. Any comments are welcome, thanks in advance. Juan P. Espino ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster