Re: no partition pruning when partitioning using array type
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>, Robert Haas <robertmhaas@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-07-10T19:53:22Z
Lists: 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
Commits
-
Better handle pseudotypes as partition keys
- b6e3a3a492db 12.0 landed
- e7df94f317c9 11.0 landed
- 7c644b7d3f83 10.5 landed