Re: [HACKERS] Preliminary results for proposed new pgindent implementation - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Preliminary results for proposed new pgindent implementation
Date
Msg-id 8827.1497633050@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Preliminary results for proposed new pgindent implementation  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Preliminary results for proposed new pgindentimplementation
List pgsql-hackers
There was some discussion upthread about how we'd like pgindent not to
do weird things with string literals that wrap around the end of the
line a little bit.  I looked into that and found that it's actually
a generic behavior for any line that's within parentheses: normally,
such a line will get lined up with the parens, like this:

        foobar(baz,
               baz2,
               baz3,
               ...

but if the line would wrap when indented that much, and backing off
lets it not wrap, then it backs off.

I experimented with disabling that logic and just always aligning
to the paren indentation.  That fixes the weird cases with continued
string literals, but it also makes for a heck of a lot of other changes.
The full diff is too big to post here, but I've attached a selection
of diff hunks to give you an idea.  I'm not really sure if I like this
better than pgindent's traditional behavior --- but it's arguably less
confusing.

An intermediate position that we could consider is to disable the back-off
logic only when the line starts with a string literal.  I haven't actually
coded this but it looks like it would be easy, if grotty.

Or we could leave it alone.

Thoughts?

            regards, tom lane

diff -ur pgsql/contrib/amcheck/verify_nbtree.c pgsql-dup/contrib/amcheck/verify_nbtree.c
--- pgsql/contrib/amcheck/verify_nbtree.c    2017-06-16 12:31:36.900504080 -0400
+++ pgsql-dup/contrib/amcheck/verify_nbtree.c    2017-06-16 12:35:21.042052427 -0400
@@ -240,8 +240,8 @@
         ereport(ERROR,
                 (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                  errmsg("cannot access temporary tables of other sessions"),
-             errdetail("Index \"%s\" is associated with temporary relation.",
-                       RelationGetRelationName(rel))));
+                 errdetail("Index \"%s\" is associated with temporary relation.",
+                           RelationGetRelationName(rel))));

     if (!IndexIsValid(rel->rd_index))
         ereport(ERROR,
@@ -411,12 +411,12 @@
                 ereport(ERROR,
                         (errcode(ERRCODE_INDEX_CORRUPTED),
                          errmsg("block %u fell off the end of index \"%s\"",
-                             current, RelationGetRelationName(state->rel))));
+                                current, RelationGetRelationName(state->rel))));
             else
                 ereport(DEBUG1,
                         (errcode(ERRCODE_NO_DATA),
                          errmsg("block %u of index \"%s\" ignored",
-                             current, RelationGetRelationName(state->rel))));
+                                current, RelationGetRelationName(state->rel))));
             goto nextpage;
         }
         else if (nextleveldown.leftmost == InvalidBlockNumber)
@@ -433,14 +433,14 @@
                 if (!P_LEFTMOST(opaque))
                     ereport(ERROR,
                             (errcode(ERRCODE_INDEX_CORRUPTED),
-                           errmsg("block %u is not leftmost in index \"%s\"",
-                             current, RelationGetRelationName(state->rel))));
+                             errmsg("block %u is not leftmost in index \"%s\"",
+                                    current, RelationGetRelationName(state->rel))));

                 if (level.istruerootlevel && !P_ISROOT(opaque))
                     ereport(ERROR,
                             (errcode(ERRCODE_INDEX_CORRUPTED),
-                          errmsg("block %u is not true root in index \"%s\"",
-                             current, RelationGetRelationName(state->rel))));
+                             errmsg("block %u is not true root in index \"%s\"",
+                                    current, RelationGetRelationName(state->rel))));
             }

             /*
@@ -488,7 +488,7 @@
                      errmsg("left link/right link pair in index \"%s\" not in agreement",
                             RelationGetRelationName(state->rel)),
                      errdetail_internal("Block=%u left block=%u left link from block=%u.",
-                                  current, leftcurrent, opaque->btpo_prev)));
+                                        current, leftcurrent, opaque->btpo_prev)));

         /* Check level, which must be valid for non-ignorable page */
         if (level.level != opaque->btpo.level)
@@ -497,7 +497,7 @@
                      errmsg("leftmost down link for level points to block in index \"%s\" whose level is not one level
down",
                             RelationGetRelationName(state->rel)),
                      errdetail_internal("Block pointed to=%u expected level=%u level in pointed to block=%u.",
-                                 current, level.level, opaque->btpo.level)));
+                                        current, level.level, opaque->btpo.level)));

         /* Verify invariants for page -- all important checks occur here */
         bt_target_page_check(state);
@@ -508,8 +508,8 @@
         if (current == leftcurrent || current == opaque->btpo_prev)
             ereport(ERROR,
                     (errcode(ERRCODE_INDEX_CORRUPTED),
-              errmsg("circular link chain found in block %u of index \"%s\"",
-                     current, RelationGetRelationName(state->rel))));
+                     errmsg("circular link chain found in block %u of index \"%s\"",
+                            current, RelationGetRelationName(state->rel))));

         leftcurrent = current;
         current = opaque->btpo_next;
@@ -665,17 +665,17 @@
                     (errcode(ERRCODE_INDEX_CORRUPTED),
                      errmsg("item order invariant violated for index \"%s\"",
                             RelationGetRelationName(state->rel)),
-               errdetail_internal("Lower index tid=%s (points to %s tid=%s) "
-                                  "higher index tid=%s (points to %s tid=%s) "
-                                  "page lsn=%X/%X.",
-                                  itid,
-                                  P_ISLEAF(topaque) ? "heap" : "index",
-                                  htid,
-                                  nitid,
-                                  P_ISLEAF(topaque) ? "heap" : "index",
-                                  nhtid,
-                                  (uint32) (state->targetlsn >> 32),
-                                  (uint32) state->targetlsn)));
+                     errdetail_internal("Lower index tid=%s (points to %s tid=%s) "
+                                        "higher index tid=%s (points to %s tid=%s) "
+                                        "page lsn=%X/%X.",
+                                        itid,
+                                        P_ISLEAF(topaque) ? "heap" : "index",
+                                        htid,
+                                        nitid,
+                                        P_ISLEAF(topaque) ? "heap" : "index",
+                                        nhtid,
+                                        (uint32) (state->targetlsn >> 32),
+                                        (uint32) state->targetlsn)));
         }

         /*
@@ -824,7 +824,7 @@
         ereport(DEBUG1,
                 (errcode(ERRCODE_NO_DATA),
                  errmsg("level %u leftmost page of index \"%s\" was found deleted or half dead",
-                    opaque->btpo.level, RelationGetRelationName(state->rel)),
+                        opaque->btpo.level, RelationGetRelationName(state->rel)),
                  errdetail_internal("Deleted page found when building scankey from right sibling.")));

         /* Be slightly more pro-active in freeing this memory, just in case */
@@ -1053,7 +1053,7 @@
                      errmsg("down-link lower bound invariant violated for index \"%s\"",
                             RelationGetRelationName(state->rel)),
                      errdetail_internal("Parent block=%u child index tid=(%u,%u) parent page lsn=%X/%X.",
-                                      state->targetblock, childblock, offset,
+                                        state->targetblock, childblock, offset,
                                         (uint32) (state->targetlsn >> 32),
                                         (uint32) state->targetlsn)));
     }
@@ -1228,21 +1228,21 @@
     if (P_ISLEAF(opaque) && !P_ISDELETED(opaque) && opaque->btpo.level != 0)
         ereport(ERROR,
                 (errcode(ERRCODE_INDEX_CORRUPTED),
-            errmsg("invalid leaf page level %u for block %u in index \"%s\"",
-        opaque->btpo.level, blocknum, RelationGetRelationName(state->rel))));
+                 errmsg("invalid leaf page level %u for block %u in index \"%s\"",
+                        opaque->btpo.level, blocknum, RelationGetRelationName(state->rel))));

     if (blocknum != BTREE_METAPAGE && !P_ISLEAF(opaque) &&
         !P_ISDELETED(opaque) && opaque->btpo.level == 0)
         ereport(ERROR,
                 (errcode(ERRCODE_INDEX_CORRUPTED),
-         errmsg("invalid internal page level 0 for block %u in index \"%s\"",
-                opaque->btpo.level, RelationGetRelationName(state->rel))));
+                 errmsg("invalid internal page level 0 for block %u in index \"%s\"",
+                        opaque->btpo.level, RelationGetRelationName(state->rel))));

     if (!P_ISLEAF(opaque) && P_HAS_GARBAGE(opaque))
         ereport(ERROR,
                 (errcode(ERRCODE_INDEX_CORRUPTED),
-           errmsg("internal page block %u in index \"%s\" has garbage items",
-                  blocknum, RelationGetRelationName(state->rel))));
+                 errmsg("internal page block %u in index \"%s\" has garbage items",
+                        blocknum, RelationGetRelationName(state->rel))));

     return page;
 }
