Re: BUG #16855: No partition pruning when using partitions with custom hash function - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #16855: No partition pruning when using partitions with custom hash function
Date
Msg-id 110773.1612544198@sss.pgh.pa.us
Whole thread Raw
In response to BUG #16855: No partition pruning when using partitions with custom hash function  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.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



pgsql-bugs by date:

Previous
From: "Euler Taveira"
Date:
Subject: Re: BUG #16854: initdb fails on ReFS and FAT32 file systems
Next
From: Tom Lane
Date:
Subject: Re: BUG #16854: initdb fails on ReFS and FAT32 file systems