Re: BUG #16855: No partition pruning when using partitions with custom hash function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: stanislaw(dot)skonieczny(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16855: No partition pruning when using partitions with custom hash function
Date: 2021-02-05 16:56:38
Message-ID: 110773.1612544198@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> I'd expect that only one partition will be scanned, other 2 will be removed
> by partition pruning.

It works if you write

regression=# explain select * from sample where part_id = 1::bigint;
QUERY PLAN
----------------------------------------------------------------------
Seq Scan on sample_part_1 sample (cost=0.00..38.25 rows=11 width=8)
Filter: (part_id = '1'::bigint)
(2 rows)

As it stands, the query uses the "bigint = integer" operator,
which you have not included in your custom opclass.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-02-05 17:01:51 Re: BUG #16854: initdb fails on ReFS and FAT32 file systems
Previous Message Euler Taveira 2021-02-05 16:28:29 Re: BUG #16854: initdb fails on ReFS and FAT32 file systems