From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Aleksander Kmetec <aleksander(dot)kmetec(at)intera(dot)si> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Partitioning on IS NULL / IS NOT NULL not supported? |
Date: | 2007-05-12 18:17:46 |
Message-ID: | 23535.1178993866@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Aleksander Kmetec <aleksander(dot)kmetec(at)intera(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-05-12 18:22:40 | Re: Missing magic block |
Previous Message | Gregory Stark | 2007-05-12 17:30:27 | Re: stuck on values in 8.2 |