Re: no partition pruning when partitioning using array type
Alvaro Herrera <alvherre@2ndquadrant.com>
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Robert Haas <robertmhaas@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-07-10T19:48:57Z
Lists: pgsql-hackers
On 2018-Jul-10, Alvaro Herrera wrote:
> alvherre=# explain update p set a = a || a where a = '{1}';
> QUERY PLAN
> ──────────────────────────────────────────────────────────
> Update on p (cost=0.00..54.03 rows=14 width=38)
> Update on p1
> Update on p2
> -> Seq Scan on p1 (cost=0.00..27.02 rows=7 width=38)
> Filter: (a = '{1}'::integer[])
> -> Seq Scan on p2 (cost=0.00..27.02 rows=7 width=38)
> Filter: (a = '{1}'::integer[])
> (7 filas)
>
> Because UPDATE uses the predtest.c prune code, not partprune. So it's
> not just some ruleutils beautification.
I added this test, modified some comments, and pushed.
Thanks for the patch.
--
Á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