Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 83B5C9F9872 for ; Mon, 5 Nov 2007 01:49:39 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 72097-04 for ; Mon, 5 Nov 2007 01:49:35 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from smtp4.clear.net.nz (smtp4.clear.net.nz [203.97.37.64]) by postgresql.org (Postfix) with ESMTP id 68E9E9F9271 for ; Mon, 5 Nov 2007 01:49:35 -0400 (AST) Received: from zmori.markir.net (121-72-80-151.dsl.telstraclear.net [121.72.80.151]) by smtp4.clear.net.nz (CLEAR Net Mail) with ESMTP id <0JR0003WBQULXI20@smtp4.clear.net.nz> for pgsql-performance@postgresql.org; Mon, 05 Nov 2007 18:49:33 +1300 (NZDT) Date: Mon, 05 Nov 2007 18:49:26 +1300 From: Mark Kirkwood Subject: Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1 In-reply-to: <87zly1as4y.fsf@oxford.xeocode.com> To: Gregory Stark Cc: Luke Lonergan , Heikki Linnakangas , Anton , pgsql-performance@postgresql.org Message-id: <472EAEE6.2090000@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit References: <4726C52E.5020909@paradise.net.nz> <87zly1as4y.fsf@oxford.xeocode.com> User-Agent: Thunderbird 2.0.0.6 (X11/20071025) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/54 X-Sequence-Number: 27469 Gregory Stark wrote: > cdbpathlocus_pull_above_projection > > > In particular this is the function I was hoping to see. Anyways as Tom pointed > out previously there's precedent in Postgres as well for subqueries so I'm > sure I'll be able to do it. > > (But I'm still not entirely convinced putting the append member vars into the > eclasses would be wrong btw...) > > I spent today looking at getting this patch into a self contained state. Working against HEAD I'm getting bogged down in the PathKeyItem to PathKey/EquivalenceClass/EquivalenceMember(s) change. So I figured I'd divide and conquer to some extent, and initially provide a patch: - against 8.2.(5) - self contained (i.e no mystery functions) The next step would be to update to to HEAD. That would hopefully provide some useful material for others working on this. Thoughts suggestions? regards Mark