mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Remove unnecessary uses of Abs()
Use C standard abs() or fabs() instead. Reviewed-by: Zhang Mingli <zmlpostgres@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/4beb42b5-216b-bce8-d452-d924d5794c63%40enterprisedb.com
This commit is contained in:
@@ -3206,7 +3206,7 @@ check_new_partition_bound(char *relname, Relation parent,
|
||||
* datums list.
|
||||
*/
|
||||
PartitionRangeDatum *datum =
|
||||
list_nth(spec->upperdatums, Abs(cmpval) - 1);
|
||||
list_nth(spec->upperdatums, abs(cmpval) - 1);
|
||||
|
||||
/*
|
||||
* The new partition overlaps with the
|
||||
@@ -3232,7 +3232,7 @@ check_new_partition_bound(char *relname, Relation parent,
|
||||
* if we have equality, point to the first one.
|
||||
*/
|
||||
datum = cmpval == 0 ? linitial(spec->lowerdatums) :
|
||||
list_nth(spec->lowerdatums, Abs(cmpval) - 1);
|
||||
list_nth(spec->lowerdatums, abs(cmpval) - 1);
|
||||
overlap = true;
|
||||
overlap_location = datum->location;
|
||||
with = boundinfo->indexes[offset + 1];
|
||||
|
||||
Reference in New Issue
Block a user