@@ -2134,7 +2134,7 @@ get_qual_for_range(Relation parent, PartitionBoundSpec *spec,
2134
2134
2135
2135
if (or_expr_args != NIL )
2136
2136
{
2137
- Expr * other_parts_constr ;
2137
+ Expr * other_parts_constr ;
2138
2138
2139
2139
/*
2140
2140
* Combine the constraints obtained for non-default partitions
@@ -2143,20 +2143,20 @@ get_qual_for_range(Relation parent, PartitionBoundSpec *spec,
2143
2143
* useless repetition). Add the same now.
2144
2144
*/
2145
2145
other_parts_constr =
2146
- makeBoolExpr (AND_EXPR ,
2147
- lappend (get_range_nulltest (key ),
2148
- list_length (or_expr_args ) > 1
2149
- ? makeBoolExpr (OR_EXPR , or_expr_args ,
2150
- -1 )
2151
- : linitial (or_expr_args )),
2152
- -1 );
2146
+ makeBoolExpr (AND_EXPR ,
2147
+ lappend (get_range_nulltest (key ),
2148
+ list_length (or_expr_args ) > 1
2149
+ ? makeBoolExpr (OR_EXPR , or_expr_args ,
2150
+ -1 )
2151
+ : linitial (or_expr_args )),
2152
+ -1 );
2153
2153
2154
2154
/*
2155
2155
* Finally, the default partition contains everything *NOT*
2156
2156
* contained in the non-default partitions.
2157
2157
*/
2158
2158
result = list_make1 (makeBoolExpr (NOT_EXPR ,
2159
- list_make1 (other_parts_constr ), -1 ));
2159
+ list_make1 (other_parts_constr ), -1 ));
2160
2160
}
2161
2161
2162
2162
return result ;
@@ -2502,9 +2502,9 @@ generate_partition_qual(Relation rel)
2502
2502
int
2503
2503
get_partition_for_tuple (Relation relation , Datum * values , bool * isnull )
2504
2504
{
2505
- int bound_offset ;
2506
- int part_index = -1 ;
2507
- PartitionKey key = RelationGetPartitionKey (relation );
2505
+ int bound_offset ;
2506
+ int part_index = -1 ;
2507
+ PartitionKey key = RelationGetPartitionKey (relation );
2508
2508
PartitionDesc partdesc = RelationGetPartitionDesc (relation );
2509
2509
2510
2510
/* Route as appropriate based on partitioning strategy. */
@@ -2513,8 +2513,8 @@ get_partition_for_tuple(Relation relation, Datum *values, bool *isnull)
2513
2513
case PARTITION_STRATEGY_HASH :
2514
2514
{
2515
2515
PartitionBoundInfo boundinfo = partdesc -> boundinfo ;
2516
- int greatest_modulus = get_greatest_modulus (boundinfo );
2517
- uint64 rowHash = compute_hash_value (key , values , isnull );
2516
+ int greatest_modulus = get_greatest_modulus (boundinfo );
2517
+ uint64 rowHash = compute_hash_value (key , values , isnull );
2518
2518
2519
2519
part_index = boundinfo -> indexes [rowHash % greatest_modulus ];
2520
2520
}
@@ -2548,8 +2548,7 @@ get_partition_for_tuple(Relation relation, Datum *values, bool *isnull)
2548
2548
2549
2549
/*
2550
2550
* No range includes NULL, so this will be accepted by the
2551
- * default partition if there is one, and otherwise
2552
- * rejected.
2551
+ * default partition if there is one, and otherwise rejected.
2553
2552
*/
2554
2553
for (i = 0 ; i < key -> partnatts ; i ++ )
2555
2554
{
@@ -2563,7 +2562,7 @@ get_partition_for_tuple(Relation relation, Datum *values, bool *isnull)
2563
2562
if (!range_partkey_has_null )
2564
2563
{
2565
2564
bound_offset = partition_bound_bsearch (key ,
2566
- partdesc -> boundinfo ,
2565
+ partdesc -> boundinfo ,
2567
2566
values ,
2568
2567
false,
2569
2568
& equal );
@@ -2585,8 +2584,8 @@ get_partition_for_tuple(Relation relation, Datum *values, bool *isnull)
2585
2584
}
2586
2585
2587
2586
/*
2588
- * part_index < 0 means we failed to find a partition of this parent.
2589
- * Use the default partition, if there is one.
2587
+ * part_index < 0 means we failed to find a partition of this parent. Use
2588
+ * the default partition, if there is one.
2590
2589
*/
2591
2590
if (part_index < 0 )
2592
2591
part_index = partdesc -> boundinfo -> default_index ;
@@ -3125,7 +3124,7 @@ satisfies_hash_partition(PG_FUNCTION_ARGS)
3125
3124
bool variadic_typbyval ;
3126
3125
char variadic_typalign ;
3127
3126
FmgrInfo partsupfunc [PARTITION_MAX_KEYS ];
3128
- } ColumnsHashData ;
3127
+ } ColumnsHashData ;
3129
3128
Oid parentId ;
3130
3129
int modulus ;
3131
3130
int remainder ;
0 commit comments