Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfb3c67e

Browse files
peterepull[bot]
authored andcommitted
Some vertical reformatting
Remove some line breaks that have become unnecessary after somevariable renaming.Discussion:https://www.postgresql.org/message-id/flat/5ed89c69-f4e6-5dab-4003-63bde7460e5e%40eisentraut.org
1 parent6bd8448 commitfb3c67e

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
constList*attList,
8282
constList*exclusionOpNames,
8383
OidrelId,
84-
constchar*accessMethodName,OidaccessMethodId,
84+
constchar*accessMethodName,
85+
OidaccessMethodId,
8586
boolamcanorder,
8687
boolisconstraint,
8788
Oidddl_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)

[8]ページ先頭

©2009-2025 Movatter.jp