Discussion:
parameter to control cycle detection
(too old to reply)
Coby Beck
2004-04-07 23:41:15 UTC
Permalink
Hi,

I get the following error trying to update a view:

"ERROR: query rewritten 10 times, may contain cycles"

and it doesn't. There is a function in there legitimately called 10 times
with the same parameters. 10 seems a little low to panic about, is this
configurable? The rule code is generated programmatically so for now at
least I would like to avoid having to find a general solution for the sake
of an optimization I may not need and it is not an option to hand tweak this
one problem rule.

Can I set this 10 parameter higher somewhere?

TIA.

Coby Beck

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.639 / Virus Database: 408 - Release Date: 22/03/2004


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ***@postgresql.org
Tom Lane
2004-04-09 04:22:53 UTC
Permalink
Post by Coby Beck
"ERROR: query rewritten 10 times, may contain cycles"
Update to something newer. The default limit is 100 in 7.3, and the
whole thing is gone in favor of *real* loop detection in 7.4 ...

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html
Coby Beck
2004-04-09 06:14:04 UTC
Permalink
Post by Tom Lane
Post by Coby Beck
"ERROR: query rewritten 10 times, may contain cycles"
Update to something newer. The default limit is 100 in 7.3, and the
whole thing is gone in favor of *real* loop detection in 7.4 ...
Thanks for the reply, Tom. Upgrading is on the TODO list for sure. In the
meantime, is there not a way to change the default?

Coby

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.639 / Virus Database: 408 - Release Date: 22/03/2004


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html
Tom Lane
2004-04-09 12:44:26 UTC
Permalink
Post by Coby Beck
Thanks for the reply, Tom. Upgrading is on the TODO list for sure. In the
meantime, is there not a way to change the default?
Not without recompiling. IIRC it's a #define in
backend/rewriter/rewriteHandler.c.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Loading...