Re: UniqueKey on Partitioned table. - Mailing list pgsql-hackers

From Ashutosh Bapat
Subject Re: UniqueKey on Partitioned table.
Date
Msg-id CAExHW5vCDRbuDXQe+8KUxVGv819gkmsfrX_t1PytcRbCAdzp0Q@mail.gmail.com
Whole thread Raw
In response to Re: UniqueKey on Partitioned table.  (Andy Fan <zhihui.fan1213@gmail.com>)
Responses Re: UniqueKey on Partitioned table.  (David Rowley <dgrowleyml@gmail.com>)
List pgsql-hackers
On Sat, Mar 27, 2021 at 11:44 AM Andy Fan <zhihui.fan1213@gmail.com> wrote:
>
>
>
> On Sat, Mar 27, 2021 at 3:07 AM Dmitry Dolgov <9erthalion6@gmail.com> wrote:
>>
>> > On Sat, Feb 20, 2021 at 10:25:59AM +0800, Andy Fan wrote:
>> >
>> > The attached is a UnqiueKey with EquivalenceClass patch, I just complete the
>> > single relation part and may have bugs. I just attached it here for design
>> > review only. and the not-null-attrs is just v1 which we can continue
>> > discussing on the original thread[2].
>>
>> Thanks for the patch. After a short look through it I'm a bit confused
>> and wanted to clarify, now uniquekeys list could contain both Expr and
>> EquivalenceClass?
>
>
> Yes,  That's because I don't want to create a new EquivalenceClass (which
> would make the PlannerInfo->eq_classes longer) if we don't have
> one , then I just used one Expr instead for this case.
> However during the
> test, I found some EquivalenceClass with only 1 EquivalenceMember
> unexpectedly.
>

Pathkeys may induce single member ECs. Why UniqueKeys are an exception?

-- 
Best Wishes,
Ashutosh Bapat



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Rename of triggers for partitioned tables
Next
From: David Steele
Date:
Subject: Re: parallel distinct union and aggregate support patch