Vegard Munthe <vegard@copyleft.no> writes:
> I have a RULE that does 18 rewrites. This is a RULE that saves me alot of
> work when rewriting some software, but the RULE always fails since PGSQL
> seems tp think 10 or more rewrites constitutes a loop.
> "ERROR: query rewritten 10 times, may contain cycles"
> Is there any way I can set the rewrite limit to more than 10, say 100,
> which would be more of a safeguard number for loops?
Well, you could alter the value by hand in src/backend/rewrite/rewriteHandler.c
... or you could upgrade to 7.3, wherein the default limit is 100.
regards, tom lane