mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
pgindent run for 9.5
This commit is contained in:
11
src/backend/utils/cache/inval.c
vendored
11
src/backend/utils/cache/inval.c
vendored
@ -226,7 +226,7 @@ AddInvalidationMessage(InvalidationChunk **listHdr,
|
||||
chunk = (InvalidationChunk *)
|
||||
MemoryContextAlloc(CurTransactionContext,
|
||||
offsetof(InvalidationChunk, msgs) +
|
||||
FIRSTCHUNKSIZE * sizeof(SharedInvalidationMessage));
|
||||
FIRSTCHUNKSIZE * sizeof(SharedInvalidationMessage));
|
||||
chunk->nitems = 0;
|
||||
chunk->maxitems = FIRSTCHUNKSIZE;
|
||||
chunk->next = *listHdr;
|
||||
@ -240,7 +240,7 @@ AddInvalidationMessage(InvalidationChunk **listHdr,
|
||||
chunk = (InvalidationChunk *)
|
||||
MemoryContextAlloc(CurTransactionContext,
|
||||
offsetof(InvalidationChunk, msgs) +
|
||||
chunksize * sizeof(SharedInvalidationMessage));
|
||||
chunksize * sizeof(SharedInvalidationMessage));
|
||||
chunk->nitems = 0;
|
||||
chunk->maxitems = chunksize;
|
||||
chunk->next = *listHdr;
|
||||
@ -333,6 +333,7 @@ AddCatcacheInvalidationMessage(InvalidationListHeader *hdr,
|
||||
msg.cc.id = (int8) id;
|
||||
msg.cc.dbId = dbId;
|
||||
msg.cc.hashValue = hashValue;
|
||||
|
||||
/*
|
||||
* Define padding bytes in SharedInvalidationMessage structs to be
|
||||
* defined. Otherwise the sinvaladt.c ringbuffer, which is accessed by
|
||||
@ -712,11 +713,11 @@ PrepareInvalidationState(void)
|
||||
myInfo->my_level = GetCurrentTransactionNestLevel();
|
||||
|
||||
/*
|
||||
* If there's any previous entry, this one should be for a deeper
|
||||
* nesting level.
|
||||
* If there's any previous entry, this one should be for a deeper nesting
|
||||
* level.
|
||||
*/
|
||||
Assert(transInvalInfo == NULL ||
|
||||
myInfo->my_level > transInvalInfo->my_level);
|
||||
myInfo->my_level > transInvalInfo->my_level);
|
||||
|
||||
transInvalInfo = myInfo;
|
||||
}
|
||||
|
4
src/backend/utils/cache/lsyscache.c
vendored
4
src/backend/utils/cache/lsyscache.c
vendored
@ -3012,8 +3012,8 @@ get_tablesample_method_name(Oid tsmid)
|
||||
tuple = SearchSysCache1(TABLESAMPLEMETHODOID, ObjectIdGetDatum(tsmid));
|
||||
if (HeapTupleIsValid(tuple))
|
||||
{
|
||||
Form_pg_tablesample_method tup =
|
||||
(Form_pg_tablesample_method) GETSTRUCT(tuple);
|
||||
Form_pg_tablesample_method tup =
|
||||
(Form_pg_tablesample_method) GETSTRUCT(tuple);
|
||||
char *result;
|
||||
|
||||
result = pstrdup(NameStr(tup->tsmname));
|
||||
|
4
src/backend/utils/cache/plancache.c
vendored
4
src/backend/utils/cache/plancache.c
vendored
@ -153,8 +153,8 @@ CreateCachedPlan(Node *raw_parse_tree,
|
||||
CachedPlanSource *plansource;
|
||||
MemoryContext source_context;
|
||||
MemoryContext oldcxt;
|
||||
Oid user_id;
|
||||
int security_context;
|
||||
Oid user_id;
|
||||
int security_context;
|
||||
|
||||
Assert(query_string != NULL); /* required as of 8.4 */
|
||||
|
||||
|
14
src/backend/utils/cache/relcache.c
vendored
14
src/backend/utils/cache/relcache.c
vendored
@ -873,7 +873,7 @@ equalPolicy(RowSecurityPolicy *policy1, RowSecurityPolicy *policy2)
|
||||
return false;
|
||||
if (policy1->hassublinks != policy2->hassublinks)
|
||||
return false;
|
||||
if (strcmp(policy1->policy_name,policy2->policy_name) != 0)
|
||||
if (strcmp(policy1->policy_name, policy2->policy_name) != 0)
|
||||
return false;
|
||||
if (ARR_DIMS(policy1->roles)[0] != ARR_DIMS(policy2->roles)[0])
|
||||
return false;
|
||||
@ -906,8 +906,8 @@ equalPolicy(RowSecurityPolicy *policy1, RowSecurityPolicy *policy2)
|
||||
static bool
|
||||
equalRSDesc(RowSecurityDesc *rsdesc1, RowSecurityDesc *rsdesc2)
|
||||
{
|
||||
ListCell *lc,
|
||||
*rc;
|
||||
ListCell *lc,
|
||||
*rc;
|
||||
|
||||
if (rsdesc1 == NULL && rsdesc2 == NULL)
|
||||
return true;
|
||||
@ -922,10 +922,10 @@ equalRSDesc(RowSecurityDesc *rsdesc1, RowSecurityDesc *rsdesc2)
|
||||
/* RelationBuildRowSecurity should build policies in order */
|
||||
forboth(lc, rsdesc1->policies, rc, rsdesc2->policies)
|
||||
{
|
||||
RowSecurityPolicy *l = (RowSecurityPolicy *) lfirst(lc);
|
||||
RowSecurityPolicy *r = (RowSecurityPolicy *) lfirst(rc);
|
||||
RowSecurityPolicy *l = (RowSecurityPolicy *) lfirst(lc);
|
||||
RowSecurityPolicy *r = (RowSecurityPolicy *) lfirst(rc);
|
||||
|
||||
if (!equalPolicy(l,r))
|
||||
if (!equalPolicy(l, r))
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3460,7 +3460,7 @@ RelationCacheInitializePhase3(void)
|
||||
{
|
||||
RelationBuildRowSecurity(relation);
|
||||
|
||||
Assert (relation->rd_rsdesc != NULL);
|
||||
Assert(relation->rd_rsdesc != NULL);
|
||||
restart = true;
|
||||
}
|
||||
|
||||
|
38
src/backend/utils/cache/syscache.c
vendored
38
src/backend/utils/cache/syscache.c
vendored
@ -634,7 +634,7 @@ static const struct cachedesc cacheinfo[] = {
|
||||
},
|
||||
16
|
||||
},
|
||||
{ReplicationOriginRelationId, /* REPLORIGNAME */
|
||||
{ReplicationOriginRelationId, /* REPLORIGNAME */
|
||||
ReplicationOriginNameIndex,
|
||||
1,
|
||||
{
|
||||
@ -701,26 +701,26 @@ static const struct cachedesc cacheinfo[] = {
|
||||
4
|
||||
},
|
||||
{TransformRelationId, /* TRFOID */
|
||||
TransformOidIndexId,
|
||||
1,
|
||||
{
|
||||
ObjectIdAttributeNumber,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
16
|
||||
TransformOidIndexId,
|
||||
1,
|
||||
{
|
||||
ObjectIdAttributeNumber,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
16
|
||||
},
|
||||
{TransformRelationId, /* TRFTYPELANG */
|
||||
TransformTypeLangIndexId,
|
||||
2,
|
||||
{
|
||||
Anum_pg_transform_trftype,
|
||||
Anum_pg_transform_trflang,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
16
|
||||
TransformTypeLangIndexId,
|
||||
2,
|
||||
{
|
||||
Anum_pg_transform_trftype,
|
||||
Anum_pg_transform_trflang,
|
||||
0,
|
||||
0,
|
||||
},
|
||||
16
|
||||
},
|
||||
{TSConfigMapRelationId, /* TSCONFIGMAP */
|
||||
TSConfigMapIndexId,
|
||||
|
Reference in New Issue
Block a user