Re: [HACKERS] path toward faster partition pruning - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [HACKERS] path toward faster partition pruning
Date
Msg-id 20180509022018.GB26879@paquier.xyz
Whole thread Raw
In response to Re: [HACKERS] path toward faster partition pruning  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [HACKERS] path toward faster partition pruning  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-hackers
On Tue, May 08, 2018 at 07:05:46PM -0300, Alvaro Herrera wrote:
> The reason for this crash is that gen_partprune_steps_internal() is
> unable to generate any steps for the clause -- which is natural, since
> the operator is not in a btree opclass.  There are various callers
> of gen_partprune_steps_internal that are aware that it could return an
> empty set of steps, but this one in match_clause_to_partition_key for
> the ScalarArrayOpExpr case was being a bit too optimistic.

Indeed.

While looking at this code, is there any reason to not make
gen_partprune_steps static?  This is only used in partprune.c for now,
so the intention is to make it available for future patches?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: [HACKERS] path toward faster partition pruning
Next
From: Etsuro Fujita
Date:
Subject: Re: Oddity in tuple routing for foreign partitions