Clarification on interactions between query parameters and partial indexes - Mailing list pgsql-docs

From PG Doc comments form
Subject Clarification on interactions between query parameters and partial indexes
Date
Msg-id 158163485510.6759.4276544280525471906@wrigleys.postgresql.org
Whole thread Raw
Responses Re: Clarification on interactions between query parameters and partial indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/12/indexes-partial.html
Description:

In section "11.8 Partial Indexes" it states the following:

"Matching takes place at query planning time, not at run time. As a result,
parameterized query clauses do not work with a partial index. For example a
prepared query with a parameter might specify “x < ?” which will never imply
“x < 2” for all possible values of the parameter."

We decided to run some tests to verify this statement, as we use both
partial indexes and parameterized queries on some very large tables (100mil+
rows). However, we are not able to replicate the stated behavior. It seems
like the query planner is able to make use of the partial index for both
parameterized and manually interpolated values.

Have we misunderstood what the documentation is trying to say or has this
limitation been fixed?

PostgreSQL 10.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313
(Red Hat 4.4.7-18), 64-bit
PHP 7.2
PDO::prepare

pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: PDF doc build is broken on recent Fedora
Next
From: Dave Cramer
Date:
Subject: documenting divergence from the SQL spec