T E Schmitz <[EMAIL PROTECTED]> writes: > Tom Lane wrote: >> Whatever you were reading had it pretty badly garbled :-(
> I just dug out the PostgreSQL book again because I thought I might've > garbled it: > Quote: "PostgreSQL will not index NULL values. Because an index will > never include NULL values, it cannot be used to satisfy the ORDER BY > clause of a query that returns all rows in a table." [ shrug ] It's wrong on both counts, and has been since (checks CVS) 1997. What book is that anyway? There is a related statement that is still true: "WHERE x IS NULL" (or NOT NULL) clauses are not indexscannable. This is a shortcoming of the planner-to-index-access-method interface, though, not a question of whether the index can store NULLs. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match