On Wed, May 17, 2017 at 6:53 AM, Jeevan Ladhe
<jeevan.ladhe@enterprisedb.com> wrote:
> As discussed in default partition thread[1], here is the patch to remove
> has_null from PartitionBoundInfoData structure.
> Basically flag has_null is not needed and null_index can be checked if the
> current bound is having a null value or not.
>
> For simplicity of future use, in attached patch I have introduced a macro
> that
> would return TRUE if the given bound has null.
This seems like a good cleanup, but:
- It makes no sense to put a macro definition in a header file when
the corresponding structure definition is private to a specific .c
file.
- You failed to update the header comment for PartitionBoundInfoData
which mentions the has_null flag.
- The comment for null_index also seems like it should be updated to
mention that -1 is the sentinel value in general, not just for
range-partitioned tables.
I committed this with fixes for those issues, plus I renamed the macro
to partition_bound_accepts_nulls, which I think is more clear.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company