On Thu, Apr 13, 2023 at 10:39 AM Richard Guo <guofengli...@gmail.com> wrote:

> On Wed, Apr 12, 2023 at 7:13 PM David Rowley <dgrowle...@gmail.com> wrote:
>
>> There's already code to effectively handle <> operators. Just the
>> PartClauseInfo.op_is_ne needs to be set to true.
>> get_matching_list_bounds() then handles that by taking the inverse of
>> the partitions matching the equality operator.
>>
>> Effectively, I think that's the attached patch.
>
>
> I think there is a thinko here.
>

Sorry.  It's my thinko.  In cases IS_NOT_TRUE and IS_NOT_FALSE the
op_is_ne is set to true.  So the logic in origin patch is right.

BTW, I wonder if we should elog an Error here.

                default:
-                   Assert(false); /* hmm? */
-                   return PARTCLAUSE_UNSUPPORTED;
+                   elog(ERROR, "unrecognized booltesttype: %d",
+                        (int) btest->booltesttype);
+                   break;

Otherwise the patch looks good to me.

Thanks
Richard

Reply via email to