Re: no partition pruning when partitioning using array type - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: no partition pruning when partitioning using array type
Date
Msg-id 20180710195322.644lhd73mvak6ft7@alvherre.pgsql
Whole thread Raw
In response to Re: no partition pruning when partitioning using array type  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2018-Jul-09, Tom Lane wrote:

> Alvaro Herrera <alvherre@2ndquadrant.com> writes:

> > However, if we take out the
> > expression_planner() and replace it with a call to
> > strip_implicit_coercions(), not only it magically starts working, but
> > also the regression tests start failing with the attached diff, which
> > seems a Good Thing to me.
> 
> Why would you find that to be a good thing?  The prohibition against
> mutable coercions seems like something we need here, for more or less
> the same reason in the domain example.

By the way, while playing with a partition on type money and replacing
expression_planner() with strip_implicit_coercions(), the stored
partition bounds are completely broken -- they end up as literals of
type integer rather than money, so any insert at all into the partition
fails (even if the value is nominally the same).  So clearly it's not a
change we want.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: no partition pruning when partitioning using array type
Next
From: Tom Lane
Date:
Subject: Re: _isnan() on Windows