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

Tom Lane <tgl@sss.pgh.pa.us>

Commit: c1f91a38e20864c14650794a64d52f2d6c900e0f
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2002-10-19T19:00:47Z
Releases: 7.3.1
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.)

Files