http://developer.postgresql.org/docs/postgres/datatype.html#DATATYPE-NUMERIC
Section 8.1.1 has not been updated to reflect the recent addition of
indexes which can be used across type definitions.
Kris Jurka
Index: doc/src/sgml/datatype.sgml
===================================================================
RCS file: /projects/cvsroot/pgsql-server/doc/src/sgml/datatype.sgml,v
retrieving revision 1.139
diff -c -r1.139 datatype.sgml
*** doc/src/sgml/datatype.sgml 21 Dec 2003 04:34:35 -0000 1.139
--- doc/src/sgml/datatype.sgml 9 Jan 2004 08:58:54 -0000
***************
*** 437,464 ****
other <acronym>SQL</acronym> database systems.
</para>
- <note>
- <para>
- If you have a column of type <type>smallint</type> or
- <type>bigint</type> with an index, you may encounter problems
- getting the system to use that index. For instance, a clause of
- the form
- <programlisting>
- ... WHERE smallint_column = 42
- </programlisting>
- will not use an index, because the system assigns type
- <type>integer</type> to the constant 42, and
- <productname>PostgreSQL</productname> currently
- cannot use an index when two different data types are involved. A
- workaround is to single-quote the constant, thus:
- <programlisting>
- ... WHERE smallint_column = '42'
- </programlisting>
- This will cause the system to delay type resolution and will
- assign the right type to the constant.
- </para>
- </note>
-
</sect2>
<sect2 id="datatype-numeric-decimal">
--- 437,442 ----
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])