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