Re: How to setup default value "0000-00-00" for "date"

Поиск
Список
Период
Сортировка
От Peter Haworth
Тема Re: How to setup default value "0000-00-00" for "date"
Дата
Msg-id PGM.20040820172322.459.4809@edison.ioppublishing.com
обсуждение исходный текст
Ответ на Re: How to setup default value "0000-00-00" for "date"  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: How to setup default value "0000-00-00" for "date"  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Fri, 20 Aug 2004 11:12:40 -0400 (EDT), Bruce Momjian wrote:
> Yes, you use a partial index. The 8.0beta1 docs mention this:
>
>    Indexes are not used for <literal>IS NULL</> clauses by default.
>    The best way to use indexes in such cases is to create a partial
>    index using an <literal>IS NULL</> comparison.

Is this because nulls aren't indexed (I'm sure I remember someone
saying that they are, though), or because (null=null) is null rather
than true? If it's the latter, why couldn't an explicit IS NULL test
be allowed to use the index?

--
    Peter Haworth    pmh@edison.ioppublishing.com
Znqr lbh ybbx

В списке pgsql-general по дате отправления:

Предыдущее
От: Bill Moran
Дата:
Сообщение: Re: Postgres filling up hard drive with swap files
Следующее
От: Tom Lane
Дата:
Сообщение: Re: How to setup default value "0000-00-00" for "date"