mirror of
https://github.com/postgres/postgres.git
synced 2025-08-31 17:02:12 +03:00
Fix some ill-chosen names for globally-visible partition support functions.
"compute_hash_value" is particularly gratuitously generic, but IMO all of these ought to have names clearly related to partitioning.
This commit is contained in:
@@ -470,8 +470,8 @@ check_new_partition_bound(char *relname, Relation parent,
|
||||
*upper;
|
||||
|
||||
Assert(spec->strategy == PARTITION_STRATEGY_RANGE);
|
||||
lower = make_one_range_bound(key, -1, spec->lowerdatums, true);
|
||||
upper = make_one_range_bound(key, -1, spec->upperdatums, false);
|
||||
lower = make_one_partition_rbound(key, -1, spec->lowerdatums, true);
|
||||
upper = make_one_partition_rbound(key, -1, spec->upperdatums, false);
|
||||
|
||||
/*
|
||||
* First check if the resulting range would be empty with
|
||||
@@ -589,15 +589,15 @@ check_new_partition_bound(char *relname, Relation parent,
|
||||
}
|
||||
|
||||
/*
|
||||
* check_default_allows_bound
|
||||
* check_default_partition_contents
|
||||
*
|
||||
* This function checks if there exists a row in the default partition that
|
||||
* would properly belong to the new partition being added. If it finds one,
|
||||
* it throws an error.
|
||||
*/
|
||||
void
|
||||
check_default_allows_bound(Relation parent, Relation default_rel,
|
||||
PartitionBoundSpec *new_spec)
|
||||
check_default_partition_contents(Relation parent, Relation default_rel,
|
||||
PartitionBoundSpec *new_spec)
|
||||
{
|
||||
List *new_part_constraints;
|
||||
List *def_part_constraints;
|
||||
@@ -757,14 +757,14 @@ get_hash_partition_greatest_modulus(PartitionBoundInfo bound)
|
||||
}
|
||||
|
||||
/*
|
||||
* make_one_range_bound
|
||||
* make_one_partition_rbound
|
||||
*
|
||||
* Return a PartitionRangeBound given a list of PartitionRangeDatum elements
|
||||
* and a flag telling whether the bound is lower or not. Made into a function
|
||||
* because there are multiple sites that want to use this facility.
|
||||
*/
|
||||
PartitionRangeBound *
|
||||
make_one_range_bound(PartitionKey key, int index, List *datums, bool lower)
|
||||
make_one_partition_rbound(PartitionKey key, int index, List *datums, bool lower)
|
||||
{
|
||||
PartitionRangeBound *bound;
|
||||
ListCell *lc;
|
||||
@@ -2052,13 +2052,13 @@ get_range_nulltest(PartitionKey key)
|
||||
}
|
||||
|
||||
/*
|
||||
* compute_hash_value
|
||||
* compute_partition_hash_value
|
||||
*
|
||||
* Compute the hash value for given not null partition key values.
|
||||
* Compute the hash value for given partition key values.
|
||||
*/
|
||||
uint64
|
||||
compute_hash_value(int partnatts, FmgrInfo *partsupfunc,
|
||||
Datum *values, bool *isnull)
|
||||
compute_partition_hash_value(int partnatts, FmgrInfo *partsupfunc,
|
||||
Datum *values, bool *isnull)
|
||||
{
|
||||
int i;
|
||||
uint64 rowHash = 0;
|
||||
@@ -2066,6 +2066,7 @@ compute_hash_value(int partnatts, FmgrInfo *partsupfunc,
|
||||
|
||||
for (i = 0; i < partnatts; i++)
|
||||
{
|
||||
/* Nulls are just ignored */
|
||||
if (!isnull[i])
|
||||
{
|
||||
Datum hash;
|
||||
|
Reference in New Issue
Block a user