Re: IS NOT DISTINCT FROM + Indexing

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: IS NOT DISTINCT FROM + Indexing
Дата
Msg-id 20140723173036.GA5475@eldon.alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: IS NOT DISTINCT FROM + Indexing  ("Jonathan S. Katz" <jonathan.katz@excoventures.com>)
Список pgsql-hackers
Jonathan S. Katz wrote:

> Well that definitely answers "how hard would it be." - before
> embarking on something laborious (as even just indexing is
> nontrivial), I think it would be good to figure out how people are
> using IS [NOT] DISTINCT FROM and if there is interest in having it be
> indexable, let alone used in a JOIN optimization.  It could become a
> handy tool to simplify the SQL in queries that are returning a lot of
> NULL / NOT NULL data mixed together.

FWIW my project (abandoned for now, but I intend to get back to it
someday) to catalog NOT NULL constraints in pg_constraint had me
rewriting them into some kind of IS DISTINCT FROM NULL expression.  (It
was IS NOT NULL initially until somebody pointed out that that wouldn't
work for composite type columns).  I'm not sure how that interacts with
what you're doing here, maybe not at all; I thought I'd mention it.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: Emre Hasegeli
Дата:
Сообщение: Re: Index-only scans for multicolumn GIST
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: postgresql.auto.conf and reload