Skip to content

Commit a65f7db

Browse files
committed
Mention paremeterized queries do not work with partial indexes.
Simon Riggs
1 parent 497f49a commit a65f7db

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

doc/src/sgml/indices.sgml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/indices.sgml,v 1.58 2006/08/25 04:06:44 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/indices.sgml,v 1.59 2006/09/04 19:58:02 momjian Exp $ -->
22

33
<chapter id="indexes">
44
<title id="indexes-title">Indexes</title>
@@ -679,7 +679,12 @@ SELECT * FROM orders WHERE order_nr = 3501;
679679
<quote>x &lt; 1</quote> implies <quote>x &lt; 2</quote>; otherwise
680680
the predicate condition must exactly match part of the query's
681681
<literal>WHERE</> condition
682-
or the index will not be recognized to be usable.
682+
or the index will not be recognized to be usable. Matching takes
683+
place at query planning time, not at run time. As a result,
684+
parameterized query clauses will not work with a partial index. For
685+
example a prepared query with a parameter might specify
686+
<quote>x &lt; ?</quote> which will never imply
687+
<quote>x &lt; 2</quote> for all possible values of the parameter.
683688
</para>
684689

685690
<para>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy