On 11/22/2012 08:38 AM, Gavin Flower wrote: > I suspect most people are blissfully unaware of CTE's being fenced, or > at least not really sure what it means. So I suspect NOT FENCE would > be the better default. It's also probably more standard, and a better fit with what other DBs do. Pg would still need to detect conditions like the use of functions with side effects or (obviously) INSERT/UPDATE/DELETE wCTEs and not push conditions down into them / pull conditions up from them, etc. That's how I read the standard, though; must have the same effect as if the queries were executed as written, so Pg is free to transform them so long as it doesn't change the results. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance