Re: [Proposal] Table partition + join pushdown - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [Proposal] Table partition + join pushdown
Date
Msg-id CA+TgmoY34iR=CuqzAHqbP0WXLNfPi5TKJDvcNhturdd0RFYjrw@mail.gmail.com
Whole thread Raw
In response to Re: [Proposal] Table partition + join pushdown  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: [Proposal] Table partition + join pushdown  (Greg Stark <stark@mit.edu>)
List pgsql-hackers
On Tue, Dec 22, 2015 at 8:36 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Fri, Nov 20, 2015 at 9:05 PM, Taiki Kondo <tai-kondo@yk.jp.nec.com> wrote:
>> I created v3 patch for this feature, and v1 patch for regression tests.
>> Please find attached.
>>
>> [blah review and replies]
>>
>> Please find from attached patch.
>
> This new patch did not actually get a review, moved to next CF.

I think this patch is doomed.  Suppose you join A to B on A.x = B.y.
The existence of a constraint on table A which says CHECK(P(x)) does
not imply that only rows from y where P(y) is true will join.  For
example, suppose that x and y are numeric columns and P(x) is
length(x::text) == 3.  Then you could have 1 in one table and 1.0 in
the table; they join, but P(x) is true for one and false for the
other.  The fundamental problem is that equality according to the join
operator need not mean equality for all purposes.  1 and 1.0, as
numerics, are equal, but not the same.  Since the whole patch is based
on this idea, I believe that means this patch is dead in the water.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Paul Ramsey
Date:
Subject: Re: Expanded Objects and Order By
Next
From: Robert Haas
Date:
Subject: Re: Additional role attributes && superuser review