@@ -2134,7 +2134,7 @@ get_qual_for_range(Relation parent, PartitionBoundSpec *spec,
21342134
21352135if (or_expr_args != NIL )
21362136{
2137- Expr * other_parts_constr ;
2137+ Expr * other_parts_constr ;
21382138
21392139/*
21402140 * Combine the constraints obtained for non-default partitions
@@ -2143,20 +2143,20 @@ get_qual_for_range(Relation parent, PartitionBoundSpec *spec,
21432143 * useless repetition). Add the same now.
21442144 */
21452145other_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 );
21532153
21542154/*
21552155 * Finally, the default partition contains everything *NOT*
21562156 * contained in the non-default partitions.
21572157 */
21582158result = list_make1 (makeBoolExpr (NOT_EXPR ,
2159- list_make1 (other_parts_constr ),-1 ));
2159+ list_make1 (other_parts_constr ),-1 ));
21602160}
21612161
21622162return result ;
@@ -2502,9 +2502,9 @@ generate_partition_qual(Relation rel)
25022502int
25032503get_partition_for_tuple (Relation relation ,Datum * values ,bool * isnull )
25042504{
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 );
25082508PartitionDesc partdesc = RelationGetPartitionDesc (relation );
25092509
25102510/* Route as appropriate based on partitioning strategy. */
@@ -2513,8 +2513,8 @@ get_partition_for_tuple(Relation relation, Datum *values, bool *isnull)
25132513case PARTITION_STRATEGY_HASH :
25142514{
25152515PartitionBoundInfo 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 );
25182518
25192519part_index = boundinfo -> indexes [rowHash %greatest_modulus ];
25202520}
@@ -2548,8 +2548,7 @@ get_partition_for_tuple(Relation relation, Datum *values, bool *isnull)
25482548
25492549/*
25502550 * 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.
25532552 */
25542553for (i = 0 ;i < key -> partnatts ;i ++ )
25552554{
@@ -2563,7 +2562,7 @@ get_partition_for_tuple(Relation relation, Datum *values, bool *isnull)
25632562if (!range_partkey_has_null )
25642563{
25652564bound_offset = partition_bound_bsearch (key ,
2566- partdesc -> boundinfo ,
2565+ partdesc -> boundinfo ,
25672566values ,
25682567 false,
25692568& equal );
@@ -2585,8 +2584,8 @@ get_partition_for_tuple(Relation relation, Datum *values, bool *isnull)
25852584}
25862585
25872586/*
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.
25902589 */
25912590if (part_index < 0 )
25922591part_index = partdesc -> boundinfo -> default_index ;
@@ -3125,7 +3124,7 @@ satisfies_hash_partition(PG_FUNCTION_ARGS)
31253124bool variadic_typbyval ;
31263125char variadic_typalign ;
31273126FmgrInfo partsupfunc [PARTITION_MAX_KEYS ];
3128- }ColumnsHashData ;
3127+ }ColumnsHashData ;
31293128Oid parentId ;
31303129int modulus ;
31313130int remainder ;