diff options
author | Bruce Momjian <bruce@momjian.us> | 2006-09-04 19:58:02 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2006-09-04 19:58:02 +0000 |
commit | a65f7db3b541541492d004275f0717d7f40d4809 (patch) | |
tree | 146c483a0d8325bb7792db909c33dc6193a91543 | |
parent | 497f49a736c3c83931ce568e17389c15fc4d311c (diff) | |
download | postgresql-a65f7db3b541541492d004275f0717d7f40d4809.tar.gz postgresql-a65f7db3b541541492d004275f0717d7f40d4809.zip |
Mention paremeterized queries do not work with partial indexes.
Simon Riggs
-rw-r--r-- | doc/src/sgml/indices.sgml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml index 223bb81cfc8..5d4ecb6a2a1 100644 --- a/doc/src/sgml/indices.sgml +++ b/doc/src/sgml/indices.sgml @@ -1,4 +1,4 @@ -<!-- $PostgreSQL: pgsql/doc/src/sgml/indices.sgml,v 1.58 2006/08/25 04:06:44 tgl Exp $ --> +<!-- $PostgreSQL: pgsql/doc/src/sgml/indices.sgml,v 1.59 2006/09/04 19:58:02 momjian Exp $ --> <chapter id="indexes"> <title id="indexes-title">Indexes</title> @@ -679,7 +679,12 @@ SELECT * FROM orders WHERE order_nr = 3501; <quote>x < 1</quote> implies <quote>x < 2</quote>; otherwise the predicate condition must exactly match part of the query's <literal>WHERE</> condition - or the index will not be recognized to be usable. + or the index will not be recognized to be usable. Matching takes + place at query planning time, not at run time. As a result, + parameterized query clauses will not work with a partial index. For + example a prepared query with a parameter might specify + <quote>x < ?</quote> which will never imply + <quote>x < 2</quote> for all possible values of the parameter. </para> <para> |