diff -ur pgsql/contrib/auth_delay/auth_delay.c pgsql-dup/contrib/auth_delay/auth_delay.c
--- pgsql/contrib/auth_delay/auth_delay.c    2017-06-16 12:31:37.732524682 -0400
+++ pgsql-dup/contrib/auth_delay/auth_delay.c    2017-06-16 12:35:21.855072546 -0400
@@ -57,7 +57,7 @@
 {
     /* Define custom GUC variables */
     DefineCustomIntVariable("auth_delay.milliseconds",
-             "Milliseconds to delay before reporting authentication failure",
+                            "Milliseconds to delay before reporting authentication failure",
                             NULL,
                             &auth_delay_milliseconds,
                             0,
diff -ur pgsql/contrib/auto_explain/auto_explain.c pgsql-dup/contrib/auto_explain/auto_explain.c
--- pgsql/contrib/auto_explain/auto_explain.c    2017-06-16 12:31:39.711573688 -0400
+++ pgsql-dup/contrib/auto_explain/auto_explain.c    2017-06-16 12:35:23.808120875 -0400
@@ -74,8 +74,8 @@
 {
     /* Define custom GUC variables. */
     DefineCustomIntVariable("auto_explain.log_min_duration",
-         "Sets the minimum execution time above which plans will be logged.",
-                         "Zero prints all plans. -1 turns this feature off.",
+                            "Sets the minimum execution time above which plans will be logged.",
+                            "Zero prints all plans. -1 turns this feature off.",
                             &auto_explain_log_min_duration,
                             -1,
                             -1, INT_MAX / 1000,
@@ -120,7 +120,7 @@

     DefineCustomBoolVariable("auto_explain.log_triggers",
                              "Include trigger statistics in plans.",
-                        "This has no effect unless log_analyze is also set.",
+                             "This has no effect unless log_analyze is also set.",
                              &auto_explain_log_triggers,
                              false,
                              PGC_SUSET,
diff -ur pgsql/contrib/bloom/bloom.h pgsql-dup/contrib/bloom/bloom.h
--- pgsql/contrib/bloom/bloom.h    2017-06-16 12:31:40.051582106 -0400
+++ pgsql-dup/contrib/bloom/bloom.h    2017-06-16 12:35:24.139129065 -0400
@@ -111,8 +111,8 @@
  */
 typedef BlockNumber FreeBlockNumberArray[
                                          MAXALIGN_DOWN(
-        BLCKSZ - SizeOfPageHeaderData - MAXALIGN(sizeof(BloomPageOpaqueData))
-       - MAXALIGN(sizeof(uint16) * 2 + sizeof(uint32) + sizeof(BloomOptions))
+                                                       BLCKSZ - SizeOfPageHeaderData -
MAXALIGN(sizeof(BloomPageOpaqueData))
+                                                       - MAXALIGN(sizeof(uint16) * 2 + sizeof(uint32) +
sizeof(BloomOptions))
                                                        ) / sizeof(BlockNumber)
 ];

diff -ur pgsql/contrib/bloom/blvacuum.c pgsql-dup/contrib/bloom/blvacuum.c
--- pgsql/contrib/bloom/blvacuum.c    2017-06-16 12:31:39.988580546 -0400
+++ pgsql-dup/contrib/bloom/blvacuum.c    2017-06-16 12:35:24.077127532 -0400
@@ -84,7 +84,7 @@
          */
         itup = itupPtr = BloomPageGetTuple(&state, page, FirstOffsetNumber);
         itupEnd = BloomPageGetTuple(&state, page,
-                              OffsetNumberNext(BloomPageGetMaxOffset(page)));
+                                    OffsetNumberNext(BloomPageGetMaxOffset(page)));
         while (itup < itupEnd)
         {
             /* Do we have to delete this tuple? */
@@ -108,7 +108,7 @@

         /* Assert that we counted correctly */
         Assert(itupPtr == BloomPageGetTuple(&state, page,
-                             OffsetNumberNext(BloomPageGetMaxOffset(page))));
+                                            OffsetNumberNext(BloomPageGetMaxOffset(page))));

         /*
          * Add page to new notFullPage list if we will not mark page as
diff -ur pgsql/contrib/btree_gin/btree_gin.c pgsql-dup/contrib/btree_gin/btree_gin.c
--- pgsql/contrib/btree_gin/btree_gin.c    2017-06-16 12:31:37.825526986 -0400
+++ pgsql-dup/contrib/btree_gin/btree_gin.c    2017-06-16 12:35:21.948074848 -0400
@@ -115,8 +115,8 @@
                                                  data->typecmp,
                                                  fcinfo->flinfo,
                                                  PG_GET_COLLATION(),
-                                   (data->strategy == BTLessStrategyNumber ||
-                                 data->strategy == BTLessEqualStrategyNumber)
+                                                 (data->strategy == BTLessStrategyNumber ||
+                                                  data->strategy == BTLessEqualStrategyNumber)
                                                  ? data->datum : a,
                                                  b));

diff -ur pgsql/contrib/btree_gist/btree_cash.c pgsql-dup/contrib/btree_gist/btree_cash.c
--- pgsql/contrib/btree_gist/btree_cash.c    2017-06-16 12:31:37.630522156 -0400
+++ pgsql-dup/contrib/btree_gist/btree_cash.c    2017-06-16 12:35:21.753070023 -0400
@@ -203,8 +203,8 @@
 gbt_cash_picksplit(PG_FUNCTION_ARGS)
 {
     PG_RETURN_POINTER(gbt_num_picksplit(
-                                    (GistEntryVector *) PG_GETARG_POINTER(0),
-                                      (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                        (GistEntryVector *) PG_GETARG_POINTER(0),
+                                        (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                         &tinfo, fcinfo->flinfo
                                         ));
 }
diff -ur pgsql/contrib/btree_gist/btree_date.c pgsql-dup/contrib/btree_gist/btree_date.c
--- pgsql/contrib/btree_gist/btree_date.c    2017-06-16 12:31:37.376515867 -0400
+++ pgsql-dup/contrib/btree_gist/btree_date.c    2017-06-16 12:35:21.505063884 -0400
@@ -87,8 +87,8 @@
 {
     /* we assume the difference can't overflow */
     Datum        diff = DirectFunctionCall2(date_mi,
-                                     DateADTGetDatum(*((const DateADT *) a)),
-                                    DateADTGetDatum(*((const DateADT *) b)));
+                                           DateADTGetDatum(*((const DateADT *) a)),
+                                           DateADTGetDatum(*((const DateADT *) b)));

     return (float8) Abs(DatumGetInt32(diff));
 }
@@ -210,14 +210,14 @@
     diff = DatumGetInt32(DirectFunctionCall2(
                                              date_mi,
                                              DateADTGetDatum(newentry->upper),
-                                         DateADTGetDatum(origentry->upper)));
+                                             DateADTGetDatum(origentry->upper)));

     res = Max(diff, 0);

     diff = DatumGetInt32(DirectFunctionCall2(
                                              date_mi,
-                                           DateADTGetDatum(origentry->lower),
-                                          DateADTGetDatum(newentry->lower)));
+                                             DateADTGetDatum(origentry->lower),
+                                             DateADTGetDatum(newentry->lower)));

     res += Max(diff, 0);

@@ -227,8 +227,8 @@
     {
         diff = DatumGetInt32(DirectFunctionCall2(
                                                  date_mi,
-                                           DateADTGetDatum(origentry->upper),
-                                         DateADTGetDatum(origentry->lower)));
+                                                 DateADTGetDatum(origentry->upper),
+                                                 DateADTGetDatum(origentry->lower)));
         *result += FLT_MIN;
         *result += (float) (res / ((double) (res + diff)));
         *result *= (FLT_MAX / (((GISTENTRY *) PG_GETARG_POINTER(0))->rel->rd_att->natts + 1));
