Re: Partitioning on IS NULL / IS NOT NULL not supported?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Partitioning on IS NULL / IS NOT NULL not supported?
Дата
Msg-id 23535.1178993866@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Partitioning on IS NULL / IS NOT NULL not supported?  (Aleksander Kmetec <aleksander.kmetec@intera.si>)
Список pgsql-general
Aleksander Kmetec <aleksander.kmetec@intera.si> writes:
> I'm trying to split a table into 2 partitions based on whether a field's value is NULL or NOT NULL, but when I run
> "EXPLAIN SELECT * FROM tab WHERE version IS NULL" it shows that both partitions are being scanned, not just the one
> which contains rows where version is null.

> Is this not supported?

Nope, predicate_refuted_by() doesn't cover that particular combination
at the moment.  The case it does cover was motivated by the thought of
having a regular partitioning into different value classes plus a
partition for NULLs, hence it knows that a test like "version = X"
refutes "version IS NULL".

            regards, tom lane

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

Предыдущее
От: "L. Berger"
Дата:
Сообщение: TWO SAME TABLES, ONE UPDATED. HOW TO SYNC THE OTHER?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Missing magic block