With your latest patch:
Consider a case when a table is partitioned on a boolean key.
Even when there are existing separate partitions for 'true' and
'false', still default partition can be created.
I think this should not be allowed.
Consider following case:
postgres=# CREATE TABLE list_partitioned (
) PARTITION BY LIST (a);
postgres=# CREATE TABLE part_1 PARTITION OF list_partitioned FOR VALUES IN
postgres=# CREATE TABLE part_2 PARTITION OF list_partitioned FOR VALUES IN
postgres=# CREATE TABLE part_default PARTITION OF list_partitioned FOR
VALUES IN (DEFAULT);
The creation of table part_default should have failed instead.
On Thu, Apr 6, 2017 at 9:37 PM, Keith Fiske <ke...@omniti.com> wrote:
> On Thu, Apr 6, 2017 at 7:30 AM, Rahila Syed <rahilasye...@gmail.com>
>> Thanks a lot for testing and reporting this. Please find attached an
>> updated patch with the fix. The patch also contains a fix
>> regarding operator used at the time of creating expression as default
>> partition constraint. This was notified offlist by Amit Langote.
>> Thank you,
>> Rahila Syed
> Could probably use some more extensive testing, but all examples I had on
> my previously mentioned blog post are now working.