]> granicus.if.org Git - postgresql/commitdiff
Minor formatting cleanup for 2a6368343f
authorAlexander Korotkov <akorotkov@postgresql.org>
Thu, 27 Sep 2018 20:29:50 +0000 (23:29 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Thu, 27 Sep 2018 20:29:50 +0000 (23:29 +0300)
src/backend/access/spgist/spgkdtreeproc.c
src/backend/access/spgist/spgquadtreeproc.c

index 105fc72c7a2973a267505537bd1efcaa3260e5d9..41d2b9cac9a07db733352eb46b051c4ae33f5d48 100644 (file)
@@ -317,16 +317,14 @@ spg_kd_inner_consistent(PG_FUNCTION_ARGS)
 
                        if (in->norderbys > 0)
                        {
-                               MemoryContext oldCtx = MemoryContextSwitchTo(
-                                                                                                                        in->traversalMemoryContext);
+                               MemoryContext oldCtx = MemoryContextSwitchTo(in->traversalMemoryContext);
                                BOX                *box = box_copy(&bboxes[i - 1]);
 
                                MemoryContextSwitchTo(oldCtx);
 
                                out->traversalValues[out->nNodes] = box;
 
-                               out->distances[out->nNodes] = spg_key_orderbys_distances(
-                                                                                                                                                BoxPGetDatum(box), false,
+                               out->distances[out->nNodes] = spg_key_orderbys_distances(BoxPGetDatum(box), false,
                                                                                                                                                 in->orderbys, in->norderbys);
                        }
 
index 90cc7768994f8b20cbb1ee108771fb8ba670f812..4e175d2664e31f5433e90bc3eb4184018af82802 100644 (file)
@@ -278,8 +278,7 @@ spg_quad_inner_consistent(PG_FUNCTION_ARGS)
 
                        if (in->norderbys > 0)
                        {
-                               MemoryContext oldCtx = MemoryContextSwitchTo(
-                                                                                                                        in->traversalMemoryContext);
+                               MemoryContext oldCtx = MemoryContextSwitchTo(in->traversalMemoryContext);
 
                                /* Use parent quadrant box as traversalValue */
                                BOX                *quadrant = box_copy(bbox);
@@ -287,8 +286,7 @@ spg_quad_inner_consistent(PG_FUNCTION_ARGS)
                                MemoryContextSwitchTo(oldCtx);
 
                                out->traversalValues[i] = quadrant;
-                               out->distances[i] = spg_key_orderbys_distances(
-                                                                                                                          BoxPGetDatum(quadrant), false,
+                               out->distances[i] = spg_key_orderbys_distances(BoxPGetDatum(quadrant), false,
                                                                                                                           in->orderbys, in->norderbys);
                        }
                }
@@ -385,16 +383,14 @@ spg_quad_inner_consistent(PG_FUNCTION_ARGS)
 
                        if (in->norderbys > 0)
                        {
-                               MemoryContext oldCtx = MemoryContextSwitchTo(
-                                                                                                                        in->traversalMemoryContext);
+                               MemoryContext oldCtx = MemoryContextSwitchTo(in->traversalMemoryContext);
                                BOX                *quadrant = getQuadrantArea(bbox, centroid, i);
 
                                MemoryContextSwitchTo(oldCtx);
 
                                out->traversalValues[out->nNodes] = quadrant;
 
-                               out->distances[out->nNodes] = spg_key_orderbys_distances(
-                                                                                                                                                BoxPGetDatum(quadrant), false,
+                               out->distances[out->nNodes] = spg_key_orderbys_distances(BoxPGetDatum(quadrant), false,
                                                                                                                                                 in->orderbys, in->norderbys);
                        }