Re: Unexpected (wrong?) result querying boolean partitioned table with NULL partition

David Kimura <david.g.kimura@gmail.com>

From: David Kimura <david.g.kimura@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
Date: 2023-04-13T16:19:22Z
Lists: pgsql-hackers
On Wed, Apr 12, 2023 at 4:13 AM David Rowley <dgrowleyml@gmail.com> wrote:
>
> There seems to be a bunch of tests checking this already, all of them
> assuming the incorrect plans.

Given that the plan alone wasn't sufficient to catch this error previously,
would it be worthwhile to add some data to the tests to make it abundantly
obvious?

I had noticed that the default partition seems to be an edge case in the code.
Perhaps it's overkill, but would it be worth adding a test where the NULL
partition is not the default?

Thanks,
David



Commits

  1. Fix incorrect partition pruning logic for boolean partitioned tables