1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Fix rewrite code so that rules are in fact executed in order by name,

rather than being reordered according to INSTEAD attribute for
implementation convenience.
Also, increase compiled-in recursion depth limit from 10 to 100 rewrite
cycles.  10 seems pretty marginal for situations where multiple rules
exist for the same query.  There was a complaint about this recently,
so I'm going to bump it up.  (Perhaps we should make the limit a GUC
parameter, but that's too close to being a new feature to do in beta.)
This commit is contained in:
Tom Lane
2002-10-19 19:00:47 +00:00
parent 757b98fda8
commit c1f91a38e2
4 changed files with 109 additions and 143 deletions

View File

@ -1,4 +1,4 @@
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/rules.sgml,v 1.25 2002/10/14 22:14:34 tgl Exp $ -->
<!-- $Header: /cvsroot/pgsql/doc/src/sgml/rules.sgml,v 1.26 2002/10/19 19:00:47 tgl Exp $ -->
<Chapter Id="rules">
<Title>The Rule System</Title>
@ -1043,8 +1043,8 @@ CREATE RULE rule_name AS ON event
in more or less parse trees.
So the parse trees in the rule actions must have either another command type
or another result relation. Otherwise this recursive process will end up in a loop.
There is a compiled in recursion limit of currently 10 iterations.
If after 10 iterations there are still update rules to apply the
There is a compiled-in recursion limit of currently 100 iterations.
If after 100 iterations there are still update rules to apply the
rule system assumes a loop over multiple rule definitions and reports
an error.
</Para>