On 11/20/2012 08:15 PM, Craig Ringer wrote:
I think it's time to admit that and get the syntax in place for CTEs so there's room to optimize them later, rather than cementing CTEs-as-fences in forever as a Pg quirk.
I know I'm just some schmo, but I'd vote for this. I'm certainly guilty of using OFFSET 0. Undocumented hints are still hints. As much as I think they're a bad idea by cementing a certain plan that may not get the benefits of future versions, non-intuitive side-effects by using overloaded syntax are worse.
I've been using CTEs as temp tables because I know that's how they work. But I'd be more than willing to modify my syntax one way or the other to adopt non-materialized CTEs, provided there's some way to get the current behavior.
-- Shaun Thomas OptionsHouse | 141 W. Jackson Blvd. | Suite 500 | Chicago IL, 60604 312-444-8534 sthomas@xxxxxxxxxxxxxxxx ______________________________________________ See http://www.peak6.com/email_disclaimer/ for terms and conditions related to this email -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance