Re: On query rewrite

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Sailesh Krishnamurthy <sailesh(at)cs(dot)berkeley(dot)edu>
Cc: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: On query rewrite
Date: 2004-05-28 16:23:45
Message-ID: 20040528162345.GA31689@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 27, 2004 at 19:35:56 -0700,
Sailesh Krishnamurthy <sailesh(at)cs(dot)berkeley(dot)edu> wrote:
>
> Another question about regular RULE processing .. suppose after
> applying a rule the resultant query tree is eligible for another rule,
> does pgsql's rule system keep iterating over and over until it reaches
> a fixed point or is there some heuristic in operation (just apply the
> rules twice ..) ? From my cursory inspection of the code it looks like
> the latter, but I'd like to know for sure.

Rule processing continues as long as there are rules to apply or the
query is terminated.

You might want to read up on rules in the documentation. They are the
mechanism used to make updateable views and can do some other interesting
things. And because they are fully visible to the optimizer (unlike
triggers) they don't prevent optimization.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andreas Pflug 2004-05-28 16:29:48 Re: tablespaces and DB administration
Previous Message Matthew T. O'Connor 2004-05-28 16:18:10 Re: Win32, PITR, nested transactions, tablespaces