@@ -242,8 +242,8 @@
 gbt_date_picksplit(PG_FUNCTION_ARGS)
 {
     PG_RETURN_POINTER(gbt_num_picksplit(
-                                    (GistEntryVector *) PG_GETARG_POINTER(0),
-                                      (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                        (GistEntryVector *) PG_GETARG_POINTER(0),
+                                        (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                         &tinfo, fcinfo->flinfo
                                         ));
 }
diff -ur pgsql/contrib/btree_gist/btree_enum.c pgsql-dup/contrib/btree_gist/btree_enum.c
--- pgsql/contrib/btree_gist/btree_enum.c    2017-06-16 12:31:37.659522874 -0400
+++ pgsql-dup/contrib/btree_gist/btree_enum.c    2017-06-16 12:35:21.782070739 -0400
@@ -169,8 +169,8 @@
 gbt_enum_picksplit(PG_FUNCTION_ARGS)
 {
     PG_RETURN_POINTER(gbt_num_picksplit(
-                                    (GistEntryVector *) PG_GETARG_POINTER(0),
-                                      (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                        (GistEntryVector *) PG_GETARG_POINTER(0),
+                                        (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                         &tinfo, fcinfo->flinfo
                                         ));
 }
diff -ur pgsql/contrib/btree_gist/btree_float4.c pgsql-dup/contrib/btree_gist/btree_float4.c
--- pgsql/contrib/btree_gist/btree_float4.c    2017-06-16 12:31:37.536519828 -0400
+++ pgsql-dup/contrib/btree_gist/btree_float4.c    2017-06-16 12:35:21.660067721 -0400
@@ -196,8 +196,8 @@
 gbt_float4_picksplit(PG_FUNCTION_ARGS)
 {
     PG_RETURN_POINTER(gbt_num_picksplit(
-                                    (GistEntryVector *) PG_GETARG_POINTER(0),
-                                      (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                        (GistEntryVector *) PG_GETARG_POINTER(0),
+                                        (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                         &tinfo, fcinfo->flinfo
                                         ));
 }
diff -ur pgsql/contrib/btree_gist/btree_float8.c pgsql-dup/contrib/btree_gist/btree_float8.c
--- pgsql/contrib/btree_gist/btree_float8.c    2017-06-16 12:31:37.392516263 -0400
+++ pgsql-dup/contrib/btree_gist/btree_float8.c    2017-06-16 12:35:21.520064256 -0400
@@ -203,8 +203,8 @@
 gbt_float8_picksplit(PG_FUNCTION_ARGS)
 {
     PG_RETURN_POINTER(gbt_num_picksplit(
-                                    (GistEntryVector *) PG_GETARG_POINTER(0),
-                                      (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                        (GistEntryVector *) PG_GETARG_POINTER(0),
+                                        (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                         &tinfo, fcinfo->flinfo
                                         ));
 }
diff -ur pgsql/contrib/btree_gist/btree_inet.c pgsql-dup/contrib/btree_gist/btree_inet.c
--- pgsql/contrib/btree_gist/btree_inet.c    2017-06-16 12:31:37.551520200 -0400
+++ pgsql-dup/contrib/btree_gist/btree_inet.c    2017-06-16 12:35:21.675068092 -0400
@@ -133,7 +133,7 @@
     key.upper = (GBT_NUMKEY *) &kkk->upper;

     PG_RETURN_BOOL(gbt_num_consistent(&key, (void *) &query,
-                       &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
+                                      &strategy, GIST_LEAF(entry), &tinfo, fcinfo->flinfo));
 }


@@ -165,8 +165,8 @@
 gbt_inet_picksplit(PG_FUNCTION_ARGS)
 {
     PG_RETURN_POINTER(gbt_num_picksplit(
-                                    (GistEntryVector *) PG_GETARG_POINTER(0),
-                                      (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                        (GistEntryVector *) PG_GETARG_POINTER(0),
+                                        (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                         &tinfo, fcinfo->flinfo
                                         ));
 }
diff -ur pgsql/contrib/btree_gist/btree_int2.c pgsql-dup/contrib/btree_gist/btree_int2.c
--- pgsql/contrib/btree_gist/btree_int2.c    2017-06-16 12:31:37.645522528 -0400
+++ pgsql-dup/contrib/btree_gist/btree_int2.c    2017-06-16 12:35:21.768070393 -0400
@@ -202,8 +202,8 @@
 gbt_int2_picksplit(PG_FUNCTION_ARGS)
 {
     PG_RETURN_POINTER(gbt_num_picksplit(
-                                    (GistEntryVector *) PG_GETARG_POINTER(0),
-                                      (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                        (GistEntryVector *) PG_GETARG_POINTER(0),
+                                        (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                         &tinfo, fcinfo->flinfo
                                         ));
 }
diff -ur pgsql/contrib/btree_gist/btree_time.c pgsql-dup/contrib/btree_gist/btree_time.c
--- pgsql/contrib/btree_gist/btree_time.c    2017-06-16 12:31:37.568520620 -0400
+++ pgsql-dup/contrib/btree_gist/btree_time.c    2017-06-16 12:35:21.692068512 -0400
@@ -289,15 +289,15 @@

     intr = DatumGetIntervalP(DirectFunctionCall2(
                                                  time_mi_time,
-                                        TimeADTGetDatumFast(newentry->upper),
-                                     TimeADTGetDatumFast(origentry->upper)));
+                                                 TimeADTGetDatumFast(newentry->upper),
+                                                 TimeADTGetDatumFast(origentry->upper)));
     res = INTERVAL_TO_SEC(intr);
     res = Max(res, 0);

     intr = DatumGetIntervalP(DirectFunctionCall2(
                                                  time_mi_time,
-                                       TimeADTGetDatumFast(origentry->lower),
-                                      TimeADTGetDatumFast(newentry->lower)));
+                                                 TimeADTGetDatumFast(origentry->lower),
+                                                 TimeADTGetDatumFast(newentry->lower)));
     res2 = INTERVAL_TO_SEC(intr);
     res2 = Max(res2, 0);

@@ -309,8 +309,8 @@
     {
         intr = DatumGetIntervalP(DirectFunctionCall2(
                                                      time_mi_time,
-                                       TimeADTGetDatumFast(origentry->upper),
-                                     TimeADTGetDatumFast(origentry->lower)));
+                                                     TimeADTGetDatumFast(origentry->upper),
+                                                     TimeADTGetDatumFast(origentry->lower)));
         *result += FLT_MIN;
         *result += (float) (res / (res + INTERVAL_TO_SEC(intr)));
         *result *= (FLT_MAX / (((GISTENTRY *) PG_GETARG_POINTER(0))->rel->rd_att->natts + 1));
@@ -324,8 +324,8 @@
 gbt_time_picksplit(PG_FUNCTION_ARGS)
 {
     PG_RETURN_POINTER(gbt_num_picksplit(
-                                    (GistEntryVector *) PG_GETARG_POINTER(0),
-                                      (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                        (GistEntryVector *) PG_GETARG_POINTER(0),
+                                        (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                         &tinfo, fcinfo->flinfo
                                         ));
 }
diff -ur pgsql/contrib/btree_gist/btree_ts.c pgsql-dup/contrib/btree_gist/btree_ts.c
--- pgsql/contrib/btree_gist/btree_ts.c    2017-06-16 12:31:37.442517501 -0400
+++ pgsql-dup/contrib/btree_gist/btree_ts.c    2017-06-16 12:35:21.568065444 -0400
@@ -387,8 +387,8 @@
 gbt_ts_picksplit(PG_FUNCTION_ARGS)
 {
     PG_RETURN_POINTER(gbt_num_picksplit(
-                                    (GistEntryVector *) PG_GETARG_POINTER(0),
-                                      (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                        (GistEntryVector *) PG_GETARG_POINTER(0),
+                                        (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                         &tinfo, fcinfo->flinfo
                                         ));
 }
diff -ur pgsql/contrib/btree_gist/btree_utils_var.c pgsql-dup/contrib/btree_gist/btree_utils_var.c
--- pgsql/contrib/btree_gist/btree_utils_var.c    2017-06-16 12:31:37.521519457 -0400
+++ pgsql-dup/contrib/btree_gist/btree_utils_var.c    2017-06-16 12:35:21.645067350 -0400
@@ -402,8 +402,8 @@
         *res = 0.0;
     else if (!(((*tinfo->f_cmp) (nk.lower, ok.lower, collation, flinfo) >= 0 ||
                 gbt_bytea_pf_match(ok.lower, nk.lower, tinfo)) &&
-             ((*tinfo->f_cmp) (nk.upper, ok.upper, collation, flinfo) <= 0 ||
-              gbt_bytea_pf_match(ok.upper, nk.upper, tinfo))))
+               ((*tinfo->f_cmp) (nk.upper, ok.upper, collation, flinfo) <= 0 ||
+                gbt_bytea_pf_match(ok.upper, nk.upper, tinfo))))
     {
         Datum        d = PointerGetDatum(0);
         double        dres;
diff -ur pgsql/contrib/btree_gist/btree_uuid.c pgsql-dup/contrib/btree_gist/btree_uuid.c
--- pgsql/contrib/btree_gist/btree_uuid.c    2017-06-16 12:31:37.584521017 -0400
+++ pgsql-dup/contrib/btree_gist/btree_uuid.c    2017-06-16 12:35:21.707068883 -0400
@@ -150,7 +150,7 @@

     PG_RETURN_BOOL(
                    gbt_num_consistent(&key, (void *) query, &strategy,
-                                    GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
+                                      GIST_LEAF(entry), &tinfo, fcinfo->flinfo)
         );
 }

@@ -220,8 +220,8 @@
 gbt_uuid_picksplit(PG_FUNCTION_ARGS)
 {
     PG_RETURN_POINTER(gbt_num_picksplit(
-                                    (GistEntryVector *) PG_GETARG_POINTER(0),
-                                      (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
+                                        (GistEntryVector *) PG_GETARG_POINTER(0),
+                                        (GIST_SPLITVEC *) PG_GETARG_POINTER(1),
                                         &tinfo, fcinfo->flinfo
                                         ));
 }
diff -ur pgsql/contrib/cube/cube.c pgsql-dup/contrib/cube/cube.c
--- pgsql/contrib/cube/cube.c    2017-06-16 12:31:37.174510865 -0400
+++ pgsql-dup/contrib/cube/cube.c    2017-06-16 12:35:21.303058886 -0400
@@ -483,7 +483,7 @@
             union_d = cube_union_v0(datum_alpha, datum_beta);
             rt_cube_size(union_d, &size_union);
             inter_d = DatumGetNDBOX(DirectFunctionCall2(cube_inter,
-                          entryvec->vector[i].key, entryvec->vector[j].key));
+                                                        entryvec->vector[i].key, entryvec->vector[j].key));
             rt_cube_size(inter_d, &size_inter);
             size_waste = size_union - size_inter;

@@ -1354,15 +1354,15 @@
         {
             case CubeKNNDistanceTaxicab:
                 retval = DatumGetFloat8(DirectFunctionCall2(distance_taxicab,
-                             PointerGetDatum(cube), PointerGetDatum(query)));
+                                                            PointerGetDatum(cube), PointerGetDatum(query)));
                 break;
             case CubeKNNDistanceEuclid:
                 retval = DatumGetFloat8(DirectFunctionCall2(cube_distance,
-                             PointerGetDatum(cube), PointerGetDatum(query)));
+                                                            PointerGetDatum(cube), PointerGetDatum(query)));
                 break;
             case CubeKNNDistanceChebyshev:
                 retval = DatumGetFloat8(DirectFunctionCall2(distance_chebyshev,
-                             PointerGetDatum(cube), PointerGetDatum(query)));
+                                                            PointerGetDatum(cube), PointerGetDatum(query)));
                 break;
             default:
                 elog(ERROR, "unrecognized cube strategy number: %d", strategy);
diff -ur pgsql/contrib/dblink/dblink.c pgsql-dup/contrib/dblink/dblink.c
--- pgsql/contrib/dblink/dblink.c    2017-06-16 12:31:37.778525821 -0400
+++ pgsql-dup/contrib/dblink/dblink.c    2017-06-16 12:35:21.902073710 -0400
@@ -179,7 +179,7 @@

 static void
 dblink_get_conn(char *conname_or_str,
-       PGconn *volatile *conn_p, char **conname_p, volatile bool *freeconn_p)
+                PGconn *volatile *conn_p, char **conname_p, volatile bool *freeconn_p)
 {
     remoteConn *rconn = getConnectionByName(conname_or_str);
     PGconn       *conn;
@@ -207,9 +207,9 @@

             PQfinish(conn);
             ereport(ERROR,
-               (errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION),
-                errmsg("could not establish connection"),
-                errdetail_internal("%s", msg)));
+                    (errcode(ERRCODE_SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION),
+                     errmsg("could not establish connection"),
+                     errdetail_internal("%s", msg)));
         }
         dblink_security_check(conn, rconn);
         if (PQclientEncoding(conn) != GetDatabaseEncoding())
@@ -869,8 +869,8 @@
                     /* failed to determine actual type of RECORD */
                     ereport(ERROR,
                             (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                        errmsg("function returning record called in context "
-                               "that cannot accept type record")));
+                             errmsg("function returning record called in context "
+                                    "that cannot accept type record")));
                     break;
                 default:
                     /* result type isn't composite */
@@ -909,7 +909,7 @@
                 nestlevel = applyRemoteGucs(conn);

             oldcontext = MemoryContextSwitchTo(
-                                    rsinfo->econtext->ecxt_per_query_memory);
+                                               rsinfo->econtext->ecxt_per_query_memory);
             tupstore = tuplestore_begin_heap(true, false, work_mem);
             rsinfo->setResult = tupstore;
             rsinfo->setDesc = tupdesc;
@@ -1036,7 +1036,7 @@
             attinmeta = TupleDescGetAttInMetadata(tupdesc);

             oldcontext = MemoryContextSwitchTo(
-                                    rsinfo->econtext->ecxt_per_query_memory);
+                                               rsinfo->econtext->ecxt_per_query_memory);
             tupstore = tuplestore_begin_heap(true, false, work_mem);
             rsinfo->setResult = tupstore;
             rsinfo->setDesc = tupdesc;
@@ -1460,8 +1460,8 @@
         {
             PQclear(res);
             ereport(ERROR,
-                  (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
-                   errmsg("statement returning results not allowed")));
+                    (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
+                     errmsg("statement returning results not allowed")));
         }
     }
     PG_CATCH();
@@ -1980,7 +1980,7 @@
             ereport(ERROR,
                     (errcode(ERRCODE_FDW_OUT_OF_MEMORY),
                      errmsg("out of memory"),
-             errdetail("could not get libpq's default connection options")));
+                     errdetail("could not get libpq's default connection options")));
     }

     /* Validate each supplied option. */
@@ -2179,7 +2179,7 @@
             appendStringInfoChar(&buf, ',');

         appendStringInfoString(&buf,
-                      quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname)));
+                               quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname)));
         needComma = true;
     }

@@ -2242,7 +2242,7 @@
             appendStringInfoString(&buf, " AND ");

         appendStringInfoString(&buf,
-               quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname)));
+                               quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname)));

         if (tgt_pkattvals[i] != NULL)
             appendStringInfo(&buf, " = %s",
@@ -2296,7 +2296,7 @@
             appendStringInfoString(&buf, ", ");

         appendStringInfo(&buf, "%s = ",
-                      quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname)));
+                         quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname)));

         key = get_attnum_pk_pos(pkattnums, pknumatts, i);

@@ -2325,7 +2325,7 @@
             appendStringInfoString(&buf, " AND ");

         appendStringInfoString(&buf,
-               quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname)));
+                               quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname)));

         val = tgt_pkattvals[i];

@@ -2351,7 +2351,7 @@

     rawstr_text = cstring_to_text(rawstr);
     result_text = DatumGetTextPP(DirectFunctionCall1(quote_ident,
-                                              PointerGetDatum(rawstr_text)));
+                                                     PointerGetDatum(rawstr_text)));
     result = text_to_cstring(result_text);

     return result;
@@ -2416,7 +2416,7 @@
             appendStringInfoString(&buf, "NULL");
         else
             appendStringInfoString(&buf,
-                      quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname)));
+                                   quote_ident_cstr(NameStr(tupdesc->attrs[i]->attname)));
     }

     appendStringInfo(&buf, " FROM %s WHERE ", relname);
@@ -2429,7 +2429,7 @@
             appendStringInfoString(&buf, " AND ");

         appendStringInfoString(&buf,
-               quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname)));
+                               quote_ident_cstr(NameStr(tupdesc->attrs[pkattnum]->attname)));

         if (src_pkattvals[i] != NULL)
             appendStringInfo(&buf, " = %s",
@@ -2619,10 +2619,10 @@
                 pfree(rconn);

             ereport(ERROR,
-                  (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
-                   errmsg("password is required"),
-                   errdetail("Non-superuser cannot connect if the server does not request a password."),
-                   errhint("Target server's authentication method must be changed.")));
+                    (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
+                     errmsg("password is required"),
+                     errdetail("Non-superuser cannot connect if the server does not request a password."),
+                     errhint("Target server's authentication method must be changed.")));
         }
     }
 }
@@ -2661,9 +2661,9 @@

         if (!connstr_gives_password)
             ereport(ERROR,
-                  (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
-                   errmsg("password is required"),
-                   errdetail("Non-superusers must provide a password in the connection string.")));
+                    (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
+                     errmsg("password is required"),
+                     errdetail("Non-superusers must provide a password in the connection string.")));
     }
 }

@@ -2724,8 +2724,8 @@
              message_detail ? errdetail_internal("%s", message_detail) : 0,
              message_hint ? errhint("%s", message_hint) : 0,
              message_context ? errcontext("%s", message_context) : 0,
-          errcontext("Error occurred on dblink connection named \"%s\": %s.",
-                     dblink_context_conname, dblink_context_msg)));
+             errcontext("Error occurred on dblink connection named \"%s\": %s.",
+                        dblink_context_conname, dblink_context_msg)));
 }

 /*
@@ -2760,7 +2760,7 @@
             ereport(ERROR,
                     (errcode(ERRCODE_FDW_OUT_OF_MEMORY),
                      errmsg("out of memory"),
-             errdetail("could not get libpq's default connection options")));
+                     errdetail("could not get libpq's default connection options")));
     }

     /* first gather the server connstr options */
diff -ur pgsql/contrib/hstore/hstore_op.c pgsql-dup/contrib/hstore/hstore_op.c
--- pgsql/contrib/hstore/hstore_op.c    2017-06-16 12:31:39.468567670 -0400
+++ pgsql-dup/contrib/hstore/hstore_op.c    2017-06-16 12:35:23.576115134 -0400
@@ -101,8 +101,8 @@
     if (key_count > MaxAllocSize / sizeof(Pairs))
         ereport(ERROR,
                 (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-              errmsg("number of pairs (%d) exceeds the maximum allowed (%d)",
-                     key_count, (int) (MaxAllocSize / sizeof(Pairs)))));
+                 errmsg("number of pairs (%d) exceeds the maximum allowed (%d)",
+                        key_count, (int) (MaxAllocSize / sizeof(Pairs)))));

     key_pairs = palloc(sizeof(Pairs) * key_count);

@@ -181,7 +181,7 @@
     for (i = 0; i < nkeys; i++)
     {
         int            idx = hstoreFindKey(hs, &lowbound,
-                                      key_pairs[i].key, key_pairs[i].keylen);
+                                        key_pairs[i].key, key_pairs[i].keylen);

         if (idx >= 0)
         {
@@ -215,7 +215,7 @@
     for (i = 0; i < nkeys; i++)
     {
         int            idx = hstoreFindKey(hs, &lowbound,
-                                      key_pairs[i].key, key_pairs[i].keylen);
+                                        key_pairs[i].key, key_pairs[i].keylen);

         if (idx < 0)
         {
@@ -546,8 +546,8 @@
         if (difference >= 0)
         {
             HS_COPYITEM(ed, bufd, pd,
-                      HSTORE_KEY(es2, ps2, s2idx), HSTORE_KEYLEN(es2, s2idx),
-                    HSTORE_VALLEN(es2, s2idx), HSTORE_VALISNULL(es2, s2idx));
+                        HSTORE_KEY(es2, ps2, s2idx), HSTORE_KEYLEN(es2, s2idx),
+                        HSTORE_VALLEN(es2, s2idx), HSTORE_VALISNULL(es2, s2idx));
             ++s2idx;
             if (difference == 0)
                 ++s1idx;
@@ -555,8 +555,8 @@
         else
         {
             HS_COPYITEM(ed, bufd, pd,
-                      HSTORE_KEY(es1, ps1, s1idx), HSTORE_KEYLEN(es1, s1idx),
-                    HSTORE_VALLEN(es1, s1idx), HSTORE_VALISNULL(es1, s1idx));
+                        HSTORE_KEY(es1, ps1, s1idx), HSTORE_KEYLEN(es1, s1idx),
+                        HSTORE_VALLEN(es1, s1idx), HSTORE_VALISNULL(es1, s1idx));
             ++s1idx;
         }
     }
@@ -614,8 +614,8 @@
         else
         {
             out_datums[i] = PointerGetDatum(
-                      cstring_to_text_with_len(HSTORE_VAL(entries, ptr, idx),
-                                               HSTORE_VALLEN(entries, idx)));
+                                            cstring_to_text_with_len(HSTORE_VAL(entries, ptr, idx),
+                                                                     HSTORE_VALLEN(entries, idx)));
             out_nulls[i] = false;
         }
     }
@@ -667,7 +667,7 @@
     for (i = 0; i < nkeys; ++i)
     {
         int            idx = hstoreFindKey(hs, &lastidx,
-                                      key_pairs[i].key, key_pairs[i].keylen);
+                                        key_pairs[i].key, key_pairs[i].keylen);

         if (idx >= 0)
         {
@@ -760,7 +760,7 @@
         else
         {
             text       *item = cstring_to_text_with_len(HSTORE_VAL(entries, base, i),
-                                                  HSTORE_VALLEN(entries, i));
+                                                        HSTORE_VALLEN(entries, i));

             d[i] = PointerGetDatum(item);
             nulls[i] = false;
@@ -811,7 +811,7 @@
         else
         {
             text       *item = cstring_to_text_with_len(HSTORE_VAL(entries, base, i),
-                                                  HSTORE_VALLEN(entries, i));
+                                                        HSTORE_VALLEN(entries, i));

             out_datums[i * 2 + 1] = PointerGetDatum(item);
             out_nulls[i * 2 + 1] = false;
diff -ur pgsql/contrib/intarray/_int_bool.c pgsql-dup/contrib/intarray/_int_bool.c
--- pgsql/contrib/intarray/_int_bool.c    2017-06-16 12:31:37.287513663 -0400
+++ pgsql-dup/contrib/intarray/_int_bool.c    2017-06-16 12:35:21.418061732 -0400
@@ -506,8 +506,8 @@
     if (state.num > QUERYTYPEMAXITEMS)
         ereport(ERROR,
                 (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-        errmsg("number of query items (%d) exceeds the maximum allowed (%d)",
-               state.num, (int) QUERYTYPEMAXITEMS)));
+                 errmsg("number of query items (%d) exceeds the maximum allowed (%d)",
+                        state.num, (int) QUERYTYPEMAXITEMS)));
     commonlen = COMPUTESIZE(state.num);

     query = (QUERYTYPE *) palloc(commonlen);
diff -ur pgsql/contrib/intarray/_int_gist.c pgsql-dup/contrib/intarray/_int_gist.c
--- pgsql/contrib/intarray/_int_gist.c    2017-06-16 12:31:37.236512400 -0400
+++ pgsql-dup/contrib/intarray/_int_gist.c    2017-06-16 12:35:21.368060495 -0400
@@ -83,7 +83,7 @@
         case RTOldContainedByStrategyNumber:
             if (GIST_LEAF(entry))
                 retval = inner_int_contains(query,
-                                  (ArrayType *) DatumGetPointer(entry->key));
+                                            (ArrayType *) DatumGetPointer(entry->key));
             else
                 retval = inner_int_overlap((ArrayType *) DatumGetPointer(entry->key),
                                            query);
diff -ur pgsql/contrib/intarray/_int_op.c pgsql-dup/contrib/intarray/_int_op.c
--- pgsql/contrib/intarray/_int_op.c    2017-06-16 12:31:37.203511583 -0400
+++ pgsql-dup/contrib/intarray/_int_op.c    2017-06-16 12:35:21.334059653 -0400
@@ -49,8 +49,8 @@
     PG_RETURN_BOOL(!DatumGetBool(
                                  DirectFunctionCall2(
                                                      _int_same,
-                                       PointerGetDatum(PG_GETARG_POINTER(0)),
-                                        PointerGetDatum(PG_GETARG_POINTER(1))
+                                                     PointerGetDatum(PG_GETARG_POINTER(0)),
+                                                     PointerGetDatum(PG_GETARG_POINTER(1))
                                                      )
                                  ));
 }
diff -ur pgsql/contrib/intarray/_int_selfuncs.c pgsql-dup/contrib/intarray/_int_selfuncs.c
--- pgsql/contrib/intarray/_int_selfuncs.c    2017-06-16 12:31:37.303514059 -0400
+++ pgsql-dup/contrib/intarray/_int_selfuncs.c    2017-06-16 12:35:21.433062103 -0400
@@ -57,7 +57,7 @@
 {
     PG_RETURN_DATUM(DirectFunctionCall4(arraycontsel,
                                         PG_GETARG_DATUM(0),
-                                      ObjectIdGetDatum(OID_ARRAY_OVERLAP_OP),
+                                        ObjectIdGetDatum(OID_ARRAY_OVERLAP_OP),
                                         PG_GETARG_DATUM(2),
                                         PG_GETARG_DATUM(3)));
 }
@@ -67,7 +67,7 @@
 {
     PG_RETURN_DATUM(DirectFunctionCall4(arraycontsel,
                                         PG_GETARG_DATUM(0),
-                                     ObjectIdGetDatum(OID_ARRAY_CONTAINS_OP),
+                                        ObjectIdGetDatum(OID_ARRAY_CONTAINS_OP),
                                         PG_GETARG_DATUM(2),
                                         PG_GETARG_DATUM(3)));
 }
@@ -77,7 +77,7 @@
 {
     PG_RETURN_DATUM(DirectFunctionCall4(arraycontsel,
                                         PG_GETARG_DATUM(0),
-                                    ObjectIdGetDatum(OID_ARRAY_CONTAINED_OP),
+                                        ObjectIdGetDatum(OID_ARRAY_CONTAINED_OP),
                                         PG_GETARG_DATUM(2),
                                         PG_GETARG_DATUM(3)));
 }
@@ -87,7 +87,7 @@
 {
     PG_RETURN_DATUM(DirectFunctionCall5(arraycontjoinsel,
                                         PG_GETARG_DATUM(0),
-                                      ObjectIdGetDatum(OID_ARRAY_OVERLAP_OP),
+                                        ObjectIdGetDatum(OID_ARRAY_OVERLAP_OP),
                                         PG_GETARG_DATUM(2),
                                         PG_GETARG_DATUM(3),
                                         PG_GETARG_DATUM(4)));
@@ -98,7 +98,7 @@
 {
     PG_RETURN_DATUM(DirectFunctionCall5(arraycontjoinsel,
                                         PG_GETARG_DATUM(0),
-                                     ObjectIdGetDatum(OID_ARRAY_CONTAINS_OP),
+                                        ObjectIdGetDatum(OID_ARRAY_CONTAINS_OP),
                                         PG_GETARG_DATUM(2),
                                         PG_GETARG_DATUM(3),
                                         PG_GETARG_DATUM(4)));
@@ -109,7 +109,7 @@
 {
     PG_RETURN_DATUM(DirectFunctionCall5(arraycontjoinsel,
                                         PG_GETARG_DATUM(0),
-                                    ObjectIdGetDatum(OID_ARRAY_CONTAINED_OP),
+                                        ObjectIdGetDatum(OID_ARRAY_CONTAINED_OP),
                                         PG_GETARG_DATUM(2),
                                         PG_GETARG_DATUM(3),
                                         PG_GETARG_DATUM(4)));
diff -ur pgsql/contrib/isn/isn.c pgsql-dup/contrib/isn/isn.c
--- pgsql/contrib/isn/isn.c    2017-06-16 12:31:37.905528967 -0400
+++ pgsql-dup/contrib/isn/isn.c    2017-06-16 12:35:22.030076877 -0400
@@ -887,8 +887,8 @@
         {
             ereport(ERROR,
                     (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
-            errmsg("invalid check digit for %s number: \"%s\", should be %c",
-                   isn_names[accept], str, (rcheck == 10) ? ('X') : (rcheck + '0'))));
+                     errmsg("invalid check digit for %s number: \"%s\", should be %c",
+                            isn_names[accept], str, (rcheck == 10) ? ('X') : (rcheck + '0'))));
         }
     }
     return false;
diff -ur pgsql/contrib/ltree/_ltree_op.c pgsql-dup/contrib/ltree/_ltree_op.c
--- pgsql/contrib/ltree/_ltree_op.c    2017-06-16 12:31:36.983506134 -0400
+++ pgsql-dup/contrib/ltree/_ltree_op.c    2017-06-16 12:35:21.125054481 -0400
@@ -53,7 +53,7 @@
     while (num > 0)
     {
         if (DatumGetBool(DirectFunctionCall2(callback,
-                             PointerGetDatum(item), PointerGetDatum(param))))
+                                             PointerGetDatum(item), PointerGetDatum(param))))
         {

             if (found)
diff -ur pgsql/contrib/ltree/lquery_op.c pgsql-dup/contrib/ltree/lquery_op.c
--- pgsql/contrib/ltree/lquery_op.c    2017-06-16 12:31:36.967505739 -0400
+++ pgsql-dup/contrib/ltree/lquery_op.c    2017-06-16 12:35:21.110054110 -0400
@@ -356,7 +356,7 @@
     while (num > 0)
     {
         if (DatumGetBool(DirectFunctionCall2(ltq_regex,
-                             PointerGetDatum(tree), PointerGetDatum(query))))
+                                             PointerGetDatum(tree), PointerGetDatum(query))))
         {

             res = true;
diff -ur pgsql/contrib/ltree/ltree.h pgsql-dup/contrib/ltree/ltree.h
--- pgsql/contrib/ltree/ltree.h    2017-06-16 12:31:37.035507422 -0400
+++ pgsql-dup/contrib/ltree/ltree.h    2017-06-16 12:35:21.173055670 -0400
@@ -161,7 +161,7 @@
 int            ltree_compare(const ltree *a, const ltree *b);
 bool        inner_isparent(const ltree *c, const ltree *p);
 bool compare_subnode(ltree_level *t, char *q, int len,
-            int (*cmpptr) (const char *, const char *, size_t), bool anyend);
+                int (*cmpptr) (const char *, const char *, size_t), bool anyend);
 ltree       *lca_inner(ltree **a, int len);
 int            ltree_strncasecmp(const char *a, const char *b, size_t s);

diff -ur pgsql/contrib/ltree/ltree_gist.c pgsql-dup/contrib/ltree/ltree_gist.c
--- pgsql/contrib/ltree/ltree_gist.c    2017-06-16 12:31:37.055507918 -0400
+++ pgsql-dup/contrib/ltree/ltree_gist.c    2017-06-16 12:35:21.193056164 -0400
@@ -672,8 +672,8 @@
             query = PG_GETARG_LQUERY(1);
             if (GIST_LEAF(entry))
                 res = DatumGetBool(DirectFunctionCall2(ltq_regex,
-                                              PointerGetDatum(LTG_NODE(key)),
-                                            PointerGetDatum((lquery *) query)
+                                                       PointerGetDatum(LTG_NODE(key)),
+                                                       PointerGetDatum((lquery *) query)
                                                        ));
             else
                 res = (gist_qe(key, (lquery *) query) && gist_between(key, (lquery *) query));
@@ -683,8 +683,8 @@
             query = PG_GETARG_LQUERY(1);
             if (GIST_LEAF(entry))
                 res = DatumGetBool(DirectFunctionCall2(ltxtq_exec,
-                                              PointerGetDatum(LTG_NODE(key)),
-                                            PointerGetDatum((lquery *) query)
+                                                       PointerGetDatum(LTG_NODE(key)),
+                                                       PointerGetDatum((lquery *) query)
                                                        ));
             else
                 res = gist_qtxt(key, (ltxtquery *) query);
@@ -694,8 +694,8 @@
             query = DatumGetPointer(PG_DETOAST_DATUM(PG_GETARG_DATUM(1)));
             if (GIST_LEAF(entry))
                 res = DatumGetBool(DirectFunctionCall2(lt_q_regex,
-                                              PointerGetDatum(LTG_NODE(key)),
-                                         PointerGetDatum((ArrayType *) query)
+                                                       PointerGetDatum(LTG_NODE(key)),
+                                                       PointerGetDatum((ArrayType *) query)
                                                        ));
             else
                 res = arrq_cons(key, (ArrayType *) query);
diff -ur pgsql/contrib/ltree/ltree_io.c pgsql-dup/contrib/ltree/ltree_io.c
--- pgsql/contrib/ltree/ltree_io.c    2017-06-16 12:31:37.105509156 -0400
+++ pgsql-dup/contrib/ltree/ltree_io.c    2017-06-16 12:35:21.239057302 -0400
@@ -61,8 +61,8 @@
     if (num + 1 > MaxAllocSize / sizeof(nodeitem))
         ereport(ERROR,
                 (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-             errmsg("number of levels (%d) exceeds the maximum allowed (%d)",
-                    num + 1, (int) (MaxAllocSize / sizeof(nodeitem)))));
+                 errmsg("number of levels (%d) exceeds the maximum allowed (%d)",
+                        num + 1, (int) (MaxAllocSize / sizeof(nodeitem)))));
     list = lptr = (nodeitem *) palloc(sizeof(nodeitem) * (num + 1));
     ptr = buf;
     while (*ptr)
@@ -230,8 +230,8 @@
     if (num > MaxAllocSize / ITEMSIZE)
         ereport(ERROR,
                 (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
-             errmsg("number of levels (%d) exceeds the maximum allowed (%d)",
-                    num, (int) (MaxAllocSize / ITEMSIZE))));
+                 errmsg("number of levels (%d) exceeds the maximum allowed (%d)",
+                        num, (int) (MaxAllocSize / ITEMSIZE))));
     curqlevel = tmpql = (lquery_level *) palloc0(ITEMSIZE * num);
     ptr = buf;
     while (*ptr)
diff -ur pgsql/contrib/oid2name/oid2name.c pgsql-dup/contrib/oid2name/oid2name.c
--- pgsql/contrib/oid2name/oid2name.c    2017-06-16 12:31:36.917504501 -0400
+++ pgsql-dup/contrib/oid2name/oid2name.c    2017-06-16 12:35:21.060052872 -0400
@@ -211,7 +211,7 @@
     {
         eary      ->alloc *= 2;
         eary      ->array = (char **) pg_realloc(eary->array,
-                                               eary->alloc * sizeof(char *));
+                                                 eary->alloc * sizeof(char *));
     }

     eary      ->array[eary->num] = pg_strdup(eltname);
@@ -436,7 +436,7 @@
     snprintf(todo, sizeof(todo),
              "SELECT pg_catalog.pg_relation_filenode(c.oid) as \"Filenode\", relname as \"Table Name\" %s "
              "FROM pg_catalog.pg_class c "
-           "    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace "
+             "    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace "
              "    LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database(),"
              "    pg_catalog.pg_tablespace t "
              "WHERE relkind IN (" CppAsString2(RELKIND_RELATION) ","
@@ -507,7 +507,7 @@
     todo = psprintf(
                     "SELECT pg_catalog.pg_relation_filenode(c.oid) as \"Filenode\", relname as \"Table Name\" %s\n"
                     "FROM pg_catalog.pg_class c\n"
-         "    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n"
+                    "    LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n"
                     "    LEFT JOIN pg_catalog.pg_database d ON d.datname = pg_catalog.current_database(),\n"
                     "    pg_catalog.pg_tablespace t\n"
                     "WHERE relkind IN (" CppAsString2(RELKIND_RELATION) ","
diff -ur pgsql/contrib/pageinspect/brinfuncs.c pgsql-dup/contrib/pageinspect/brinfuncs.c
--- pgsql/contrib/pageinspect/brinfuncs.c    2017-06-16 12:31:37.992531121 -0400
+++ pgsql-dup/contrib/pageinspect/brinfuncs.c    2017-06-16 12:35:22.114078954 -0400
@@ -226,7 +226,7 @@
             if (ItemIdIsUsed(itemId))
             {
                 dtup = brin_deform_tuple(bdesc,
-                                     (BrinTuple *) PageGetItem(page, itemId),
+                                         (BrinTuple *) PageGetItem(page, itemId),
                                          NULL);
                 attno = 1;
                 unusedItem = false;
diff -ur pgsql/contrib/pageinspect/btreefuncs.c pgsql-dup/contrib/pageinspect/btreefuncs.c
--- pgsql/contrib/pageinspect/btreefuncs.c    2017-06-16 12:31:38.010531567 -0400
+++ pgsql-dup/contrib/pageinspect/btreefuncs.c    2017-06-16 12:35:22.132079400 -0400
@@ -346,7 +346,7 @@
         if (RELATION_IS_OTHER_TEMP(rel))
             ereport(ERROR,
                     (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                errmsg("cannot access temporary tables of other sessions")));
+                     errmsg("cannot access temporary tables of other sessions")));

         if (blkno == 0)
             elog(ERROR, "block 0 is a meta page");
@@ -442,7 +442,7 @@
         if (raw_page_size < SizeOfPageHeaderData)
             ereport(ERROR,
                     (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                  errmsg("input page too small (%d bytes)", raw_page_size)));
+                     errmsg("input page too small (%d bytes)", raw_page_size)));

         fctx = SRF_FIRSTCALL_INIT();
         mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx);
diff -ur pgsql/contrib/pageinspect/ginfuncs.c pgsql-dup/contrib/pageinspect/ginfuncs.c
--- pgsql/contrib/pageinspect/ginfuncs.c    2017-06-16 12:31:38.061532829 -0400
+++ pgsql-dup/contrib/pageinspect/ginfuncs.c    2017-06-16 12:35:22.182080639 -0400
@@ -196,7 +196,7 @@
         if (opaq->flags != (GIN_DATA | GIN_LEAF | GIN_COMPRESSED))
             ereport(ERROR,
                     (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                 errmsg("input page is not a compressed GIN data leaf page"),
+                     errmsg("input page is not a compressed GIN data leaf page"),
                      errdetail("Flags %04X, expected %04X",
                                opaq->flags,
                                (GIN_DATA | GIN_LEAF | GIN_COMPRESSED))));
diff -ur pgsql/contrib/pageinspect/hashfuncs.c pgsql-dup/contrib/pageinspect/hashfuncs.c
--- pgsql/contrib/pageinspect/hashfuncs.c    2017-06-16 12:31:38.046532458 -0400
+++ pgsql-dup/contrib/pageinspect/hashfuncs.c    2017-06-16 12:35:22.166080243 -0400
@@ -99,7 +99,7 @@
             case LH_BUCKET_PAGE | LH_OVERFLOW_PAGE:
                 ereport(ERROR,
                         (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                      errmsg("page is not a hash bucket or overflow page")));
+                         errmsg("page is not a hash bucket or overflow page")));
             case LH_OVERFLOW_PAGE:
                 ereport(ERROR,
                         (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
diff -ur pgsql/contrib/pageinspect/heapfuncs.c pgsql-dup/contrib/pageinspect/heapfuncs.c
--- pgsql/contrib/pageinspect/heapfuncs.c    2017-06-16 12:31:38.027531988 -0400
+++ pgsql-dup/contrib/pageinspect/heapfuncs.c    2017-06-16 12:35:22.148079796 -0400
@@ -84,7 +84,7 @@
         else
             ereport(ERROR,
                     (errcode(ERRCODE_DATA_CORRUPTED),
-               errmsg("illegal character '%c' in t_bits string", str[off])));
+                     errmsg("illegal character '%c' in t_bits string", str[off])));

         if (off % 8 == 7)
             bits[off / 8] = byte;
@@ -132,7 +132,7 @@
         if (raw_page_size < SizeOfPageHeaderData)
             ereport(ERROR,
                     (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                  errmsg("input page too small (%d bytes)", raw_page_size)));
+                     errmsg("input page too small (%d bytes)", raw_page_size)));

         fctx = SRF_FIRSTCALL_INIT();
         mctx = MemoryContextSwitchTo(fctx->multi_call_memory_ctx);
@@ -236,7 +236,7 @@
                     bits_len =
                         ((tuphdr->t_infomask2 & HEAP_NATTS_MASK) / 8 + 1) * 8;
                     values[11] = CStringGetTextDatum(
-                                     bits_to_text(tuphdr->t_bits, bits_len));
+                                                     bits_to_text(tuphdr->t_bits, bits_len));
                 }
                 else
                     nulls[11] = true;
@@ -384,7 +384,7 @@
     if (tupdata_len != off)
         ereport(ERROR,
                 (errcode(ERRCODE_DATA_CORRUPTED),
-            errmsg("end of tuple reached without looking at all its data")));
+                 errmsg("end of tuple reached without looking at all its data")));

     return makeArrayResult(raw_attrs, CurrentMemoryContext);
 }
diff -ur pgsql/contrib/pageinspect/rawpage.c pgsql-dup/contrib/pageinspect/rawpage.c
--- pgsql/contrib/pageinspect/rawpage.c    2017-06-16 12:31:37.962530377 -0400
+++ pgsql-dup/contrib/pageinspect/rawpage.c    2017-06-16 12:35:22.084078213 -0400
@@ -311,7 +311,7 @@
     if (raw_page_size != BLCKSZ)
         ereport(ERROR,
                 (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-          errmsg("incorrect size of input page (%d bytes)", raw_page_size)));
+                 errmsg("incorrect size of input page (%d bytes)", raw_page_size)));

     page = (PageHeader) VARDATA(raw_page);

diff -ur pgsql/contrib/passwordcheck/passwordcheck.c pgsql-dup/contrib/passwordcheck/passwordcheck.c
--- pgsql/contrib/passwordcheck/passwordcheck.c    2017-06-16 12:31:39.279562991 -0400
+++ pgsql-dup/contrib/passwordcheck/passwordcheck.c    2017-06-16 12:35:23.390110531 -0400
@@ -112,7 +112,7 @@
         if (!pwd_has_letter || !pwd_has_nonletter)
             ereport(ERROR,
                     (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-               errmsg("password must contain both letters and nonletters")));
+                     errmsg("password must contain both letters and nonletters")));

 #ifdef USE_CRACKLIB
         /* call cracklib to check password */
diff -ur pgsql/contrib/pg_prewarm/pg_prewarm.c pgsql-dup/contrib/pg_prewarm/pg_prewarm.c
--- pgsql/contrib/pg_prewarm/pg_prewarm.c    2017-06-16 12:31:39.211561306 -0400
+++ pgsql-dup/contrib/pg_prewarm/pg_prewarm.c    2017-06-16 12:35:23.321108824 -0400
@@ -138,8 +138,8 @@
         if (last_block < 0 || last_block >= nblocks)
             ereport(ERROR,
                     (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-            errmsg("ending block number must be between 0 and " INT64_FORMAT,
-                   nblocks - 1)));
+                     errmsg("ending block number must be between 0 and " INT64_FORMAT,
+                            nblocks - 1)));
     }

     /* Now we're ready to do the real work. */
diff -ur pgsql/contrib/pg_standby/pg_standby.c pgsql-dup/contrib/pg_standby/pg_standby.c
--- pgsql/contrib/pg_standby/pg_standby.c    2017-06-16 12:31:36.875503461 -0400
+++ pgsql-dup/contrib/pg_standby/pg_standby.c    2017-06-16 12:35:21.017051809 -0400
@@ -256,7 +256,7 @@
                  * in case this worries you.
                  */
                 if (IsXLogFileName(xlde->d_name) &&
-                  strcmp(xlde->d_name + 8, exclusiveCleanupFileName + 8) < 0)
+                    strcmp(xlde->d_name + 8, exclusiveCleanupFileName + 8) < 0)
                 {
 #ifdef WIN32
                     snprintf(WALFilePath, sizeof(WALFilePath), "%s\\%s", archiveLocation, xlde->d_name);
@@ -523,7 +523,7 @@
            "Main intended use as restore_command in recovery.conf:\n"
            "  restore_command = 'pg_standby [OPTION]... ARCHIVELOCATION %%f %%p %%r'\n"
            "e.g.\n"
-    "  restore_command = 'pg_standby /mnt/server/archiverdir %%f %%p %%r'\n");
+           "  restore_command = 'pg_standby /mnt/server/archiverdir %%f %%p %%r'\n");
     printf("\nReport bugs to <pgsql-bugs@postgresql.org>.\n");
 }

diff -ur pgsql/contrib/pg_stat_statements/pg_stat_statements.c
pgsql-dup/contrib/pg_stat_statements/pg_stat_statements.c
--- pgsql/contrib/pg_stat_statements/pg_stat_statements.c    2017-06-16 12:31:38.373540556 -0400
+++ pgsql-dup/contrib/pg_stat_statements/pg_stat_statements.c    2017-06-16 12:35:22.493088334 -0400
@@ -358,7 +358,7 @@
      * Define (or redefine) custom GUC variables.
      */
     DefineCustomIntVariable("pg_stat_statements.max",
-      "Sets the maximum number of statements tracked by pg_stat_statements.",
+                            "Sets the maximum number of statements tracked by pg_stat_statements.",
                             NULL,
                             &pgss_max,
                             5000,
@@ -371,7 +371,7 @@
                             NULL);

     DefineCustomEnumVariable("pg_stat_statements.track",
-               "Selects which statements are tracked by pg_stat_statements.",
+                             "Selects which statements are tracked by pg_stat_statements.",
                              NULL,
                              &pgss_track,
                              PGSS_TRACK_TOP,
@@ -383,7 +383,7 @@
                              NULL);

     DefineCustomBoolVariable("pg_stat_statements.track_utility",
-       "Selects whether utility commands are tracked by pg_stat_statements.",
+                             "Selects whether utility commands are tracked by pg_stat_statements.",
                              NULL,
                              &pgss_track_utility,
                              true,
@@ -394,7 +394,7 @@
                              NULL);

     DefineCustomBoolVariable("pg_stat_statements.save",
-               "Save pg_stat_statements statistics across server shutdowns.",
+                             "Save pg_stat_statements statistics across server shutdowns.",
                              NULL,
                              &pgss_save,
                              true,
diff -ur pgsql/contrib/pgcrypto/crypt-blowfish.c pgsql-dup/contrib/pgcrypto/crypt-blowfish.c
--- pgsql/contrib/pgcrypto/crypt-blowfish.c    2017-06-16 12:31:38.957555016 -0400
+++ pgsql-dup/contrib/pgcrypto/crypt-blowfish.c    2017-06-16 12:35:23.067102539 -0400
@@ -737,7 +737,7 @@

     memcpy(output, setting, 7 + 22 - 1);
     output[7 + 22 - 1] = BF_itoa64[(int)
-                         BF_atoi64[(int) setting[7 + 22 - 1] - 0x20] & 0x30];
+                                   BF_atoi64[(int) setting[7 + 22 - 1] - 0x20] & 0x30];

 /* This has to be bug-compatible with the original implementation, so
  * only encode 23 of the 24 bytes. :-) */
diff -ur pgsql/contrib/pgcrypto/crypt-gensalt.c pgsql-dup/contrib/pgcrypto/crypt-gensalt.c
--- pgsql/contrib/pgcrypto/crypt-gensalt.c    2017-06-16 12:31:38.609546399 -0400
+++ pgsql-dup/contrib/pgcrypto/crypt-gensalt.c    2017-06-16 12:35:22.729094174 -0400
@@ -23,7 +23,7 @@

 char *
 _crypt_gensalt_traditional_rn(unsigned long count,
-                  const char *input, int size, char *output, int output_size)
+                              const char *input, int size, char *output, int output_size)
 {
     if (size < 2 || output_size < 2 + 1 || (count && count != 25))
     {
@@ -41,7 +41,7 @@

 char *
 _crypt_gensalt_extended_rn(unsigned long count,
-                  const char *input, int size, char *output, int output_size)
+                           const char *input, int size, char *output, int output_size)
 {
     unsigned long value;

@@ -77,7 +77,7 @@

 char *
 _crypt_gensalt_md5_rn(unsigned long count,
-                  const char *input, int size, char *output, int output_size)
+                      const char *input, int size, char *output, int output_size)
 {
     unsigned long value;

@@ -159,7 +159,7 @@

 char *
 _crypt_gensalt_blowfish_rn(unsigned long count,
-                  const char *input, int size, char *output, int output_size)
+                           const char *input, int size, char *output, int output_size)
 {
     if (size < 16 || output_size < 7 + 22 + 1 ||
         (count && (count < 4 || count > 31)))
diff -ur pgsql/contrib/pgcrypto/px-crypt.h pgsql-dup/contrib/pgcrypto/px-crypt.h
--- pgsql/contrib/pgcrypto/px-crypt.h    2017-06-16 12:31:38.388540927 -0400
+++ pgsql-dup/contrib/pgcrypto/px-crypt.h    2017-06-16 12:35:22.507088681 -0400
@@ -57,13 +57,13 @@

 /* crypt-gensalt.c */
 char *_crypt_gensalt_traditional_rn(unsigned long count,
-                 const char *input, int size, char *output, int output_size);
+                              const char *input, int size, char *output, int output_size);
 char *_crypt_gensalt_extended_rn(unsigned long count,
-                 const char *input, int size, char *output, int output_size);
+                           const char *input, int size, char *output, int output_size);
 char *_crypt_gensalt_md5_rn(unsigned long count,
-                 const char *input, int size, char *output, int output_size);
+                      const char *input, int size, char *output, int output_size);
 char *_crypt_gensalt_blowfish_rn(unsigned long count,
-                 const char *input, int size, char *output, int output_size);
+                           const char *input, int size, char *output, int output_size);

 /* disable 'extended DES crypt' */
 /* #define DISABLE_XDES */
diff -ur pgsql/src/bin/psql/describe.c pgsql-dup/src/bin/psql/describe.c
--- pgsql/src/bin/psql/describe.c    2017-06-16 12:31:06.247745021 -0400
+++ pgsql-dup/src/bin/psql/describe.c    2017-06-16 12:34:50.771303324 -0400
@@ -69,7 +69,7 @@
     printfPQExpBuffer(&buf,
                       "SELECT n.nspname as \"%s\",\n"
                       "  p.proname AS \"%s\",\n"
-                 "  pg_catalog.format_type(p.prorettype, NULL) AS \"%s\",\n",
+                      "  pg_catalog.format_type(p.prorettype, NULL) AS \"%s\",\n",
                       gettext_noop("Schema"),
                       gettext_noop("Name"),
                       gettext_noop("Result data type"));
@@ -78,7 +78,7 @@
         appendPQExpBuffer(&buf,
                           "  CASE WHEN p.pronargs = 0\n"
                           "    THEN CAST('*' AS pg_catalog.text)\n"
-                     "    ELSE pg_catalog.pg_get_function_arguments(p.oid)\n"
+                          "    ELSE pg_catalog.pg_get_function_arguments(p.oid)\n"
                           "  END AS \"%s\",\n",
                           gettext_noop("Argument data types"));
     else if (pset.sversion >= 80200)
@@ -88,7 +88,7 @@
                           "    ELSE\n"
                           "    pg_catalog.array_to_string(ARRAY(\n"
                           "      SELECT\n"
-                 "        pg_catalog.format_type(p.proargtypes[s.i], NULL)\n"
+                          "        pg_catalog.format_type(p.proargtypes[s.i], NULL)\n"
                           "      FROM\n"
                           "        pg_catalog.generate_series(0, pg_catalog.array_upper(p.proargtypes, 1)) AS s(i)\n"
                           "    ), ', ')\n"
