From: Bruce Momjian Date: Mon, 4 Sep 2006 19:58:02 +0000 (+0000) Subject: Mention paremeterized queries do not work with partial indexes. X-Git-Tag: REL9_0_0~7135 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a65f7db3b541541492d004275f0717d7f40d4809;p=pg-rex%2Fsyncrep.git Mention paremeterized queries do not work with partial indexes. Simon Riggs --- diff --git a/doc/src/sgml/indices.sgml b/doc/src/sgml/indices.sgml index 223bb81cfc..5d4ecb6a2a 100644 --- a/doc/src/sgml/indices.sgml +++ b/doc/src/sgml/indices.sgml @@ -1,4 +1,4 @@ - + Indexes @@ -679,7 +679,12 @@ SELECT * FROM orders WHERE order_nr = 3501; x < 1 implies x < 2; otherwise the predicate condition must exactly match part of the query's 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 + x < ? which will never imply + x < 2 for all possible values of the parameter.