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