Re: pruning disabled for array, enum, record, range type partition keys
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-04-18T15:01:56Z
Lists: pgsql-hackers
Amit Langote wrote: > On 2018/04/18 7:11, Alvaro Herrera wrote: > > @@ -1546,8 +1546,8 @@ match_clause_to_partition_key(RelOptInfo *rel, > case PARTITION_STRATEGY_HASH: > cmpfn = get_opfamily_proc(part_scheme->partopfamily[partkeyidx], > - op_righttype, op_righttype, > - HASHEXTENDED_PROC); > + part_scheme->partopcintype[partkeyidx], > + op_righttype, HASHEXTENDED_PROC); > > This change is not quite right, because it disables pruning. The above > returns InvalidOid as there are no hash AM procedures (in pg_amproc) whose > lefttype and righttype don't match. Makes sense. Still, I was expecting that pruning of hash partitioning would also work for pseudotypes, yet it doesn't. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Rework code to determine partition pruning procedure
- e5dcbb88a15d 11.0 landed