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

Commit1e9c858

Browse files
committed
pgindent run prior to branching
1 parent2c64d20 commit1e9c858

File tree

18 files changed

+62
-62
lines changed

18 files changed

+62
-62
lines changed

‎contrib/postgres_fdw/postgres_fdw.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2020,12 +2020,11 @@ postgresBeginForeignInsert(ModifyTableState *mtstate,
20202020
/*
20212021
* If the foreign table is a partition, we need to create a new RTE
20222022
* describing the foreign table for use by deparseInsertSql and
2023-
* create_foreign_modify() below, after first copying the parent's
2024-
* RTE and modifying some fields to describe the foreign partition to
2025-
* work on. However, if this is invoked by UPDATE, the existing RTE
2026-
* may already correspond to this partition if it is one of the
2027-
* UPDATE subplan target rels; in that case, we can just use the
2028-
* existing RTE as-is.
2023+
* create_foreign_modify() below, after first copying the parent's RTE and
2024+
* modifying some fields to describe the foreign partition to work on.
2025+
* However, if this is invoked by UPDATE, the existing RTE may already
2026+
* correspond to this partition if it is one of the UPDATE subplan target
2027+
* rels; in that case, we can just use the existing RTE as-is.
20292028
*/
20302029
rte=list_nth(estate->es_range_table,resultRelation-1);
20312030
if (rte->relid!=RelationGetRelid(rel))
@@ -2035,10 +2034,10 @@ postgresBeginForeignInsert(ModifyTableState *mtstate,
20352034
rte->relkind=RELKIND_FOREIGN_TABLE;
20362035

20372036
/*
2038-
* For UPDATE, we must use the RT index of the first subplan
2039-
*targetrel's RTE, because the core code would have built
2040-
*expressions forthe partition, such as RETURNING, using that
2041-
*RT index as varno ofVars contained in those expressions.
2037+
* For UPDATE, we must use the RT index of the first subplan target
2038+
* rel's RTE, because the core code would have built expressions for
2039+
* the partition, such as RETURNING, using that RT index as varno of
2040+
* Vars contained in those expressions.
20422041
*/
20432042
if (plan&&plan->operation==CMD_UPDATE&&
20442043
resultRelation==plan->nominalRelation)

‎src/backend/access/gin/ginfast.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ ginHeapTupleFastInsert(GinState *ginstate, GinTupleCollector *collector)
247247
metapage=BufferGetPage(metabuffer);
248248

249249
/*
250-
* An insertion to the pending list could logically belong anywhere in
251-
*thetree, so it conflicts with all serializable scans. All scans
252-
*acquire apredicate lock on the metabuffer to represent that.
250+
* An insertion to the pending list could logically belong anywhere in the
251+
* tree, so it conflicts with all serializable scans. All scans acquire a
252+
* predicate lock on the metabuffer to represent that.
253253
*/
254254
CheckForSerializableConflictIn(index,NULL,metabuffer);
255255

‎src/backend/access/gin/ginget.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,8 +235,8 @@ collectMatchBitmap(GinBtreeData *btree, GinBtreeStack *stack,
235235
LockBuffer(stack->buffer,GIN_UNLOCK);
236236

237237
/*
238-
* Acquire predicate lock on the posting tree. We already hold
239-
*alock on the entry page, but insertions to the posting tree
238+
* Acquire predicate lock on the posting tree. We already hold a
239+
* lock on the entry page, but insertions to the posting tree
240240
* don't check for conflicts on that level.
241241
*/
242242
PredicateLockPage(btree->index,rootPostingTree,snapshot);
@@ -1766,8 +1766,8 @@ scanPendingInsert(IndexScanDesc scan, TIDBitmap *tbm, int64 *ntids)
17661766
*ntids=0;
17671767

17681768
/*
1769-
* Acquire predicate lock on the metapage, to conflict with any
1770-
*fastupdateinsertions.
1769+
* Acquire predicate lock on the metapage, to conflict with any fastupdate
1770+
* insertions.
17711771
*/
17721772
PredicateLockPage(scan->indexRelation,GIN_METAPAGE_BLKNO,scan->xs_snapshot);
17731773

‎src/backend/access/nbtree/nbtree.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -820,10 +820,10 @@ _bt_vacuum_needs_cleanup(IndexVacuumInfo *info)
820820

821821
/*
822822
* If table receives enough insertions and no cleanup was performed,
823-
* then index would appear have stale statistics. If scale factor
824-
*isset, we avoid that by performing cleanup if the number of
825-
*insertedtuples exceeds vacuum_cleanup_index_scale_factor fraction
826-
*oforiginal tuples count.
823+
* then index would appear have stale statistics. If scale factor is
824+
* set, we avoid that by performing cleanup if the number of inserted
825+
* tuples exceeds vacuum_cleanup_index_scale_factor fraction of
826+
* original tuples count.
827827
*/
828828
relopts= (StdRdOptions*)info->index->rd_options;
829829
cleanup_scale_factor= (relopts&&
@@ -873,8 +873,8 @@ btbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats,
873873
&oldestBtpoXact);
874874

875875
/*
876-
* Update cleanup-related information in metapage. This information
877-
*isused only for cleanup but keeping them up to date can avoid
876+
* Update cleanup-related information in metapage. This information is
877+
* used only for cleanup but keeping them up to date can avoid
878878
* unnecessary cleanup even after bulkdelete.
879879
*/
880880
_bt_update_meta_cleanup_info(info->index,oldestBtpoXact,

‎src/backend/access/nbtree/nbtutils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,8 +2196,8 @@ _bt_check_natts(Relation rel, Page page, OffsetNumber offnum)
21962196
* non-zero, or when there is no explicit representation and the
21972197
* tuple is evidently not a pre-pg_upgrade tuple.
21982198
*
2199-
* Prior to v11, downlinks always had P_HIKEY as their offset.
2200-
*Usethat to decide if the tuple is a pre-v11 tuple.
2199+
* Prior to v11, downlinks always had P_HIKEY as their offset. Use
2200+
* that to decide if the tuple is a pre-v11 tuple.
22012201
*/
22022202
returnBTreeTupleGetNAtts(itup,rel)==0||
22032203
((itup->t_info&INDEX_ALT_TID_MASK)==0&&

‎src/backend/access/transam/xlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4512,7 +4512,7 @@ ReadControlFile(void)
45124512
errmsg("could not read from control file: %m")));
45134513
else
45144514
ereport(PANIC,
4515-
(errmsg("could not read from control file: read %d bytes, expected %d",r, (int)sizeof(ControlFileData))));
4515+
(errmsg("could not read from control file: read %d bytes, expected %d",r, (int)sizeof(ControlFileData))));
45164516
}
45174517
pgstat_report_wait_end();
45184518

‎src/backend/access/transam/xlogreader.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,9 +829,9 @@ XLogReaderValidatePageHeader(XLogReaderState *state, XLogRecPtr recptr,
829829
}
830830

831831
/*
832-
* Check that the address on the page agrees with what we expected.
833-
*Thischeck typically fails when an old WAL segment is recycled,
834-
*and hasn'tyet been overwritten with new data yet.
832+
* Check that the address on the page agrees with what we expected. This
833+
* check typically fails when an old WAL segment is recycled, and hasn't
834+
* yet been overwritten with new data yet.
835835
*/
836836
if (hdr->xlp_pageaddr!=recaddr)
837837
{

‎src/backend/commands/indexcmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ DefineIndex(Oid relationId,
10021002
*/
10031003
foreach(lc,childStmt->indexParams)
10041004
{
1005-
IndexElem*ielem=lfirst(lc);
1005+
IndexElem*ielem=lfirst(lc);
10061006

10071007
/*
10081008
* If the index parameter is an expression, we must

‎src/backend/executor/execMain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ ExecPartitionCheck(ResultRelInfo *resultRelInfo, TupleTableSlot *slot,
18651865
EState*estate,boolemitError)
18661866
{
18671867
ExprContext*econtext;
1868-
boolsuccess;
1868+
boolsuccess;
18691869

18701870
/*
18711871
* If first time through, build expression state tree for the partition

‎src/backend/replication/logical/reorderbuffer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -754,9 +754,9 @@ ReorderBufferAssignChild(ReorderBuffer *rb, TransactionId xid,
754754
else
755755
{
756756
/*
757-
* We already saw this transaction, but initially added it to the list
758-
* of top-level txns. Now that we know it's not top-level, remove
759-
* it from there.
757+
* We already saw this transaction, but initially added it to the
758+
*listof top-level txns. Now that we know it's not top-level,
759+
*removeit from there.
760760
*/
761761
dlist_delete(&subtxn->node);
762762
}

‎src/backend/storage/ipc/procarray.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2014,8 +2014,8 @@ GetRunningTransactionData(void)
20142014
/*
20152015
* If we wished to exclude xids this would be the right place for it.
20162016
* Procs with the PROC_IN_VACUUM flag set don't usually assign xids,
2017-
* but they do during truncation at the end when they get the lock
2018-
*andtruncate, so it is not much of a problem to include them if they
2017+
* but they do during truncation at the end when they get the lock and
2018+
* truncate, so it is not much of a problem to include them if they
20192019
* are seen and it is cleaner to include them.
20202020
*/
20212021

‎src/backend/storage/ipc/standby.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ static void LogAccessExclusiveLocks(int nlocks, xl_standby_lock *locks);
5353
*/
5454
typedefstructRecoveryLockListsEntry
5555
{
56-
TransactionIdxid;
57-
List*locks;
56+
TransactionIdxid;
57+
List*locks;
5858
}RecoveryLockListsEntry;
5959

6060
/*
@@ -73,7 +73,7 @@ void
7373
InitRecoveryTransactionEnvironment(void)
7474
{
7575
VirtualTransactionIdvxid;
76-
HASHCTLhash_ctl;
76+
HASHCTLhash_ctl;
7777

7878
/*
7979
* Initialize the hash table for tracking the list of locks held by each
@@ -671,6 +671,7 @@ StandbyReleaseLockList(List *locks)
671671
{
672672
xl_standby_lock*lock= (xl_standby_lock*)linitial(locks);
673673
LOCKTAGlocktag;
674+
674675
elog(trace_recovery(DEBUG4),
675676
"releasing recovery lock: xid %u db %u rel %u",
676677
lock->xid,lock->dbOid,lock->relOid);
@@ -728,7 +729,7 @@ StandbyReleaseLockTree(TransactionId xid, int nsubxids, TransactionId *subxids)
728729
void
729730
StandbyReleaseAllLocks(void)
730731
{
731-
HASH_SEQ_STATUSstatus;
732+
HASH_SEQ_STATUSstatus;
732733
RecoveryLockListsEntry*entry;
733734

734735
elog(trace_recovery(DEBUG2),"release all standby locks");
@@ -749,7 +750,7 @@ StandbyReleaseAllLocks(void)
749750
void
750751
StandbyReleaseOldLocks(TransactionIdoldxid)
751752
{
752-
HASH_SEQ_STATUSstatus;
753+
HASH_SEQ_STATUSstatus;
753754
RecoveryLockListsEntry*entry;
754755

755756
hash_seq_init(&status,RecoveryLockLists);

‎src/backend/tcop/utility.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1316,8 +1316,8 @@ ProcessUtilitySlow(ParseState *pstate,
13161316
* acquire locks early to avoid deadlocks.
13171317
*
13181318
* We also take the opportunity to verify that all
1319-
* partitions are something we can put an index on,
1320-
*toavoid building some indexes only to fail later.
1319+
* partitions are something we can put an index on, to
1320+
* avoid building some indexes only to fail later.
13211321
*/
13221322
if (stmt->relation->inh&&
13231323
get_rel_relkind(relid)==RELKIND_PARTITIONED_TABLE)
@@ -1328,7 +1328,7 @@ ProcessUtilitySlow(ParseState *pstate,
13281328
inheritors=find_all_inheritors(relid,lockmode,NULL);
13291329
foreach(lc,inheritors)
13301330
{
1331-
charrelkind=get_rel_relkind(lfirst_oid(lc));
1331+
charrelkind=get_rel_relkind(lfirst_oid(lc));
13321332

13331333
if (relkind!=RELKIND_RELATION&&
13341334
relkind!=RELKIND_MATVIEW&&

‎src/backend/utils/adt/jsonb.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,29 +1902,29 @@ cannotCastJsonbValue(enum jbvType type, const char *sqltype)
19021902
{
19031903
staticconststruct
19041904
{
1905-
enumjbvTypetype;
1906-
constchar*msg;
1905+
enumjbvTypetype;
1906+
constchar*msg;
19071907
}
1908-
messages[]=
1908+
messages[]=
19091909
{
1910-
{jbvNull,gettext_noop("cannot cast jsonb null to type %s")},
1911-
{jbvString,gettext_noop("cannot cast jsonb string to type %s")},
1912-
{jbvNumeric,gettext_noop("cannot cast jsonb numeric to type %s")},
1913-
{jbvBool,gettext_noop("cannot cast jsonb boolean to type %s")},
1914-
{jbvArray,gettext_noop("cannot cast jsonb array to type %s")},
1915-
{jbvObject,gettext_noop("cannot cast jsonb object to type %s")},
1916-
{jbvBinary,gettext_noop("cannot cast jsonb array or object to type %s")}
1910+
{jbvNull,gettext_noop("cannot cast jsonb null to type %s")},
1911+
{jbvString,gettext_noop("cannot cast jsonb string to type %s")},
1912+
{jbvNumeric,gettext_noop("cannot cast jsonb numeric to type %s")},
1913+
{jbvBool,gettext_noop("cannot cast jsonb boolean to type %s")},
1914+
{jbvArray,gettext_noop("cannot cast jsonb array to type %s")},
1915+
{jbvObject,gettext_noop("cannot cast jsonb object to type %s")},
1916+
{jbvBinary,gettext_noop("cannot cast jsonb array or object to type %s")}
19171917
};
1918-
inti;
1918+
inti;
19191919

1920-
for(i=0;i<lengthof(messages);i++)
1920+
for (i=0;i<lengthof(messages);i++)
19211921
if (messages[i].type==type)
19221922
ereport(ERROR,
19231923
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
19241924
errmsg(messages[i].msg,sqltype)));
19251925

19261926
/* should be unreachable */
1927-
elog(ERROR,"unknown jsonb type: %d", (int)type);
1927+
elog(ERROR,"unknown jsonb type: %d", (int)type);
19281928
}
19291929

19301930
Datum

‎src/bin/pg_dump/pg_dump.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ typedef struct _tableInfo
316316
char**attoptions;/* per-attribute options */
317317
Oid*attcollation;/* per-attribute collation selection */
318318
char**attfdwoptions;/* per-attribute fdw options */
319-
char**attmissingval;/* per attribute missing value */
319+
char**attmissingval;/* per attribute missing value */
320320
bool*notnull;/* NOT NULL constraints on attributes */
321321
bool*inhNotNull;/* true if NOT NULL is inherited */
322322
struct_attrDefInfo**attrdefs;/* DEFAULT expressions */

‎src/bin/psql/tab-complete.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,14 +1856,14 @@ psql_completion(const char *text, int start, int end)
18561856
/* ALTER INDEX <foo> SET|RESET ( */
18571857
elseif (Matches5("ALTER","INDEX",MatchAny,"RESET","("))
18581858
COMPLETE_WITH_LIST8("fillfactor","recheck_on_update",
1859-
"vacuum_cleanup_index_scale_factor",/* BTREE */
1859+
"vacuum_cleanup_index_scale_factor",/* BTREE */
18601860
"fastupdate","gin_pending_list_limit",/* GIN */
18611861
"buffering",/* GiST */
18621862
"pages_per_range","autosummarize"/* BRIN */
18631863
);
18641864
elseif (Matches5("ALTER","INDEX",MatchAny,"SET","("))
18651865
COMPLETE_WITH_LIST8("fillfactor =","recheck_on_update =",
1866-
"vacuum_cleanup_index_scale_factor =",/* BTREE */
1866+
"vacuum_cleanup_index_scale_factor =",/* BTREE */
18671867
"fastupdate =","gin_pending_list_limit =",/* GIN */
18681868
"buffering =",/* GiST */
18691869
"pages_per_range =","autosummarize ="/* BRIN */

‎src/include/access/xlogreader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ extern struct XLogRecord *XLogReadRecord(XLogReaderState *state,
207207

208208
/* Validate a page */
209209
externboolXLogReaderValidatePageHeader(XLogReaderState*state,
210-
XLogRecPtrrecptr,char*phdr);
210+
XLogRecPtrrecptr,char*phdr);
211211

212212
/* Invalidate read state */
213213
externvoidXLogReaderInvalReadState(XLogReaderState*state);

‎src/include/replication/reorderbuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ typedef struct ReorderBufferTXN
214214
*/
215215
Snapshotbase_snapshot;
216216
XLogRecPtrbase_snapshot_lsn;
217-
dlist_nodebase_snapshot_node;/* link in txns_by_base_snapshot_lsn */
217+
dlist_nodebase_snapshot_node;/* link in txns_by_base_snapshot_lsn */
218218

219219
/*
220220
* How many ReorderBufferChange's do we have in this txn.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp