Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group