Skip to content

Commit

Permalink
pgindent run
Browse files Browse the repository at this point in the history
  • Loading branch information
akorotkov committed May 9, 2023
1 parent 1c2fd3d commit 5657366
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion include/recovery/wal.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
typedef struct
{
uint8 recType;
} WALRec;
} WALRec;

typedef struct
{
Expand Down
4 changes: 2 additions & 2 deletions src/btree/check.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ check_btree(BTreeDescr *desc, bool force_file_check)
if (map_extents.size != 0)
{
bool sorted = is_compressed ? is_sorted_by_len_off(&map_extents)
: is_sorted_by_off(&map_extents);
: is_sorted_by_off(&map_extents);

if (!sorted)
{
Expand All @@ -193,7 +193,7 @@ check_btree(BTreeDescr *desc, bool force_file_check)
if (tmp_extents.size != 0)
{
bool sorted = is_compressed ? is_sorted_by_len_off(&tmp_extents)
: is_sorted_by_off(&tmp_extents);
: is_sorted_by_off(&tmp_extents);

if (!sorted)
{
Expand Down
4 changes: 2 additions & 2 deletions src/btree/iterator.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ o_find_tuple_version(BTreeDescr *desc, Page p, BTreePageItemLocator *loc,
bool version_check = !txIsFinished;
OXid tupOxid = version_check ? XACT_INFO_GET_OXID(xactInfo) : InvalidOXid;
TupleFetchCallbackCheckType check_type = version_check ?
OTupleFetchCallbackVersionCheck :
OTupleFetchCallbackKeyCheck;
OTupleFetchCallbackVersionCheck :
OTupleFetchCallbackKeyCheck;

cbResult = cb(curTuple, tupOxid, csn, arg, check_type);

Expand Down
4 changes: 2 additions & 2 deletions src/catalog/o_sys_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -1732,7 +1732,7 @@ o_sys_cache_toast_cmp(BTreeDescr *desc, void *p1, BTreeKeyType k1,
else
{
OSysCacheToastChunkKey *chunk_key =
((OSysCacheToastChunkKey *) ((OTuple *) p1)->data);
((OSysCacheToastChunkKey *) ((OTuple *) p1)->data);

key1 = &chunk_key->sys_cache_key;
offset1 = chunk_key->common.offset;
Expand Down Expand Up @@ -1762,7 +1762,7 @@ o_sys_cache_toast_cmp(BTreeDescr *desc, void *p1, BTreeKeyType k1,
else
{
OSysCacheToastChunkKey *chunk_key =
((OSysCacheToastChunkKey *) ((OTuple *) p2)->data);
((OSysCacheToastChunkKey *) ((OTuple *) p2)->data);

key2 = &chunk_key->sys_cache_key;
offset2 = chunk_key->common.offset;
Expand Down
4 changes: 2 additions & 2 deletions src/orioledb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1393,8 +1393,8 @@ orioledb_get_relation_info_hook(PlannerInfo *rootPageBlkno,
{
Oid typeoid = primary->fields[i].inputtype;
bool valid = typeoid == INT4OID ||
typeoid == INT8OID ||
typeoid == TIDOID;
typeoid == INT8OID ||
typeoid == TIDOID;

hasbitmap = hasbitmap && valid;
}
Expand Down
2 changes: 1 addition & 1 deletion src/recovery/wal.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ add_rel_wal_record(ORelOids oids, OIndexType type)
void
add_o_tables_meta_lock_wal_record(void)
{
WALRec *rec;
WALRec *rec;

Assert(!is_recovery_process());
flush_local_wal_if_needed(sizeof(*rec));
Expand Down
2 changes: 1 addition & 1 deletion src/tableam/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ orioledb_tuple_update(Relation relation, Datum tupleid, TupleTableSlot *slot,
int options, TM_FailureData *tmfd,
LockTupleMode *lockmode,
#if PG_VERSION_NUM >= 160000
TU_UpdateIndexes * update_indexes,
TU_UpdateIndexes *update_indexes,
#else
bool *update_indexes,
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/tableam/index_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ o_exec_fetch(OScanState *ostate, ScanState *ss, CommitSeqNo csn)
TupleTableSlot *slot;
OTuple tuple;
bool scan_primary = ostate->ixNum == PrimaryIndexNumber ||
!ostate->onlyCurIx;
!ostate->onlyCurIx;
MemoryContext tupleCxt = ss->ss_ScanTupleSlot->tts_mcxt;

do
Expand Down
20 changes: 10 additions & 10 deletions src/tableam/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ o_create_custom_scan_state(CustomScan *cscan)
if (plan_tag == O_IndexPlan)
{
OIndexPlanState *ix_plan_state =
(OIndexPlanState *) palloc0(sizeof(OIndexPlanState));
(OIndexPlanState *) palloc0(sizeof(OIndexPlanState));

ix_plan_state->ostate.ixNum = intVal(lthird(cscan->custom_private));
ix_plan_state->ostate.scanDir = intVal(lfourth(cscan->custom_private));
Expand Down Expand Up @@ -579,7 +579,7 @@ o_create_custom_scan_state(CustomScan *cscan)
else if (plan_tag == O_BitmapHeapPlan)
{
OBitmapHeapPlanState *bitmap_state =
(OBitmapHeapPlanState *) palloc0(sizeof(OBitmapHeapPlanState));
(OBitmapHeapPlanState *) palloc0(sizeof(OBitmapHeapPlanState));
BitmapHeapScan *bh_scan = (BitmapHeapScan *) custom_plan;

bitmap_state->typeoid = intVal(lthird(cscan->custom_private));
Expand Down Expand Up @@ -622,7 +622,7 @@ o_begin_custom_scan(CustomScanState *node, EState *estate, int eflags)
if (ocstate->o_plan_state->type == O_IndexPlan)
{
OIndexPlanState *ix_plan_state =
(OIndexPlanState *) ocstate->o_plan_state;
(OIndexPlanState *) ocstate->o_plan_state;
OScanState *scan_state = &ix_plan_state->ostate;

scan_state->csn = estate->es_snapshot->snapshotcsn;
Expand All @@ -634,7 +634,7 @@ o_begin_custom_scan(CustomScanState *node, EState *estate, int eflags)
else if (ocstate->o_plan_state->type == O_BitmapHeapPlan)
{
OBitmapHeapPlanState *bitmap_state =
(OBitmapHeapPlanState *) ocstate->o_plan_state;
(OBitmapHeapPlanState *) ocstate->o_plan_state;

bitmap_state->bitmapqualplanstate =
ExecInitNode(bitmap_state->bitmapqualplan, estate, eflags);
Expand Down Expand Up @@ -679,7 +679,7 @@ o_exec_custom_scan(CustomScanState *node)
if (ocstate->o_plan_state->type == O_IndexPlan)
{
OIndexPlanState *ix_plan_state =
(OIndexPlanState *) ocstate->o_plan_state;
(OIndexPlanState *) ocstate->o_plan_state;

csn = ix_plan_state->ostate.csn;

Expand Down Expand Up @@ -747,7 +747,7 @@ o_exec_custom_scan(CustomScanState *node)
else if (ocstate->o_plan_state->type == O_BitmapHeapPlan)
{
OBitmapHeapPlanState *bitmap_state =
(OBitmapHeapPlanState *) ocstate->o_plan_state;
(OBitmapHeapPlanState *) ocstate->o_plan_state;

if (bitmap_state->scan == NULL)
{
Expand Down Expand Up @@ -783,7 +783,7 @@ o_rescan_custom_scan(CustomScanState *node)
if (ocstate->o_plan_state->type == O_IndexPlan)
{
OIndexPlanState *ix_plan_state =
(OIndexPlanState *) ocstate->o_plan_state;
(OIndexPlanState *) ocstate->o_plan_state;

if (node->ss.ps.chgParam != NULL)
{
Expand Down Expand Up @@ -841,7 +841,7 @@ o_end_custom_scan(CustomScanState *node)
else if (ocstate->o_plan_state->type == O_BitmapHeapPlan)
{
OBitmapHeapPlanState *bitmap_state =
(OBitmapHeapPlanState *) ocstate->o_plan_state;
(OBitmapHeapPlanState *) ocstate->o_plan_state;

if (bitmap_state->bitmapqualplanstate)
ExecEndNode(bitmap_state->bitmapqualplanstate);
Expand Down Expand Up @@ -1013,7 +1013,7 @@ o_explain_custom_scan(CustomScanState *node, List *ancestors, ExplainState *es)
if (ocstate->o_plan_state->type == O_IndexPlan)
{
OIndexPlanState *ix_plan_state =
(OIndexPlanState *) ocstate->o_plan_state;
(OIndexPlanState *) ocstate->o_plan_state;
bool backward = (ix_plan_state->ostate.scanDir ==
BackwardScanDirection);
char *direction = !backward ? "Forward" : "Backward";
Expand Down Expand Up @@ -1056,7 +1056,7 @@ o_explain_custom_scan(CustomScanState *node, List *ancestors, ExplainState *es)
else if (ocstate->o_plan_state->type == O_BitmapHeapPlan)
{
OBitmapHeapPlanState *bitmap_state =
(OBitmapHeapPlanState *) ocstate->o_plan_state;
(OBitmapHeapPlanState *) ocstate->o_plan_state;

switch (es->format)
{
Expand Down

0 comments on commit 5657366

Please sign in to comment.