Skip to content

Commit ae556c4

Browse files
committed
Some vertical reformatting
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
1 parent 23382b0 commit ae556c4

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

src/backend/catalog/index.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -329,8 +329,7 @@ ConstructTupleDescriptor(Relation heapRelation,
329329
to->attstattarget = -1;
330330
to->attcacheoff = -1;
331331
to->attislocal = true;
332-
to->attcollation = (i < numkeyatts) ?
333-
collationIds[i] : InvalidOid;
332+
to->attcollation = (i < numkeyatts) ? collationIds[i] : InvalidOid;
334333

335334
/*
336335
* Set the attribute name as specified by caller.
@@ -438,8 +437,7 @@ ConstructTupleDescriptor(Relation heapRelation,
438437
{
439438
tuple = SearchSysCache1(CLAOID, ObjectIdGetDatum(opclassIds[i]));
440439
if (!HeapTupleIsValid(tuple))
441-
elog(ERROR, "cache lookup failed for opclass %u",
442-
opclassIds[i]);
440+
elog(ERROR, "cache lookup failed for opclass %u", opclassIds[i]);
443441
opclassTup = (Form_pg_opclass) GETSTRUCT(tuple);
444442
if (OidIsValid(opclassTup->opckeytype))
445443
keyType = opclassTup->opckeytype;
@@ -1159,11 +1157,9 @@ index_create(Relation heapRelation,
11591157
/* The default collation is pinned, so don't bother recording it */
11601158
for (i = 0; i < indexInfo->ii_NumIndexKeyAttrs; i++)
11611159
{
1162-
if (OidIsValid(collationIds[i]) &&
1163-
collationIds[i] != DEFAULT_COLLATION_OID)
1160+
if (OidIsValid(collationIds[i]) && collationIds[i] != DEFAULT_COLLATION_OID)
11641161
{
1165-
ObjectAddressSet(referenced, CollationRelationId,
1166-
collationIds[i]);
1162+
ObjectAddressSet(referenced, CollationRelationId, collationIds[i]);
11671163
add_exact_object_address(&referenced, addrs);
11681164
}
11691165
}

src/backend/commands/indexcmds.c

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ static void ComputeIndexAttrs(IndexInfo *indexInfo,
8181
const List *attList,
8282
const List *exclusionOpNames,
8383
Oid relId,
84-
const char *accessMethodName, Oid accessMethodId,
84+
const char *accessMethodName,
85+
Oid accessMethodId,
8586
bool amcanorder,
8687
bool isconstraint,
8788
Oid ddl_userid,
@@ -274,10 +275,8 @@ CheckIndexCompatible(Oid oldId,
274275
d = SysCacheGetAttrNotNull(INDEXRELID, tuple, Anum_pg_index_indclass);
275276
old_indclass = (oidvector *) DatumGetPointer(d);
276277

277-
ret = (memcmp(old_indclass->values, opclassIds,
278-
old_natts * sizeof(Oid)) == 0 &&
279-
memcmp(old_indcollation->values, collationIds,
280-
old_natts * sizeof(Oid)) == 0);
278+
ret = (memcmp(old_indclass->values, opclassIds, old_natts * sizeof(Oid)) == 0 &&
279+
memcmp(old_indcollation->values, collationIds, old_natts * sizeof(Oid)) == 0);
281280

282281
ReleaseSysCache(tuple);
283282

@@ -603,8 +602,7 @@ DefineIndex(Oid tableId,
603602
*/
604603
if (!OidIsValid(parentIndexId))
605604
{
606-
pgstat_progress_start_command(PROGRESS_COMMAND_CREATE_INDEX,
607-
tableId);
605+
pgstat_progress_start_command(PROGRESS_COMMAND_CREATE_INDEX, tableId);
608606
pgstat_progress_update_param(PROGRESS_CREATEIDX_COMMAND,
609607
concurrent ?
610608
PROGRESS_CREATEIDX_COMMAND_CREATE_CONCURRENTLY :
@@ -1262,8 +1260,7 @@ DefineIndex(Oid tableId,
12621260
*/
12631261
if (total_parts < 0)
12641262
{
1265-
List *children = find_all_inheritors(tableId,
1266-
NoLock, NULL);
1263+
List *children = find_all_inheritors(tableId, NoLock, NULL);
12671264

12681265
total_parts = list_length(children) - 1;
12691266
list_free(children);
@@ -3789,8 +3786,7 @@ ReindexRelationConcurrently(Oid relationOid, const ReindexParams *params)
37893786
if (indexRel->rd_rel->relpersistence == RELPERSISTENCE_TEMP)
37903787
elog(ERROR, "cannot reindex a temporary table concurrently");
37913788

3792-
pgstat_progress_start_command(PROGRESS_COMMAND_CREATE_INDEX,
3793-
idx->tableId);
3789+
pgstat_progress_start_command(PROGRESS_COMMAND_CREATE_INDEX, idx->tableId);
37943790

37953791
progress_vals[0] = PROGRESS_CREATEIDX_COMMAND_REINDEX_CONCURRENTLY;
37963792
progress_vals[1] = 0; /* initializing */
@@ -4015,8 +4011,7 @@ ReindexRelationConcurrently(Oid relationOid, const ReindexParams *params)
40154011
* Update progress for the index to build, with the correct parent
40164012
* table involved.
40174013
*/
4018-
pgstat_progress_start_command(PROGRESS_COMMAND_CREATE_INDEX,
4019-
newidx->tableId);
4014+
pgstat_progress_start_command(PROGRESS_COMMAND_CREATE_INDEX, newidx->tableId);
40204015
progress_vals[0] = PROGRESS_CREATEIDX_COMMAND_REINDEX_CONCURRENTLY;
40214016
progress_vals[1] = PROGRESS_CREATEIDX_PHASE_VALIDATE_IDXSCAN;
40224017
progress_vals[2] = newidx->indexId;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy