Understanding Rule System - Mailing list pgsql-hackers

From Juan Pablo Espino
Subject Understanding Rule System
Date
Msg-id 3e7daec10505111410123df1d7@mail.gmail.com
Whole thread Raw
Responses Re: Understanding Rule System
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: "Jim C. Nasby"
Date:
Subject: Re: Oracle Style packages on postgres
Next
From: Josh Berkus
Date:
Subject: Re: Server instrumentation for 8.1