Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 7E89E9FBFBF for ; Tue, 30 Oct 2007 06:06:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 98194-01 for ; Tue, 30 Oct 2007 06:06:31 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from oxford.xeocode.com (unknown [87.127.95.196]) by postgresql.org (Postfix) with ESMTP id C61AD9FA283 for ; Tue, 30 Oct 2007 06:06:27 -0300 (ADT) Received: from localhost ([127.0.0.1] helo=oxford.xeocode.com) by oxford.xeocode.com with esmtp (Exim 4.67) (envelope-from ) id 1Imn3G-0006yB-Ae; Tue, 30 Oct 2007 09:06:22 +0000 To: "Mark Kirkwood" Cc: "Luke Lonergan" , "Heikki Linnakangas" , "Anton" , Subject: Re: partitioned table and ORDER BY indexed_field DESC LIMIT 1 In-Reply-To: <4726C52E.5020909@paradise.net.nz> (Mark Kirkwood's message of "Tue\, 30 Oct 2007 18\:46\:22 +1300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Draft-From: ("nnimap+mail01.enterprisedb.com:INBOX" 45579) References: <4726C52E.5020909@paradise.net.nz> From: Gregory Stark Organization: EnterpriseDB Date: Tue, 30 Oct 2007 09:06:21 +0000 Message-ID: <87zly1as4y.fsf@oxford.xeocode.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/353 X-Sequence-Number: 27375 "Mark Kirkwood" writes: > Luke Lonergan wrote: >> Sure - it's here: >> http://momjian.us/mhonarc/patches_hold/msg00381.html > > To clarify - we've fixed this in Greenplum db - the patch as submitted is > (hopefully) a hint about how to fix it in Postgres, rather than a working > patch... as its full of non-postgres functions and macros: Oh, that was the problem with the original patch and I thought Luke had said that was the problem which was fixed. > 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...) -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning