|
1 | 1 | <!--
|
2 |
| -$Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.24 2002/04/17 20:57:56 tgl Exp $ |
| 2 | +$Header: /cvsroot/pgsql/doc/src/sgml/xindex.sgml,v 1.25 2002/05/29 17:36:40 tgl Exp $ |
3 | 3 | PostgreSQL documentation
|
4 | 4 | -->
|
5 | 5 |
|
@@ -105,6 +105,22 @@ PostgreSQL documentation
|
105 | 105 | </table>
|
106 | 106 | </para>
|
107 | 107 |
|
| 108 | + <note> |
| 109 | + <para> |
| 110 | + An index AM that supports multiple columns (has |
| 111 | + <structfield>amcanmulticol</structfield> true) <emphasis>must</> |
| 112 | + support indexing nulls in columns after the first, because the planner |
| 113 | + will assume the index can be used for queries on just the first |
| 114 | + column(s). For example, consider an index on (a,b) and a query |
| 115 | + WHERE a = 4. The system will assume the index can be used to scan for |
| 116 | + rows with a = 4, which is wrong if the index omits rows where b is null. |
| 117 | + However it is okay to omit rows where the first indexed column is null. |
| 118 | + (GiST currently does so.) |
| 119 | + <structfield>amindexnulls</structfield> should be set true only if the |
| 120 | + index AM indexes all rows, including arbitrary combinations of nulls. |
| 121 | + </para> |
| 122 | + </note> |
| 123 | + |
108 | 124 | <para>
|
109 | 125 | The <acronym>OID</acronym> of the row in
|
110 | 126 | <filename>pg_am</filename> is used as a foreign key in a lot of other
|
|