Use get_greatest_modulus() in partition_bounds_equal()

Started by Ashutosh Bapatalmost 9 years ago2 messageshackers
Jump to latest
#1Ashutosh Bapat
ashutosh.bapat@enterprisedb.com

Hi all,

partition_bounds_equal() accesses the last datum from the given
partition bounds directly to compare their greatest moduli. Rest of
the code uses get_greatest_modulus() to get the greatest modulus from
a partition bound. partition_bounds_equal() should also do the same
for the sake of consistency and to make sure the in future the code
remains sane if we change the way we store greatest modulus in
PartitionBoundInfoData in future.

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

Attachments:

0001-Use-get_greatest_modulus-in-partition_bounds_equal.patchtext/x-patch; charset=US-ASCII; name=0001-Use-get_greatest_modulus-in-partition_bounds_equal.patchDownload+3-7
#2Robert Haas
robertmhaas@gmail.com
In reply to: Ashutosh Bapat (#1)
Re: Use get_greatest_modulus() in partition_bounds_equal()

On Fri, Dec 1, 2017 at 5:13 AM, Ashutosh Bapat
<ashutosh.bapat@enterprisedb.com> wrote:

partition_bounds_equal() accesses the last datum from the given
partition bounds directly to compare their greatest moduli. Rest of
the code uses get_greatest_modulus() to get the greatest modulus from
a partition bound. partition_bounds_equal() should also do the same
for the sake of consistency and to make sure the in future the code
remains sane if we change the way we store greatest modulus in
PartitionBoundInfoData in future.

Makes sense. Committed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company