Doc patch in response to bug raised:


[BUGS] partial indexes not used on
parameterized queries?
10 July 2006

-- 
  Simon Riggs             
  EnterpriseDB   http://www.enterprisedb.com
Index: doc/src/sgml/indices.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql/doc/src/sgml/indices.sgml,v
retrieving revision 1.57
diff -c -r1.57 indices.sgml
*** doc/src/sgml/indices.sgml	24 May 2006 11:01:39 -0000	1.57
--- doc/src/sgml/indices.sgml	15 Aug 2006 10:22:57 -0000
***************
*** 668,674 ****
     <quote>x &lt; 1</quote> implies <quote>x &lt; 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.
    </para>
  
    <para>
--- 668,679 ----
     <quote>x &lt; 1</quote> implies <quote>x &lt; 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. Matching takes
!    place at query planning time, not at run time. As a result,
!    parameterised query clauses will not work with a partial index. For
!    example a prepared query with a parameter might specify 
!    <quote>x &lt; ?</quote> which will never imply 
!    <quote>x &lt; 2</quote> for all possible values of the parameter. 
    </para>
  
    <para>
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to