From: Tom Lane <tgl@sss.pgh.pa.us>
To: stanislaw.skonieczny@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16855: No partition pruning when using partitions with custom hash function
Date: Fri, 05 Feb 2021 11:56:38 -0500
Message-ID: <110773.1612544198@sss.pgh.pa.us> (raw)
In-Reply-To: <16855-32d2983ea6e6b208@postgresql.org>
References: <16855-32d2983ea6e6b208@postgresql.org>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, stanislaw.skonieczny@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16855: No partition pruning when using partitions with custom hash function
In-Reply-To: <110773.1612544198@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox