Re: no partition pruning when partitioning using array type

Robert Haas <robertmhaas@gmail.com>

From: Robert Haas <robertmhaas@gmail.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-02-01T15:20:54Z
Lists: pgsql-hackers
On Thu, Feb 1, 2018 at 4:42 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
>> I hope someone else chimes in as well. :)
>
> Bug #15042 [1] seems to be caused by this same problem.  There, a
> RelabelType node is being slapped (by the partitioning code) on a Var node
> of a partition key on enum.
>
> Attached updated patch.

Can I get anyone else to weigh in on whether this is likely to be
safe?  Paging people who understand constraint exclusion...

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


Commits

  1. Better handle pseudotypes as partition keys