Re: Does anybody use ORDER BY x USING y?

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Does anybody use ORDER BY x USING y?
Дата
Msg-id 20050919092402.GC18456@svana.org
обсуждение исходный текст
Ответ на Re: Does anybody use ORDER BY x USING y?  (Hannu Krosing <hannu@skype.net>)
Ответы Re: Does anybody use ORDER BY x USING y?  (Hannu Krosing <hannu@skype.net>)
Список pgsql-hackers
On Mon, Sep 19, 2005 at 11:13:05AM +0300, Hannu Krosing wrote:
> > (1) IS NULL is not an indexable operation, so no, not without
> > significant overhaul of the index AM API.
>
> But we do store NULLs in indexes, so why is it not indexable?
>
> This is either an interface bug (not making use of stored info) or
> storage bug (wasting space storing unneccessary info)

Err, indexes used to not store NULLs to save space. However, it turns
out that SQL UNIQUE has something to say about NULLs in unique columns
so they had to be included.

However, the machinary to decide if an index is usable assumes that
usable operators have two arguments and IS NULL isn't really an
operator in the PostgreSQL sense and doesn't have two arguments either.

*If* that can be fixed, then we can be more flexible. But if it were
easy it would have been done long ago...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

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

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: Beta2 Wrap Up ...
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: Does anybody use ORDER BY x USING y?