Re: RULE and more than 10 rewrites. - Mailing list pgsql-general

From Tom Lane
Subject Re: RULE and more than 10 rewrites.
Date
Msg-id 24403.1043271629@sss.pgh.pa.us
Whole thread Raw
In response to RULE and more than 10 rewrites.  (Vegard Munthe <vegard@copyleft.no>)
List pgsql-general
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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgres (psql ?) rounds all odd second values to e ven seconds fo r timestamp(0) data type
Next
From: Björn Metzdorf
Date:
Subject: Re: sort by relevance