Re: ORDER BY and NULLs
От | Tom Lane |
---|---|
Тема | Re: ORDER BY and NULLs |
Дата | |
Msg-id | 20623.1095620408@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: ORDER BY and NULLs (T E Schmitz <mailreg@numerixtechnology.de>) |
Список | pgsql-sql |
T E Schmitz <mailreg@numerixtechnology.de> 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
В списке pgsql-sql по дате отправления: