Some vertical reformatting
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 23 Aug 2023 04:14:11 +0000 (06:14 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 23 Aug 2023 04:39:39 +0000 (06:39 +0200)
Remove some line breaks that have become unnecessary after some
variable renaming.

Discussion: https://www.postgresql.org/message-id/flat/5ed89c69-f4e6-5dab-4003-63bde7460e5e%40eisentraut.org

src/backend/catalog/index.c
src/backend/commands/indexcmds.c

index 05b6f9ca1ab9760dfd7a73c427a2d4284f62df5c..fd09378848e570a95015006fd9ccf5936ccdb446 100644 (file)
@@ -329,8 +329,7 @@ ConstructTupleDescriptor(Relation heapRelation,
                to->attstattarget = -1;
                to->attcacheoff = -1;
                to->attislocal = true;
-               to->attcollation = (i < numkeyatts) ?
-                       collationIds[i] : InvalidOid;
+               to->attcollation = (i < numkeyatts) ? collationIds[i] : InvalidOid;
 
                /*
                 * Set the attribute name as specified by caller.
@@ -438,8 +437,7 @@ ConstructTupleDescriptor(Relation heapRelation,
                {
                        tuple = SearchSysCache1(CLAOID, ObjectIdGetDatum(opclassIds[i]));
                        if (!HeapTupleIsValid(tuple))
-                               elog(ERROR, "cache lookup failed for opclass %u",
-                                        opclassIds[i]);
+                               elog(ERROR, "cache lookup failed for opclass %u", opclassIds[i]);
                        opclassTup = (Form_pg_opclass) GETSTRUCT(tuple);
                        if (OidIsValid(opclassTup->opckeytype))
                                keyType = opclassTup->opckeytype;
@@ -1159,11 +1157,9 @@ index_create(Relation heapRelation,
                /* The default collation is pinned, so don't bother recording it */
                for (i = 0; i < indexInfo->ii_NumIndexKeyAttrs; i++)
                {
-                       if (OidIsValid(collationIds[i]) &&
-                               collationIds[i] != DEFAULT_COLLATION_OID)
+                       if (OidIsValid(collationIds[i]) && collationIds[i] != DEFAULT_COLLATION_OID)
                        {
-                               ObjectAddressSet(referenced, CollationRelationId,
-                                                                collationIds[i]);
+                               ObjectAddressSet(referenced, CollationRelationId, collationIds[i]);
                                add_exact_object_address(&referenced, addrs);
                        }
                }
index f4e69e5db004a5d6496348cebb3977aa2ba9c723..ab8b81b3020198f33e4f8ccb99fda77cb2ea686a 100644 (file)
@@ -81,7 +81,8 @@ static void ComputeIndexAttrs(IndexInfo *indexInfo,
                                                          const List *attList,
                                                          const List *exclusionOpNames,
                                                          Oid relId,
-                                                         const char *accessMethodName, Oid accessMethodId,
+                                                         const char *accessMethodName,
+                                                         Oid accessMethodId,
                                                          bool amcanorder,
                                                          bool isconstraint,
                                                          Oid ddl_userid,
@@ -274,10 +275,8 @@ CheckIndexCompatible(Oid oldId,
        d = SysCacheGetAttrNotNull(INDEXRELID, tuple, Anum_pg_index_indclass);
        old_indclass = (oidvector *) DatumGetPointer(d);
 
-       ret = (memcmp(old_indclass->values, opclassIds,
-                                 old_natts * sizeof(Oid)) == 0 &&
-                  memcmp(old_indcollation->values, collationIds,
-                                 old_natts * sizeof(Oid)) == 0);
+       ret = (memcmp(old_indclass->values, opclassIds, old_natts * sizeof(Oid)) == 0 &&
+                  memcmp(old_indcollation->values, collationIds, old_natts * sizeof(Oid)) == 0);
 
        ReleaseSysCache(tuple);
 
@@ -603,8 +602,7 @@ DefineIndex(Oid tableId,
         */
        if (!OidIsValid(parentIndexId))
        {
-               pgstat_progress_start_command(PROGRESS_COMMAND_CREATE_INDEX,
-                                                                         tableId);
+               pgstat_progress_start_command(PROGRESS_COMMAND_CREATE_INDEX, tableId);
                pgstat_progress_update_param(PROGRESS_CREATEIDX_COMMAND,
                                                                         concurrent ?
                                                                         PROGRESS_CREATEIDX_COMMAND_CREATE_CONCURRENTLY :
@@ -1262,8 +1260,7 @@ DefineIndex(Oid tableId,
                                 */
                                if (total_parts < 0)
                                {
-                                       List       *children = find_all_inheritors(tableId,
-                                                                                                                          NoLock, NULL);
+                                       List       *children = find_all_inheritors(tableId, NoLock, NULL);
 
                                        total_parts = list_length(children) - 1;
                                        list_free(children);
@@ -3789,8 +3786,7 @@ ReindexRelationConcurrently(Oid relationOid, const ReindexParams *params)
                if (indexRel->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
                        elog(ERROR, "cannot reindex a temporary table concurrently");
 
-               pgstat_progress_start_command(PROGRESS_COMMAND_CREATE_INDEX,
-                                                                         idx->tableId);
+               pgstat_progress_start_command(PROGRESS_COMMAND_CREATE_INDEX, idx->tableId);
 
                progress_vals[0] = PROGRESS_CREATEIDX_COMMAND_REINDEX_CONCURRENTLY;
                progress_vals[1] = 0;   /* initializing */
@@ -4015,8 +4011,7 @@ ReindexRelationConcurrently(Oid relationOid, const ReindexParams *params)
                 * Update progress for the index to build, with the correct parent
                 * table involved.
                 */
-               pgstat_progress_start_command(PROGRESS_COMMAND_CREATE_INDEX,
-                                                                         newidx->tableId);
+               pgstat_progress_start_command(PROGRESS_COMMAND_CREATE_INDEX, newidx->tableId);
                progress_vals[0] = PROGRESS_CREATEIDX_COMMAND_REINDEX_CONCURRENTLY;
                progress_vals[1] = PROGRESS_CREATEIDX_PHASE_VALIDATE_IDXSCAN;
                progress_vals[2] = newidx->indexId;