@@ -96,13 +96,13 @@
                           gettext_noop("Argument data types"));
     else
         appendPQExpBuffer(&buf,
-             "  pg_catalog.format_type(p.proargtypes[0], NULL) AS \"%s\",\n",
+                          "  pg_catalog.format_type(p.proargtypes[0], NULL) AS \"%s\",\n",
                           gettext_noop("Argument data types"));

     appendPQExpBuffer(&buf,
-                 "  pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"\n"
+                      "  pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"\n"
                       "FROM pg_catalog.pg_proc p\n"
-       "     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"
+                      "     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n"
                       "WHERE p.proisagg\n",
                       gettext_noop("Description"));

@@ -167,7 +167,7 @@
     {
         appendPQExpBuffer(&buf,
                           ",\n  amhandler AS \"%s\",\n"
-                      "  pg_catalog.obj_description(oid, 'pg_am') AS \"%s\"",
+                          "  pg_catalog.obj_description(oid, 'pg_am') AS \"%s\"",
                           gettext_noop("Handler"),
                           gettext_noop("Description"));
     }
@@ -223,15 +223,15 @@
     if (pset.sversion >= 90200)
         printfPQExpBuffer(&buf,
                           "SELECT spcname AS \"%s\",\n"
-                        "  pg_catalog.pg_get_userbyid(spcowner) AS \"%s\",\n"
-                        "  pg_catalog.pg_tablespace_location(oid) AS \"%s\"",
+                          "  pg_catalog.pg_get_userbyid(spcowner) AS \"%s\",\n"
+                          "  pg_catalog.pg_tablespace_location(oid) AS \"%s\"",
                           gettext_noop("Name"),
                           gettext_noop("Owner"),
                           gettext_noop("Location"));
     else
         printfPQExpBuffer(&buf,
                           "SELECT spcname AS \"%s\",\n"
-                        "  pg_catalog.pg_get_userbyid(spcowner) AS \"%s\",\n"
+                          "  pg_catalog.pg_get_userbyid(spcowner) AS \"%s\",\n"
                           "  spclocation AS \"%s\"",
                           gettext_noop("Name"),
                           gettext_noop("Owner"),
@@ -255,7 +255,7 @@

     if (verbose && pset.sversion >= 80200)
         appendPQExpBuffer(&buf,
-         ",\n  pg_catalog.shobj_description(oid, 'pg_tablespace') AS \"%s\"",
+                          ",\n  pg_catalog.shobj_description(oid, 'pg_tablespace') AS \"%s\"",
                           gettext_noop("Description"));

     appendPQExpBufferStr(&buf,
@@ -344,8 +344,8 @@

     if (pset.sversion >= 80400)
         appendPQExpBuffer(&buf,
-                    "  pg_catalog.pg_get_function_result(p.oid) as \"%s\",\n"
-                 "  pg_catalog.pg_get_function_arguments(p.oid) as \"%s\",\n"
+                          "  pg_catalog.pg_get_function_result(p.oid) as \"%s\",\n"
+                          "  pg_catalog.pg_get_function_arguments(p.oid) as \"%s\",\n"
                           " CASE\n"
                           "  WHEN p.proisagg THEN '%s'\n"
                           "  WHEN p.proiswindow THEN '%s'\n"
@@ -362,22 +362,22 @@
                           gettext_noop("Type"));
     else if (pset.sversion >= 80100)
         appendPQExpBuffer(&buf,
-                     "  CASE WHEN p.proretset THEN 'SETOF ' ELSE '' END ||\n"
-                  "  pg_catalog.format_type(p.prorettype, NULL) as \"%s\",\n"
+                          "  CASE WHEN p.proretset THEN 'SETOF ' ELSE '' END ||\n"
+                          "  pg_catalog.format_type(p.prorettype, NULL) as \"%s\",\n"
                           "  CASE WHEN proallargtypes IS NOT NULL THEN\n"
                           "    pg_catalog.array_to_string(ARRAY(\n"
                           "      SELECT\n"
                           "        CASE\n"
                           "          WHEN p.proargmodes[s.i] = 'i' THEN ''\n"
-                      "          WHEN p.proargmodes[s.i] = 'o' THEN 'OUT '\n"
-                    "          WHEN p.proargmodes[s.i] = 'b' THEN 'INOUT '\n"
-                 "          WHEN p.proargmodes[s.i] = 'v' THEN 'VARIADIC '\n"
+                          "          WHEN p.proargmodes[s.i] = 'o' THEN 'OUT '\n"
+                          "          WHEN p.proargmodes[s.i] = 'b' THEN 'INOUT '\n"
+                          "          WHEN p.proargmodes[s.i] = 'v' THEN 'VARIADIC '\n"
                           "        END ||\n"
                           "        CASE\n"
-             "          WHEN COALESCE(p.proargnames[s.i], '') = '' THEN ''\n"
+                          "          WHEN COALESCE(p.proargnames[s.i], '') = '' THEN ''\n"
                           "          ELSE p.proargnames[s.i] || ' '\n"
                           "        END ||\n"
-              "        pg_catalog.format_type(p.proallargtypes[s.i], NULL)\n"
+                          "        pg_catalog.format_type(p.proallargtypes[s.i], NULL)\n"
                           "      FROM\n"
                           "        pg_catalog.generate_series(1, pg_catalog.array_upper(p.proallargtypes, 1)) AS
s(i)\n"
                           "    ), ', ')\n"
@@ -385,10 +385,10 @@
                           "    pg_catalog.array_to_string(ARRAY(\n"
                           "      SELECT\n"
                           "        CASE\n"
-           "          WHEN COALESCE(p.proargnames[s.i+1], '') = '' THEN ''\n"
+                          "          WHEN COALESCE(p.proargnames[s.i+1], '') = '' THEN ''\n"
                           "          ELSE p.proargnames[s.i+1] || ' '\n"
                           "          END ||\n"
-                 "        pg_catalog.format_type(p.proargtypes[s.i], NULL)\n"
+                          "        pg_catalog.format_type(p.proargtypes[s.i], NULL)\n"
                           "      FROM\n"
                           "        pg_catalog.generate_series(0, pg_catalog.array_upper(p.proargtypes, 1)) AS s(i)\n"
                           "    ), ', ')\n"
@@ -407,9 +407,9 @@
                           gettext_noop("Type"));
     else
         appendPQExpBuffer(&buf,
-                     "  CASE WHEN p.proretset THEN 'SETOF ' ELSE '' END ||\n"
-                  "  pg_catalog.format_type(p.prorettype, NULL) as \"%s\",\n"
-                    "  pg_catalog.oidvectortypes(p.proargtypes) as \"%s\",\n"
+                          "  CASE WHEN p.proretset THEN 'SETOF ' ELSE '' END ||\n"
+                          "  pg_catalog.format_type(p.prorettype, NULL) as \"%s\",\n"
+                          "  pg_catalog.oidvectortypes(p.proargtypes) as \"%s\",\n"
                           "  CASE\n"
                           "    WHEN p.proisagg THEN '%s'\n"
                           "    WHEN p.prorettype = 'pg_catalog.trigger'::pg_catalog.regtype THEN '%s'\n"
@@ -447,8 +447,8 @@
                               gettext_noop("unsafe"),
                               gettext_noop("Parallel"));
         appendPQExpBuffer(&buf,
-                       ",\n pg_catalog.pg_get_userbyid(p.proowner) as \"%s\""
-                 ",\n CASE WHEN prosecdef THEN '%s' ELSE '%s' END AS \"%s\"",
+                          ",\n pg_catalog.pg_get_userbyid(p.proowner) as \"%s\""
+                          ",\n CASE WHEN prosecdef THEN '%s' ELSE '%s' END AS \"%s\"",
                           gettext_noop("Owner"),
                           gettext_noop("definer"),
                           gettext_noop("invoker"),
@@ -458,7 +458,7 @@
         appendPQExpBuffer(&buf,
                           ",\n l.lanname as \"%s\""
                           ",\n p.prosrc as \"%s\""
-                ",\n pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"",
+                          ",\n pg_catalog.obj_description(p.oid, 'pg_proc') as \"%s\"",
                           gettext_noop("Language"),
                           gettext_noop("Source code"),
                           gettext_noop("Description"));
@@ -466,11 +466,11 @@

     appendPQExpBufferStr(&buf,
                          "\nFROM pg_catalog.pg_proc p"
-    "\n     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n");
+                         "\n     LEFT JOIN pg_catalog.pg_namespace n ON n.oid = p.pronamespace\n");

     if (verbose)
         appendPQExpBufferStr(&buf,
-           "     LEFT JOIN pg_catalog.pg_language l ON l.oid = p.prolang\n");
+                             "     LEFT JOIN pg_catalog.pg_language l ON l.oid = p.prolang\n");

     have_where = false;

@@ -530,7 +530,7 @@
             if (needs_or)
                 appendPQExpBufferStr(&buf, "       OR ");
             appendPQExpBufferStr(&buf,
-                "p.prorettype = 'pg_catalog.trigger'::pg_catalog.regtype\n");
+                                 "p.prorettype = 'pg_catalog.trigger'::pg_catalog.regtype\n");
             needs_or = true;
         }
         if (showWindow)
@@ -634,7 +634,7 @@
     if (verbose)
     {
         appendPQExpBuffer(&buf,
-                     "  pg_catalog.pg_get_userbyid(t.typowner) AS \"%s\",\n",
+                          "  pg_catalog.pg_get_userbyid(t.typowner) AS \"%s\",\n",
                           gettext_noop("Owner"));
     }
     if (verbose && pset.sversion >= 90200)

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Andrew Borodin
Date:
Subject: [HACKERS] Re: [HACKERS] 答复: GiST API Adancement
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] Preliminary results for proposed new pgindentimplementation