Re: pruning disabled for array, enum, record, range type partition keys

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pruning disabled for array, enum, record, range type partition keys
Date: 2018-04-18 15:01:56
Message-ID: 20180418150156.vr4hznwhyigyvfqi@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2018-04-18 15:09:32 Re: pruning disabled for array, enum, record, range type partition keys
Previous Message Tom Lane 2018-04-18 14:57:38 Re: Setting rpath on llvmjit.so?