diff options
Diffstat (limited to 'src')
184 files changed, 1046 insertions, 1046 deletions
diff --git a/src/backend/access/brin/brin_revmap.c b/src/backend/access/brin/brin_revmap.c index 5a88574bf6e..03e53ce43ed 100644 --- a/src/backend/access/brin/brin_revmap.c +++ b/src/backend/access/brin/brin_revmap.c @@ -315,7 +315,7 @@ brinGetTupleForHeapBlock(BrinRevmap *revmap, BlockNumber heapBlk, * * Index must be locked in ShareUpdateExclusiveLock mode. * - * Return FALSE if caller should retry. + * Return false if caller should retry. */ bool brinRevmapDesummarizeRange(Relation idxrel, BlockNumber heapBlk) diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c index 13ee528e261..a1a9d9905b8 100644 --- a/src/backend/access/common/heaptuple.c +++ b/src/backend/access/common/heaptuple.c @@ -289,7 +289,7 @@ heap_fill_tuple(TupleDesc tupleDesc, */ /* ---------------- - * heap_attisnull - returns TRUE iff tuple attribute is not present + * heap_attisnull - returns true iff tuple attribute is not present * ---------------- */ bool diff --git a/src/backend/access/gin/ginbtree.c b/src/backend/access/gin/ginbtree.c index b02cb8ae58f..1b920facc20 100644 --- a/src/backend/access/gin/ginbtree.c +++ b/src/backend/access/gin/ginbtree.c @@ -41,7 +41,7 @@ ginTraverseLock(Buffer buffer, bool searchMode) page = BufferGetPage(buffer); if (GinPageIsLeaf(page)) { - if (searchMode == FALSE) + if (searchMode == false) { /* we should relock our page */ LockBuffer(buffer, GIN_UNLOCK); @@ -107,7 +107,7 @@ ginFindLeafPage(GinBtree btree, bool searchMode, Snapshot snapshot) * ok, page is correctly locked, we should check to move right .., * root never has a right link, so small optimization */ - while (btree->fullScan == FALSE && stack->blkno != btree->rootBlkno && + while (btree->fullScan == false && stack->blkno != btree->rootBlkno && btree->isMoveRight(btree, page)) { BlockNumber rightlink = GinPageGetOpaque(page)->rightlink; diff --git a/src/backend/access/gin/ginbulk.c b/src/backend/access/gin/ginbulk.c index c76f5042950..c0857180b59 100644 --- a/src/backend/access/gin/ginbulk.c +++ b/src/backend/access/gin/ginbulk.c @@ -52,7 +52,7 @@ ginCombineData(RBNode *existing, const RBNode *newdata, void *arg) } /* If item pointers are not ordered, they will need to be sorted later */ - if (eo->shouldSort == FALSE) + if (eo->shouldSort == false) { int res; @@ -60,7 +60,7 @@ ginCombineData(RBNode *existing, const RBNode *newdata, void *arg) Assert(res != 0); if (res > 0) - eo->shouldSort = TRUE; + eo->shouldSort = true; } eo->list[eo->count] = en->list[0]; @@ -176,7 +176,7 @@ ginInsertBAEntry(BuildAccumulator *accum, ea->key = getDatumCopy(accum, attnum, key); ea->maxcount = DEF_NPTR; ea->count = 1; - ea->shouldSort = FALSE; + ea->shouldSort = false; ea->list = (ItemPointerData *) palloc(sizeof(ItemPointerData) * DEF_NPTR); ea->list[0] = *heapptr; diff --git a/src/backend/access/gin/gindatapage.c b/src/backend/access/gin/gindatapage.c index 2e5ea479763..9c6cba4825b 100644 --- a/src/backend/access/gin/gindatapage.c +++ b/src/backend/access/gin/gindatapage.c @@ -235,9 +235,9 @@ dataIsMoveRight(GinBtree btree, Page page) ItemPointer iptr = GinDataPageGetRightBound(page); if (GinPageRightMost(page)) - return FALSE; + return false; - return (ginCompareItemPointers(&btree->itemptr, iptr) > 0) ? TRUE : FALSE; + return (ginCompareItemPointers(&btree->itemptr, iptr) > 0) ? true : false; } /* @@ -1875,9 +1875,9 @@ ginPrepareDataScan(GinBtree btree, Relation index, BlockNumber rootBlkno) btree->fillRoot = ginDataFillRoot; btree->prepareDownlink = dataPrepareDownlink; - btree->isData = TRUE; - btree->fullScan = FALSE; - btree->isBuild = FALSE; + btree->isData = true; + btree->fullScan = false; + btree->isBuild = false; } /* @@ -1919,9 +1919,9 @@ ginScanBeginPostingTree(GinBtree btree, Relation index, BlockNumber rootBlkno, ginPrepareDataScan(btree, index, rootBlkno); - btree->fullScan = TRUE; + btree->fullScan = true; - stack = ginFindLeafPage(btree, TRUE, snapshot); + stack = ginFindLeafPage(btree, true, snapshot); return stack; } diff --git a/src/backend/access/gin/ginentrypage.c b/src/backend/access/gin/ginentrypage.c index d5cc70258ac..bf7b05107b8 100644 --- a/src/backend/access/gin/ginentrypage.c +++ b/src/backend/access/gin/ginentrypage.c @@ -30,7 +30,7 @@ static void entrySplitPage(GinBtree btree, Buffer origbuf, * Form a tuple for entry tree. * * If the tuple would be too big to be stored, function throws a suitable - * error if errorTooBig is TRUE, or returns NULL if errorTooBig is FALSE. + * error if errorTooBig is true, or returns NULL if errorTooBig is false. * * See src/backend/access/gin/README for a description of the index tuple * format that is being built here. We build on the assumption that we @@ -249,7 +249,7 @@ entryIsMoveRight(GinBtree btree, Page page) GinNullCategory category; if (GinPageRightMost(page)) - return FALSE; + return false; itup = getRightMostTuple(page); attnum = gintuple_get_attrnum(btree->ginstate, itup); @@ -258,9 +258,9 @@ entryIsMoveRight(GinBtree btree, Page page) if (ginCompareAttEntries(btree->ginstate, btree->entryAttnum, btree->entryKey, btree->entryCategory, attnum, key, category) > 0) - return TRUE; + return true; - return FALSE; + return false; } /* @@ -356,7 +356,7 @@ entryLocateLeafEntry(GinBtree btree, GinBtreeStack *stack) if (btree->fullScan) { stack->off = FirstOffsetNumber; - return TRUE; + return true; } low = FirstOffsetNumber; @@ -762,9 +762,9 @@ ginPrepareEntryScan(GinBtree btree, OffsetNumber attnum, btree->fillRoot = ginEntryFillRoot; btree->prepareDownlink = entryPrepareDownlink; - btree->isData = FALSE; - btree->fullScan = FALSE; - btree->isBuild = FALSE; + btree->isData = false; + btree->fullScan = false; + btree->isBuild = false; btree->entryAttnum = attnum; btree->entryKey = key; diff --git a/src/backend/access/gin/ginget.c b/src/backend/access/gin/ginget.c index 98950806852..1ecf97507df 100644 --- a/src/backend/access/gin/ginget.c +++ b/src/backend/access/gin/ginget.c @@ -311,7 +311,7 @@ restartScanEntry: entry->nlist = 0; entry->matchBitmap = NULL; entry->matchResult = NULL; - entry->reduceResult = FALSE; + entry->reduceResult = false; entry->predictNumberResult = 0; /* @@ -324,9 +324,9 @@ restartScanEntry: stackEntry = ginFindLeafPage(&btreeEntry, true, snapshot); page = BufferGetPage(stackEntry->buffer); /* ginFindLeafPage() will have already checked snapshot age. */ - needUnlock = TRUE; + needUnlock = true; - entry->isFinished = TRUE; + entry->isFinished = true; if (entry->isPartialMatch || entry->queryCategory == GIN_CAT_EMPTY_QUERY) @@ -363,7 +363,7 @@ restartScanEntry: if (entry->matchBitmap && !tbm_is_empty(entry->matchBitmap)) { entry->matchIterator = tbm_begin_iterate(entry->matchBitmap); - entry->isFinished = FALSE; + entry->isFinished = false; } } else if (btreeEntry.findItem(&btreeEntry, stackEntry)) @@ -385,7 +385,7 @@ restartScanEntry: * root of posting tree. */ LockBuffer(stackEntry->buffer, GIN_UNLOCK); - needUnlock = FALSE; + needUnlock = false; stack = ginScanBeginPostingTree(&entry->btree, ginstate->index, rootPostingTree, snapshot); @@ -410,7 +410,7 @@ restartScanEntry: LockBuffer(entry->buffer, GIN_UNLOCK); freeGinBtreeStack(stack); - entry->isFinished = FALSE; + entry->isFinished = false; } else if (GinGetNPosting(itup) > 0) { @@ -418,7 +418,7 @@ restartScanEntry: &entry->nlist); entry->predictNumberResult = entry->nlist; - entry->isFinished = FALSE; + entry->isFinished = false; } } @@ -565,7 +565,7 @@ startScan(IndexScanDesc scan) for (i = 0; i < so->totalentries; i++) { so->entries[i]->predictNumberResult /= so->totalentries; - so->entries[i]->reduceResult = TRUE; + so->entries[i]->reduceResult = true; } } } @@ -666,7 +666,7 @@ entryLoadMoreItems(GinState *ginstate, GinScanEntry entry, { UnlockReleaseBuffer(entry->buffer); entry->buffer = InvalidBuffer; - entry->isFinished = TRUE; + entry->isFinished = true; return; } @@ -728,7 +728,7 @@ entryLoadMoreItems(GinState *ginstate, GinScanEntry entry, /* * Sets entry->curItem to next heap item pointer > advancePast, for one entry - * of one scan key, or sets entry->isFinished to TRUE if there are no more. + * of one scan key, or sets entry->isFinished to true if there are no more. * * Item pointers are returned in ascending order. * @@ -775,7 +775,7 @@ entryGetItem(GinState *ginstate, GinScanEntry entry, ItemPointerSetInvalid(&entry->curItem); tbm_end_iterate(entry->matchIterator); entry->matchIterator = NULL; - entry->isFinished = TRUE; + entry->isFinished = true; break; } @@ -835,7 +835,7 @@ entryGetItem(GinState *ginstate, GinScanEntry entry, entry->matchResult->offsets[entry->offset]); entry->offset++; gotitem = true; - } while (!gotitem || (entry->reduceResult == TRUE && dropItem(entry))); + } while (!gotitem || (entry->reduceResult == true && dropItem(entry))); } else if (!BufferIsValid(entry->buffer)) { @@ -848,7 +848,7 @@ entryGetItem(GinState *ginstate, GinScanEntry entry, if (entry->offset >= entry->nlist) { ItemPointerSetInvalid(&entry->curItem); - entry->isFinished = TRUE; + entry->isFinished = true; break; } @@ -876,7 +876,7 @@ entryGetItem(GinState *ginstate, GinScanEntry entry, entry->curItem = entry->list[entry->offset++]; } while (ginCompareItemPointers(&entry->curItem, &advancePast) <= 0 || - (entry->reduceResult == TRUE && dropItem(entry))); + (entry->reduceResult == true && dropItem(entry))); } } @@ -891,7 +891,7 @@ entryGetItem(GinState *ginstate, GinScanEntry entry, * iff recheck is needed for this item pointer (including the case where the * item pointer is a lossy page pointer). * - * If all entry streams are exhausted, sets key->isFinished to TRUE. + * If all entry streams are exhausted, sets key->isFinished to true. * * Item pointers must be returned in ascending order. * @@ -963,7 +963,7 @@ keyGetItem(GinState *ginstate, MemoryContext tempCtx, GinScanKey key, if (allFinished) { /* all entries are finished */ - key->isFinished = TRUE; + key->isFinished = true; return; } @@ -1051,7 +1051,7 @@ keyGetItem(GinState *ginstate, MemoryContext tempCtx, GinScanKey key, * them. We could pass them as MAYBE as well, but if we're using the * "shim" implementation of a tri-state consistent function (see * ginlogic.c), it's better to pass as few MAYBEs as possible. So pass - * them as TRUE. + * them as true. * * Note that only lossy-page entries pointing to the current item's page * should trigger this processing; we might have future lossy pages in the @@ -1064,7 +1064,7 @@ keyGetItem(GinState *ginstate, MemoryContext tempCtx, GinScanKey key, for (i = 0; i < key->nentries; i++) { entry = key->scanEntry[i]; - if (entry->isFinished == FALSE && + if (entry->isFinished == false && ginCompareItemPointers(&entry->curItem, &curPageLossy) == 0) { if (i < key->nuserentries) @@ -1314,7 +1314,7 @@ scanGetItem(IndexScanDesc scan, ItemPointerData advancePast, } } - return TRUE; + return true; } @@ -1508,7 +1508,7 @@ collectMatchesForHeapRow(IndexScanDesc scan, pendingPosition *pos) memset(key->entryRes, GIN_FALSE, key->nentries); } - memset(pos->hasMatchKey, FALSE, so->nkeys); + memset(pos->hasMatchKey, false, so->nkeys); /* * Outer loop iterates over multiple pending-list pages when a single heap diff --git a/src/backend/access/gin/gininsert.c b/src/backend/access/gin/gininsert.c index c9aa4ee147c..890b79c0cac 100644 --- a/src/backend/access/gin/gininsert.c +++ b/src/backend/access/gin/gininsert.c @@ -185,7 +185,7 @@ ginEntryInsert(GinState *ginstate, IndexTuple itup; Page page; - insertdata.isDelete = FALSE; + insertdata.isDelete = false; /* During index build, count the to-be-inserted entry */ if (buildStats) @@ -221,7 +221,7 @@ ginEntryInsert(GinState *ginstate, itup = addItemPointersToLeafTuple(ginstate, itup, items, nitem, buildStats); - insertdata.isDelete = TRUE; + insertdata.isDelete = true; } else { diff --git a/src/backend/access/gin/ginvacuum.c b/src/backend/access/gin/ginvacuum.c index 31425e9963e..a20a99c8140 100644 --- a/src/backend/access/gin/ginvacuum.c +++ b/src/backend/access/gin/ginvacuum.c @@ -235,7 +235,7 @@ ginScanToDelete(GinVacuumState *gvs, BlockNumber blkno, bool isRoot, DataPageDeleteStack *me; Buffer buffer; Page page; - bool meDelete = FALSE; + bool meDelete = false; bool isempty; if (isRoot) @@ -274,7 +274,7 @@ ginScanToDelete(GinVacuumState *gvs, BlockNumber blkno, bool isRoot, { PostingItem *pitem = GinDataPageGetPostingItem(page, i); - if (ginScanToDelete(gvs, PostingItemGetBlockNumber(pitem), FALSE, me, i)) + if (ginScanToDelete(gvs, PostingItemGetBlockNumber(pitem), false, me, i)) i--; } } @@ -291,7 +291,7 @@ ginScanToDelete(GinVacuumState *gvs, BlockNumber blkno, bool isRoot, { Assert(!isRoot); ginDeletePage(gvs, blkno, me->leftBlkno, me->parent->blkno, myoff, me->parent->isRoot); - meDelete = TRUE; + meDelete = true; } } @@ -319,7 +319,7 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) { Buffer buffer; Page page; - bool hasVoidPage = FALSE; + bool hasVoidPage = false; MemoryContext oldCxt; buffer = ReadBufferExtended(gvs->index, MAIN_FORKNUM, blkno, @@ -339,7 +339,7 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) /* if root is a leaf page, we don't desire further processing */ if (GinDataLeafPageIsEmpty(page)) - hasVoidPage = TRUE; + hasVoidPage = true; UnlockReleaseBuffer(buffer); @@ -348,8 +348,8 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) else { OffsetNumber i; - bool hasEmptyChild = FALSE; - bool hasNonEmptyChild = FALSE; + bool hasEmptyChild = false; + bool hasNonEmptyChild = false; OffsetNumber maxoff = GinPageGetOpaque(page)->maxoff; BlockNumber *children = palloc(sizeof(BlockNumber) * (maxoff + 1)); @@ -369,10 +369,10 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) for (i = FirstOffsetNumber; i <= maxoff; i++) { - if (ginVacuumPostingTreeLeaves(gvs, children[i], FALSE)) - hasEmptyChild = TRUE; + if (ginVacuumPostingTreeLeaves(gvs, children[i], false)) + hasEmptyChild = true; else - hasNonEmptyChild = TRUE; + hasNonEmptyChild = true; } pfree(children); @@ -380,12 +380,12 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) vacuum_delay_point(); /* - * All subtree is empty - just return TRUE to indicate that parent + * All subtree is empty - just return true to indicate that parent * must do a cleanup. Unless we are ROOT an there is way to go upper. */ if (hasEmptyChild && !hasNonEmptyChild && !isRoot) - return TRUE; + return true; if (hasEmptyChild) { @@ -399,9 +399,9 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) memset(&root, 0, sizeof(DataPageDeleteStack)); root.leftBlkno = InvalidBlockNumber; - root.isRoot = TRUE; + root.isRoot = true; - ginScanToDelete(gvs, blkno, TRUE, &root, InvalidOffsetNumber); + ginScanToDelete(gvs, blkno, true, &root, InvalidOffsetNumber); ptr = root.child; @@ -416,14 +416,14 @@ ginVacuumPostingTreeLeaves(GinVacuumState *gvs, BlockNumber blkno, bool isRoot) } /* Here we have deleted all empty subtrees */ - return FALSE; + return false; } } static void ginVacuumPostingTree(GinVacuumState *gvs, BlockNumber rootBlkno) { - ginVacuumPostingTreeLeaves(gvs, rootBlkno, TRUE); + ginVacuumPostingTreeLeaves(gvs, rootBlkno, true); } /* diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index aec174cd006..cf4b319b4ef 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -1364,8 +1364,8 @@ gistSplit(Relation r, IndexTupleSize(itup[0]), GiSTPageSize, RelationGetRelationName(r)))); - memset(v.spl_lisnull, TRUE, sizeof(bool) * giststate->tupdesc->natts); - memset(v.spl_risnull, TRUE, sizeof(bool) * giststate->tupdesc->natts); + memset(v.spl_lisnull, true, sizeof(bool) * giststate->tupdesc->natts); + memset(v.spl_risnull, true, sizeof(bool) * giststate->tupdesc->natts); gistSplitByKey(r, page, itup, len, giststate, &v, 0); /* form left and right vector */ diff --git a/src/backend/access/gist/gistget.c b/src/backend/access/gist/gistget.c index 06dac0bb53d..fb233a56d0e 100644 --- a/src/backend/access/gist/gistget.c +++ b/src/backend/access/gist/gistget.c @@ -197,7 +197,7 @@ gistindex_keytest(IndexScanDesc scan, gistdentryinit(giststate, key->sk_attno - 1, &de, datum, r, page, offset, - FALSE, isNull); + false, isNull); /* * Call the Consistent function to evaluate the test. The @@ -258,7 +258,7 @@ gistindex_keytest(IndexScanDesc scan, gistdentryinit(giststate, key->sk_attno - 1, &de, datum, r, page, offset, - FALSE, isNull); + false, isNull); /* * Call the Distance function to evaluate the distance. The diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c index d1919fc74bc..78f31075559 100644 --- a/src/backend/access/gist/gistproc.c +++ b/src/backend/access/gist/gistproc.c @@ -105,7 +105,7 @@ box_penalty(const BOX *original, const BOX *new) * The GiST Consistent method for boxes * * Should return false if for all data items x below entry, - * the predicate x op query must be FALSE, where op is the oper + * the predicate x op query must be false, where op is the oper * corresponding to strategy in the pg_amop table. */ Datum @@ -122,7 +122,7 @@ gist_box_consistent(PG_FUNCTION_ARGS) *recheck = false; if (DatumGetBoxP(entry->key) == NULL || query == NULL) - PG_RETURN_BOOL(FALSE); + PG_RETURN_BOOL(false); /* * if entry is not leaf, use rtree_internal_consistent, else use @@ -1056,7 +1056,7 @@ gist_poly_compress(PG_FUNCTION_ARGS) retval = (GISTENTRY *) palloc(sizeof(GISTENTRY)); gistentryinit(*retval, PointerGetDatum(r), entry->rel, entry->page, - entry->offset, FALSE); + entry->offset, false); } else retval = entry; @@ -1081,7 +1081,7 @@ gist_poly_consistent(PG_FUNCTION_ARGS) *recheck = true; if (DatumGetBoxP(entry->key) == NULL || query == NULL) - PG_RETURN_BOOL(FALSE); + PG_RETURN_BOOL(false); /* * Since the operators require recheck anyway, we can just use @@ -1124,7 +1124,7 @@ gist_circle_compress(PG_FUNCTION_ARGS) retval = (GISTENTRY *) palloc(sizeof(GISTENTRY)); gistentryinit(*retval, PointerGetDatum(r), entry->rel, entry->page, - entry->offset, FALSE); + entry->offset, false); } else retval = entry; @@ -1150,7 +1150,7 @@ gist_circle_consistent(PG_FUNCTION_ARGS) *recheck = true; if (DatumGetBoxP(entry->key) == NULL || query == NULL) - PG_RETURN_BOOL(FALSE); + PG_RETURN_BOOL(false); /* * Since the operators require recheck anyway, we can just use @@ -1186,7 +1186,7 @@ gist_point_compress(PG_FUNCTION_ARGS) box->high = box->low = *point; gistentryinit(*retval, BoxPGetDatum(box), - entry->rel, entry->page, entry->offset, FALSE); + entry->rel, entry->page, entry->offset, false); PG_RETURN_POINTER(retval); } @@ -1215,7 +1215,7 @@ gist_point_fetch(PG_FUNCTION_ARGS) r->y = in->high.y; gistentryinit(*retval, PointerGetDatum(r), entry->rel, entry->page, - entry->offset, FALSE); + entry->offset, false); PG_RETURN_POINTER(retval); } diff --git a/src/backend/access/gist/gistsplit.c b/src/backend/access/gist/gistsplit.c index 617f42c317e..9efb16dd243 100644 --- a/src/backend/access/gist/gistsplit.c +++ b/src/backend/access/gist/gistsplit.c @@ -125,7 +125,7 @@ findDontCares(Relation r, GISTSTATE *giststate, GISTENTRY *valvec, * check for nulls */ gistentryinit(entry, spl->splitVector.spl_rdatum, r, NULL, - (OffsetNumber) 0, FALSE); + (OffsetNumber) 0, false); for (i = 0; i < spl->splitVector.spl_nleft; i++) { int j = spl->splitVector.spl_left[i]; @@ -141,7 +141,7 @@ findDontCares(Relation r, GISTSTATE *giststate, GISTENTRY *valvec, /* And conversely for the right-side tuples */ gistentryinit(entry, spl->splitVector.spl_ldatum, r, NULL, - (OffsetNumber) 0, FALSE); + (OffsetNumber) 0, false); for (i = 0; i < spl->splitVector.spl_nright; i++) { int j = spl->splitVector.spl_right[i]; @@ -177,7 +177,7 @@ removeDontCares(OffsetNumber *a, int *len, const bool *dontcare) { OffsetNumber ai = a[i]; - if (dontcare[ai] == FALSE) + if (dontcare[ai] == false) { /* re-emit item into a[] */ *curwpos = ai; @@ -213,10 +213,10 @@ placeOne(Relation r, GISTSTATE *giststate, GistSplitVector *v, rpenalty; GISTENTRY entry; - gistentryinit(entry, v->spl_lattr[attno], r, NULL, 0, FALSE); + gistentryinit(entry, v->spl_lattr[attno], r, NULL, 0, false); lpenalty = gistpenalty(giststate, attno, &entry, v->spl_lisnull[attno], identry + attno, isnull[attno]); - gistentryinit(entry, v->spl_rattr[attno], r, NULL, 0, FALSE); + gistentryinit(entry, v->spl_rattr[attno], r, NULL, 0, false); rpenalty = gistpenalty(giststate, attno, &entry, v->spl_risnull[attno], identry + attno, isnull[attno]); @@ -265,10 +265,10 @@ supportSecondarySplit(Relation r, GISTSTATE *giststate, int attno, entrySL, entrySR; - gistentryinit(entryL, oldL, r, NULL, 0, FALSE); - gistentryinit(entryR, oldR, r, NULL, 0, FALSE); - gistentryinit(entrySL, sv->spl_ldatum, r, NULL, 0, FALSE); - gistentryinit(entrySR, sv->spl_rdatum, r, NULL, 0, FALSE); + gistentryinit(entryL, oldL, r, NULL, 0, false); + gistentryinit(entryR, oldR, r, NULL, 0, false); + gistentryinit(entrySL, sv->spl_ldatum, r, NULL, 0, false); + gistentryinit(entrySR, sv->spl_rdatum, r, NULL, 0, false); if (sv->spl_ldatum_exists && sv->spl_rdatum_exists) { @@ -320,8 +320,8 @@ supportSecondarySplit(Relation r, GISTSTATE *giststate, int attno, SWAPVAR(sv->spl_left, sv->spl_right, off); SWAPVAR(sv->spl_nleft, sv->spl_nright, noff); SWAPVAR(sv->spl_ldatum, sv->spl_rdatum, datum); - gistentryinit(entrySL, sv->spl_ldatum, r, NULL, 0, FALSE); - gistentryinit(entrySR, sv->spl_rdatum, r, NULL, 0, FALSE); + gistentryinit(entrySL, sv->spl_ldatum, r, NULL, 0, false); + gistentryinit(entrySR, sv->spl_rdatum, r, NULL, 0, false); } if (sv->spl_ldatum_exists) @@ -396,20 +396,20 @@ genericPickSplit(GISTSTATE *giststate, GistEntryVector *entryvec, GIST_SPLITVEC * Calls user picksplit method for attno column to split tuples into * two vectors. * - * Returns FALSE if split is complete (there are no more index columns, or + * Returns false if split is complete (there are no more index columns, or * there is no need to consider them because split is optimal already). * - * Returns TRUE and v->spl_dontcare = NULL if the picksplit result is + * Returns true and v->spl_dontcare = NULL if the picksplit result is * degenerate (all tuples seem to be don't-cares), so we should just * disregard this column and split on the next column(s) instead. * - * Returns TRUE and v->spl_dontcare != NULL if there are don't-care tuples + * Returns true and v->spl_dontcare != NULL if there are don't-care tuples * that could be relocated based on the next column(s). The don't-care * tuples have been removed from the split and must be reinserted by caller. * There is at least one non-don't-care tuple on each side of the split, * and union keys for all columns are updated to include just those tuples. * - * A TRUE result implies there is at least one more index column. + * A true result implies there is at least one more index column. */ static bool gistUserPicksplit(Relation r, GistEntryVector *entryvec, int attno, GistSplitVector *v, @@ -610,7 +610,7 @@ gistSplitHalf(GIST_SPLITVEC *v, int len) * attno: column we are working on (zero-based index) * * Outside caller must initialize v->spl_lisnull and v->spl_risnull arrays - * to all-TRUE. On return, spl_left/spl_nleft contain indexes of tuples + * to all-true. On return, spl_left/spl_nleft contain indexes of tuples * to go left, spl_right/spl_nright contain indexes of tuples to go right, * spl_lattr/spl_lisnull contain left-side union key values, and * spl_rattr/spl_risnull contain right-side union key values. Other fields @@ -643,7 +643,7 @@ gistSplitByKey(Relation r, Page page, IndexTuple *itup, int len, &IsNull); gistdentryinit(giststate, attno, &(entryvec->vector[i]), datum, r, page, i, - FALSE, IsNull); + false, IsNull); if (IsNull) offNullTuples[nOffNullTuples++] = i; } @@ -655,7 +655,7 @@ gistSplitByKey(Relation r, Page page, IndexTuple *itup, int len, * our attention to the next column. If there's no next column, just * split page in half. */ - v->spl_risnull[attno] = v->spl_lisnull[attno] = TRUE; + v->spl_risnull[attno] = v->spl_lisnull[attno] = true; if (attno + 1 < giststate->tupdesc->natts) gistSplitByKey(r, page, itup, len, giststate, v, attno + 1); @@ -672,7 +672,7 @@ gistSplitByKey(Relation r, Page page, IndexTuple *itup, int len, */ v->splitVector.spl_right = offNullTuples; v->splitVector.spl_nright = nOffNullTuples; - v->spl_risnull[attno] = TRUE; + v->spl_risnull[attno] = true; v->splitVector.spl_left = (OffsetNumber *) palloc(len * sizeof(OffsetNumber)); v->splitVector.spl_nleft = 0; diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c index 26d89f79ae6..d8d1c0acfcc 100644 --- a/src/backend/access/gist/gistutil.c +++ b/src/backend/access/gist/gistutil.c @@ -179,7 +179,7 @@ gistMakeUnionItVec(GISTSTATE *giststate, IndexTuple *itvec, int len, evec->vector + evec->n, datum, NULL, NULL, (OffsetNumber) 0, - FALSE, IsNull); + false, IsNull); evec->n++; } @@ -187,7 +187,7 @@ gistMakeUnionItVec(GISTSTATE *giststate, IndexTuple *itvec, int len, if (evec->n == 0) { attr[i] = (Datum) 0; - isnull[i] = TRUE; + isnull[i] = true; } else { @@ -204,7 +204,7 @@ gistMakeUnionItVec(GISTSTATE *giststate, IndexTuple *itvec, int len, PointerGetDatum(evec), PointerGetDatum(&attrsize)); - isnull[i] = FALSE; + isnull[i] = false; } } } @@ -246,17 +246,17 @@ gistMakeUnionKey(GISTSTATE *giststate, int attno, if (isnull1 && isnull2) { - *dstisnull = TRUE; + *dstisnull = true; *dst = (Datum) 0; } else { - if (isnull1 == FALSE && isnull2 == FALSE) + if (isnull1 == false && isnull2 == false) { evec->vector[0] = *entry1; evec->vector[1] = *entry2; } - else if (isnull1 == FALSE) + else if (isnull1 == false) { evec->vector[0] = *entry1; evec->vector[1] = *entry1; @@ -267,7 +267,7 @@ gistMakeUnionKey(GISTSTATE *giststate, int attno, evec->vector[1] = *entry2; } - *dstisnull = FALSE; + *dstisnull = false; *dst = FunctionCall2Coll(&giststate->unionFn[attno], giststate->supportCollation[attno], PointerGetDatum(evec), @@ -303,7 +303,7 @@ gistDeCompressAtt(GISTSTATE *giststate, Relation r, IndexTuple tuple, Page p, datum = index_getattr(tuple, i + 1, giststate->tupdesc, &isnull[i]); gistdentryinit(giststate, i, &attdata[i], datum, r, p, o, - FALSE, isnull[i]); + false, isnull[i]); } } @@ -313,7 +313,7 @@ gistDeCompressAtt(GISTSTATE *giststate, Relation r, IndexTuple tuple, Page p, IndexTuple gistgetadjusted(Relation r, IndexTuple oldtup, IndexTuple addtup, GISTSTATE *giststate) { - bool neednew = FALSE; + bool neednew = false; GISTENTRY oldentries[INDEX_MAX_KEYS], addentries[INDEX_MAX_KEYS]; bool oldisnull[INDEX_MAX_KEYS], @@ -451,7 +451,7 @@ gistchoose(Relation r, Page p, IndexTuple it, /* it has compressed entry */ /* Compute penalty for this column. */ datum = index_getattr(itup, j + 1, giststate->tupdesc, &IsNull); gistdentryinit(giststate, j, &entry, datum, r, p, i, - FALSE, IsNull); + false, IsNull); usize = gistpenalty(giststate, j, &entry, IsNull, &identry[j], isnull[j]); if (usize > 0) @@ -691,8 +691,8 @@ gistpenalty(GISTSTATE *giststate, int attno, { float penalty = 0.0; - if (giststate->penaltyFn[attno].fn_strict == FALSE || - (isNullOrig == FALSE && isNullAdd == FALSE)) + if (giststate->penaltyFn[attno].fn_strict == false || + (isNullOrig == false && isNullAdd == false)) { FunctionCall3Coll(&giststate->penaltyFn[attno], giststate->supportCollation[attno], diff --git a/src/backend/access/hash/hashpage.c b/src/backend/access/hash/hashpage.c index 4b14f88af94..a50e35dfcb6 100644 --- a/src/backend/access/hash/hashpage.c +++ b/src/backend/access/hash/hashpage.c @@ -992,7 +992,7 @@ fail: * for the purpose. OTOH, adding a splitpoint is a very infrequent operation, * so it may not be worth worrying about. * - * Returns TRUE if successful, or FALSE if allocation failed due to + * Returns true if successful, or false if allocation failed due to * BlockNumber overflow. */ static bool diff --git a/src/backend/access/hash/hashsearch.c b/src/backend/access/hash/hashsearch.c index 81a206eeb72..eeb04fe1c59 100644 --- a/src/backend/access/hash/hashsearch.c +++ b/src/backend/access/hash/hashsearch.c @@ -39,7 +39,7 @@ static void _hash_readnext(IndexScanDesc scan, Buffer *bufp, * On successful exit, scan->xs_ctup.t_self is set to the TID * of the next heap tuple. so->currPos is updated as needed. * - * On failure exit (no more tuples), we return FALSE with pin + * On failure exit (no more tuples), we return false with pin * held on bucket page but no pins or locks held on overflow * page. */ @@ -283,7 +283,7 @@ _hash_readprev(IndexScanDesc scan, * tuple(s) on the page has been loaded into so->currPos, * scan->xs_ctup.t_self is set to the heap TID of the current tuple. * - * On failure exit (no more tuples), we return FALSE, with pin held on + * On failure exit (no more tuples), we return false, with pin held on * bucket page but no pins or locks held on overflow page. */ bool @@ -507,7 +507,7 @@ _hash_readpage(IndexScanDesc scan, Buffer *bufP, ScanDirection dir) { /* * Remember next and previous block numbers for scrollable - * cursors to know the start position and return FALSE + * cursors to know the start position and return false * indicating that no more matching tuples were found. Also, * don't reset currPage or lsn, because we expect * _hash_kill_items to be called for the old page after this @@ -560,7 +560,7 @@ _hash_readpage(IndexScanDesc scan, Buffer *bufP, ScanDirection dir) { /* * Remember next and previous block numbers for scrollable - * cursors to know the start position and return FALSE + * cursors to know the start position and return false * indicating that no more matching tuples were found. Also, * don't reset currPage or lsn, because we expect * _hash_kill_items to be called for the old page after this diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 765750b8743..3acef279f47 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -1379,7 +1379,7 @@ heap_openrv_extended(const RangeVar *relation, LOCKMODE lockmode, * heap_beginscan_strat offers an extended API that lets the caller control * whether a nondefault buffer access strategy can be used, and whether * syncscan can be chosen (possibly resulting in the scan not starting from - * block zero). Both of these default to TRUE with plain heap_beginscan. + * block zero). Both of these default to true with plain heap_beginscan. * * heap_beginscan_bm is an alternative entry point for setting up a * HeapScanDesc for a bitmap heap scan. Although that scan technology is @@ -1842,16 +1842,16 @@ heap_getnext(HeapScanDesc scan, ScanDirection direction) * against the specified snapshot. * * If successful (tuple found and passes snapshot time qual), then *userbuf - * is set to the buffer holding the tuple and TRUE is returned. The caller + * is set to the buffer holding the tuple and true is returned. The caller * must unpin the buffer when done with the tuple. * * If the tuple is not found (ie, item number references a deleted slot), - * then tuple->t_data is set to NULL and FALSE is returned. + * then tuple->t_data is set to NULL and false is returned. * - * If the tuple is found but fails the time qual check, then FALSE is returned + * If the tuple is found but fails the time qual check, then false is returned * but tuple->t_data is left pointing to the tuple. * - * keep_buf determines what is done with the buffer in the FALSE-result cases. + * keep_buf determines what is done with the buffer in the false-result cases. * When the caller specifies keep_buf = true, we retain the pin on the buffer * and return it in *userbuf (so the caller must eventually unpin it); when * keep_buf = false, the pin is released and *userbuf is set to InvalidBuffer. @@ -1993,15 +1993,15 @@ heap_fetch(Relation relation, * of a HOT chain), and buffer is the buffer holding this tuple. We search * for the first chain member satisfying the given snapshot. If one is * found, we update *tid to reference that tuple's offset number, and - * return TRUE. If no match, return FALSE without modifying *tid. + * return true. If no match, return false without modifying *tid. * * heapTuple is a caller-supplied buffer. When a match is found, we return * the tuple here, in addition to updating *tid. If no match is found, the * contents of this buffer on return are undefined. * * If all_dead is not NULL, we check non-visible tuples to see if they are - * globally dead; *all_dead is set TRUE if all members of the HOT chain - * are vacuumable, FALSE if not. + * globally dead; *all_dead is set true if all members of the HOT chain + * are vacuumable, false if not. * * Unlike heap_fetch, the caller must already have pin and (at least) share * lock on the buffer; it is still pinned/locked at exit. Also unlike @@ -6594,7 +6594,7 @@ FreezeMultiXactId(MultiXactId multi, uint16 t_infomask, * Check to see whether any of the XID fields of a tuple (xmin, xmax, xvac) * are older than the specified cutoff XID and cutoff MultiXactId. If so, * setup enough state (in the *frz output argument) to later execute and - * WAL-log what we would need to do, and return TRUE. Return FALSE if nothing + * WAL-log what we would need to do, and return true. Return false if nothing * is to be changed. In addition, set *totally_frozen_p to true if the tuple * will be totally frozen after these operations are performed and false if * more freezing will eventually be required. @@ -7242,7 +7242,7 @@ heap_tuple_needs_eventual_freeze(HeapTupleHeader tuple) * heap_tuple_needs_freeze * * Check to see whether any of the XID fields of a tuple (xmin, xmax, xvac) - * are older than the specified cutoff XID or MultiXactId. If so, return TRUE. + * are older than the specified cutoff XID or MultiXactId. If so, return true. * * It doesn't matter whether the tuple is alive or dead, we are checking * to see if a tuple needs to be removed or frozen to avoid wraparound. diff --git a/src/backend/access/heap/pruneheap.c b/src/backend/access/heap/pruneheap.c index 52231ac4178..9f33e0ce07c 100644 --- a/src/backend/access/heap/pruneheap.c +++ b/src/backend/access/heap/pruneheap.c @@ -39,7 +39,7 @@ typedef struct OffsetNumber redirected[MaxHeapTuplesPerPage * 2]; OffsetNumber nowdead[MaxHeapTuplesPerPage]; OffsetNumber nowunused[MaxHeapTuplesPerPage]; - /* marked[i] is TRUE if item i is entered in one of the above arrays */ + /* marked[i] is true if item i is entered in one of the above arrays */ bool marked[MaxHeapTuplesPerPage + 1]; } PruneState; @@ -170,7 +170,7 @@ heap_page_prune_opt(Relation relation, Buffer buffer) * or RECENTLY_DEAD (see HeapTupleSatisfiesVacuum). * * If report_stats is true then we send the number of reclaimed heap-only - * tuples to pgstats. (This must be FALSE during vacuum, since vacuum will + * tuples to pgstats. (This must be false during vacuum, since vacuum will * send its own new total to pgstats, and we don't want this delta applied * on top of that.) * diff --git a/src/backend/access/index/amvalidate.c b/src/backend/access/index/amvalidate.c index 80865e9ff9b..728c48179f7 100644 --- a/src/backend/access/index/amvalidate.c +++ b/src/backend/access/index/amvalidate.c @@ -140,9 +140,9 @@ identify_opfamily_groups(CatCList *oprlist, CatCList *proclist) /* * Validate the signature (argument and result types) of an opclass support - * function. Return TRUE if OK, FALSE if not. + * function. Return true if OK, false if not. * - * The "..." represents maxargs argument-type OIDs. If "exact" is TRUE, they + * The "..." represents maxargs argument-type OIDs. If "exact" is true, they * must match the function arg types exactly, else only binary-coercibly. * In any case the function result type must match restype exactly. */ @@ -184,7 +184,7 @@ check_amproc_signature(Oid funcid, Oid restype, bool exact, /* * Validate the signature (argument and result types) of an opclass operator. - * Return TRUE if OK, FALSE if not. + * Return true if OK, false if not. * * Currently, we can hard-wire this as accepting only binary operators. Also, * we can insist on exact type matches, since the given lefttype/righttype diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index bef4255369a..edf4172eb20 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -784,7 +784,7 @@ index_can_return(Relation indexRelation, int attno) { RELATION_CHECKS; - /* amcanreturn is optional; assume FALSE if not provided by AM */ + /* amcanreturn is optional; assume false if not provided by AM */ if (indexRelation->rd_amroutine->amcanreturn == NULL) return false; diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index 5cbaba1b7d3..310589da4e8 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -99,8 +99,8 @@ static void _bt_vacuum_one_page(Relation rel, Buffer buffer, Relation heapRel); * don't actually insert. * * The result value is only significant for UNIQUE_CHECK_PARTIAL: - * it must be TRUE if the entry is known unique, else FALSE. - * (In the current implementation we'll also return TRUE after a + * it must be true if the entry is known unique, else false. + * (In the current implementation we'll also return true after a * successful UNIQUE_CHECK_YES or UNIQUE_CHECK_EXISTING call, but * that's just a coding artifact.) */ diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c index 642c8943e71..558113bd13a 100644 --- a/src/backend/access/nbtree/nbtsearch.c +++ b/src/backend/access/nbtree/nbtsearch.c @@ -524,7 +524,7 @@ _bt_compare(Relation rel, * scan->xs_ctup.t_self is set to the heap TID of the current tuple, * and if requested, scan->xs_itup points to a copy of the index tuple. * - * If there are no matching items in the index, we return FALSE, with no + * If there are no matching items in the index, we return false, with no * pins or locks held. * * Note that scan->keyData[], and the so->keyData[] scankey built from it, @@ -1336,7 +1336,7 @@ _bt_saveitem(BTScanOpaque so, int itemIndex, * * For success on a scan using a non-MVCC snapshot we hold a pin, but not a * read lock, on that page. If we do not hold the pin, we set so->currPos.buf - * to InvalidBuffer. We return TRUE to indicate success. + * to InvalidBuffer. We return true to indicate success. */ static bool _bt_steppage(IndexScanDesc scan, ScanDirection dir) @@ -1440,10 +1440,10 @@ _bt_steppage(IndexScanDesc scan, ScanDirection dir) * * On success exit, so->currPos is updated to contain data from the next * interesting page. Caller is responsible to release lock and pin on - * buffer on success. We return TRUE to indicate success. + * buffer on success. We return true to indicate success. * * If there are no more matching records in the given direction, we drop all - * locks and pins, set so->currPos.buf to InvalidBuffer, and return FALSE. + * locks and pins, set so->currPos.buf to InvalidBuffer, and return false. */ static bool _bt_readnextpage(IndexScanDesc scan, BlockNumber blkno, ScanDirection dir) @@ -1608,7 +1608,7 @@ _bt_readnextpage(IndexScanDesc scan, BlockNumber blkno, ScanDirection dir) /* * _bt_parallel_readpage() -- Read current page containing valid data for scan * - * On success, release lock and maybe pin on buffer. We return TRUE to + * On success, release lock and maybe pin on buffer. We return true to * indicate success. */ static bool diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c index dbfb775dec8..9b53aa33201 100644 --- a/src/backend/access/nbtree/nbtutils.c +++ b/src/backend/access/nbtree/nbtutils.c @@ -540,8 +540,8 @@ _bt_start_array_keys(IndexScanDesc scan, ScanDirection dir) /* * _bt_advance_array_keys() -- Advance to next set of array elements * - * Returns TRUE if there is another set of values to consider, FALSE if not. - * On TRUE result, the scankeys are initialized with the next set of values. + * Returns true if there is another set of values to consider, false if not. + * On true result, the scankeys are initialized with the next set of values. */ bool _bt_advance_array_keys(IndexScanDesc scan, ScanDirection dir) @@ -724,7 +724,7 @@ _bt_restore_array_keys(IndexScanDesc scan) * for a forward scan; or after the last match for a backward scan.) * * As a byproduct of this work, we can detect contradictory quals such - * as "x = 1 AND x > 2". If we see that, we return so->qual_ok = FALSE, + * as "x = 1 AND x > 2". If we see that, we return so->qual_ok = false, * indicating the scan need not be run at all since no tuples can match. * (In this case we do not bother completing the output key array!) * Again, missing cross-type operators might cause us to fail to prove the @@ -1020,7 +1020,7 @@ _bt_preprocess_keys(IndexScanDesc scan) * * If the opfamily doesn't supply a complete set of cross-type operators we * may not be able to make the comparison. If we can make the comparison - * we store the operator result in *result and return TRUE. We return FALSE + * we store the operator result in *result and return true. We return false * if the comparison could not be made. * * Note: op always points at the same ScanKey as either leftarg or rightarg. @@ -1185,8 +1185,8 @@ _bt_compare_scankey_args(IndexScanDesc scan, ScanKey op, * * Lastly, for ordinary scankeys (not IS NULL/NOT NULL), we check for a * NULL comparison value. Since all btree operators are assumed strict, - * a NULL means that the qual cannot be satisfied. We return TRUE if the - * comparison value isn't NULL, or FALSE if the scan should be abandoned. + * a NULL means that the qual cannot be satisfied. We return true if the + * comparison value isn't NULL, or false if the scan should be abandoned. * * This function is applied to the *input* scankey structure; therefore * on a rescan we will be looking at already-processed scankeys. Hence diff --git a/src/backend/access/spgist/spgdoinsert.c b/src/backend/access/spgist/spgdoinsert.c index b0702a7f927..a5f4c4059c8 100644 --- a/src/backend/access/spgist/spgdoinsert.c +++ b/src/backend/access/spgist/spgdoinsert.c @@ -580,7 +580,7 @@ setRedirectionTuple(SPPageDesc *current, OffsetNumber position, * Test to see if the user-defined picksplit function failed to do its job, * ie, it put all the leaf tuples into the same node. * If so, randomly divide the tuples into several nodes (all with the same - * label) and return TRUE to select allTheSame mode for this inner tuple. + * label) and return true to select allTheSame mode for this inner tuple. * * (This code is also used to forcibly select allTheSame mode for nulls.) * diff --git a/src/backend/access/transam/clog.c b/src/backend/access/transam/clog.c index a3e2b124351..bbf9ce1a3ab 100644 --- a/src/backend/access/transam/clog.c +++ b/src/backend/access/transam/clog.c @@ -727,7 +727,7 @@ BootStrapCLOG(void) /* * Initialize (or reinitialize) a page of CLOG to zeroes. - * If writeXlog is TRUE, also emit an XLOG record saying we did this. + * If writeXlog is true, also emit an XLOG record saying we did this. * * The page is not actually written, just set up in shared memory. * The slot number of the new page is returned. diff --git a/src/backend/access/transam/commit_ts.c b/src/backend/access/transam/commit_ts.c index 60fb9eeb061..7b7bf2b2bf1 100644 --- a/src/backend/access/transam/commit_ts.c +++ b/src/backend/access/transam/commit_ts.c @@ -531,7 +531,7 @@ BootStrapCommitTs(void) /* * Initialize (or reinitialize) a page of CommitTs to zeroes. - * If writeXlog is TRUE, also emit an XLOG record saying we did this. + * If writeXlog is true, also emit an XLOG record saying we did this. * * The page is not actually written, just set up in shared memory. * The slot number of the new page is returned. diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c index 7142ecede0a..0fb6bf2f028 100644 --- a/src/backend/access/transam/multixact.c +++ b/src/backend/access/transam/multixact.c @@ -1892,7 +1892,7 @@ BootStrapMultiXact(void) /* * Initialize (or reinitialize) a page of MultiXactOffset to zeroes. - * If writeXlog is TRUE, also emit an XLOG record saying we did this. + * If writeXlog is true, also emit an XLOG record saying we did this. * * The page is not actually written, just set up in shared memory. * The slot number of the new page is returned. diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c index 9dd77190ec8..94b6e6612a1 100644 --- a/src/backend/access/transam/slru.c +++ b/src/backend/access/transam/slru.c @@ -629,7 +629,7 @@ SimpleLruDoesPhysicalPageExist(SlruCtl ctl, int pageno) * Physical read of a (previously existing) page into a buffer slot * * On failure, we cannot just ereport(ERROR) since caller has put state in - * shared memory that must be undone. So, we return FALSE and save enough + * shared memory that must be undone. So, we return false and save enough * info in static variables to let SlruReportIOError make the report. * * For now, assume it's not worth keeping a file pointer open across @@ -705,7 +705,7 @@ SlruPhysicalReadPage(SlruCtl ctl, int pageno, int slotno) * Physical write of a page from a buffer slot * * On failure, we cannot just ereport(ERROR) since caller has put state in - * shared memory that must be undone. So, we return FALSE and save enough + * shared memory that must be undone. So, we return false and save enough * info in static variables to let SlruReportIOError make the report. * * For now, assume it's not worth keeping a file pointer open across diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index cfaf8da7812..b715152e8d0 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -170,9 +170,9 @@ typedef struct GlobalTransactionData Oid owner; /* ID of user that executed the xact */ BackendId locking_backend; /* backend currently working on the xact */ - bool valid; /* TRUE if PGPROC entry is in proc array */ - bool ondisk; /* TRUE if prepare state file is on disk */ - bool inredo; /* TRUE if entry was added via xlog_redo */ + bool valid; /* true if PGPROC entry is in proc array */ + bool ondisk; /* true if prepare state file is on disk */ + bool inredo; /* true if entry was added via xlog_redo */ char gid[GIDSIZE]; /* The GID assigned to the prepared xact */ } GlobalTransactionData; diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 8203388fa83..02a60f66b84 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -671,8 +671,8 @@ SubTransactionIsActive(SubTransactionId subxid) /* * GetCurrentCommandId * - * "used" must be TRUE if the caller intends to use the command ID to mark - * inserted/updated/deleted tuples. FALSE means the ID is being fetched + * "used" must be true if the caller intends to use the command ID to mark + * inserted/updated/deleted tuples. false means the ID is being fetched * for read-only purposes (ie, as a snapshot validity cutoff). See * CommandCounterIncrement() for discussion. */ @@ -3470,7 +3470,7 @@ BeginTransactionBlock(void) * This executes a PREPARE command. * * Since PREPARE may actually do a ROLLBACK, the result indicates what - * happened: TRUE for PREPARE, FALSE for ROLLBACK. + * happened: true for PREPARE, false for ROLLBACK. * * Note that we don't actually do anything here except change blockState. * The real work will be done in the upcoming PrepareTransaction(). @@ -3522,7 +3522,7 @@ PrepareTransactionBlock(char *gid) * This executes a COMMIT command. * * Since COMMIT may actually do a ROLLBACK, the result indicates what - * happened: TRUE for COMMIT, FALSE for ROLLBACK. + * happened: true for COMMIT, false for ROLLBACK. * * Note that we don't actually do anything here except change blockState. * The real work will be done in the upcoming CommitTransactionCommand(). diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 84f662c824d..e729180f827 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -2324,7 +2324,7 @@ XLogCheckpointNeeded(XLogSegNo new_segno) /* * Write and/or fsync the log at least as far as WriteRqst indicates. * - * If flexible == TRUE, we don't have to write as far as WriteRqst, but + * If flexible == true, we don't have to write as far as WriteRqst, but * may stop at any convenient boundary (such as a cache or logfile boundary). * This option allows us to avoid uselessly issuing multiple writes when a * single one would do. @@ -2945,7 +2945,7 @@ XLogFlush(XLogRecPtr record) * * This routine is invoked periodically by the background walwriter process. * - * Returns TRUE if there was any work to do, even if we skipped flushing due + * Returns true if there was any work to do, even if we skipped flushing due * to wal_writer_delay/wal_writer_flush_after. */ bool @@ -3141,12 +3141,12 @@ XLogNeedsFlush(XLogRecPtr record) * * log, seg: identify segment to be created/opened. * - * *use_existent: if TRUE, OK to use a pre-existing file (else, any - * pre-existing file will be deleted). On return, TRUE if a pre-existing + * *use_existent: if true, OK to use a pre-existing file (else, any + * pre-existing file will be deleted). On return, true if a pre-existing * file was used. * - * use_lock: if TRUE, acquire ControlFileLock while moving file into - * place. This should be TRUE except during bootstrap log creation. The + * use_lock: if true, acquire ControlFileLock while moving file into + * place. This should be true except during bootstrap log creation. The * caller must *not* hold the lock at call. * * Returns FD of opened file. @@ -3441,24 +3441,24 @@ XLogFileCopy(XLogSegNo destsegno, TimeLineID srcTLI, XLogSegNo srcsegno, * filename while it's being created) and to recycle an old segment. * * *segno: identify segment to install as (or first possible target). - * When find_free is TRUE, this is modified on return to indicate the + * When find_free is true, this is modified on return to indicate the * actual installation location or last segment searched. * * tmppath: initial name of file to install. It will be renamed into place. * - * find_free: if TRUE, install the new segment at the first empty segno - * number at or after the passed numbers. If FALSE, install the new segment + * find_free: if true, install the new segment at the first empty segno + * number at or after the passed numbers. If false, install the new segment * exactly where specified, deleting any existing segment file there. * * max_segno: maximum segment number to install the new file as. Fail if no * free slot is found between *segno and max_segno. (Ignored when find_free - * is FALSE.) + * is false.) * - * use_lock: if TRUE, acquire ControlFileLock while moving file into - * place. This should be TRUE except during bootstrap log creation. The + * use_lock: if true, acquire ControlFileLock while moving file into + * place. This should be true except during bootstrap log creation. The * caller must *not* hold the lock at call. * - * Returns TRUE if the file was installed successfully. FALSE indicates that + * Returns true if the file was installed successfully. false indicates that * max_segno limit was exceeded, or an error occurred while renaming the * file into place. */ @@ -5680,7 +5680,7 @@ getRecordTimestamp(XLogReaderState *record, TimestampTz *recordXtime) * For point-in-time recovery, this function decides whether we want to * stop applying the XLOG before the current record. * - * Returns TRUE if we are stopping, FALSE otherwise. If stopping, some + * Returns true if we are stopping, false otherwise. If stopping, some * information is saved in recoveryStopXid et al for use in annotating the * new timeline's history file. */ @@ -6659,7 +6659,7 @@ StartupXLOG(void) ereport(DEBUG1, (errmsg_internal("redo record is at %X/%X; shutdown %s", (uint32) (checkPoint.redo >> 32), (uint32) checkPoint.redo, - wasShutdown ? "TRUE" : "FALSE"))); + wasShutdown ? "true" : "false"))); ereport(DEBUG1, (errmsg_internal("next transaction ID: %u:%u; next OID: %u", checkPoint.nextXidEpoch, checkPoint.nextXid, @@ -11192,11 +11192,11 @@ GetOldestRestartPoint(XLogRecPtr *oldrecptr, TimeLineID *oldtli) * later than the start of the dump, and so if we rely on it as the start * point, we will fail to restore a consistent database state. * - * Returns TRUE if a backup_label was found (and fills the checkpoint + * Returns true if a backup_label was found (and fills the checkpoint * location and its REDO location into *checkPointLoc and RedoStartLSN, - * respectively); returns FALSE if not. If this backup_label came from a - * streamed backup, *backupEndRequired is set to TRUE. If this backup_label - * was created during recovery, *backupFromStandby is set to TRUE. + * respectively); returns false if not. If this backup_label came from a + * streamed backup, *backupEndRequired is set to true. If this backup_label + * was created during recovery, *backupFromStandby is set to true. */ static bool read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired, @@ -11279,8 +11279,8 @@ read_backup_label(XLogRecPtr *checkPointLoc, bool *backupEndRequired, * recovering from a backup dump file, and we therefore need to create symlinks * as per the information present in tablespace_map file. * - * Returns TRUE if a tablespace_map file was found (and fills the link - * information for all the tablespace links present in file); returns FALSE + * Returns true if a tablespace_map file was found (and fills the link + * information for all the tablespace links present in file); returns false * if not. */ static bool @@ -11714,7 +11714,7 @@ WaitForWALToBecomeAvailable(XLogRecPtr RecPtr, bool randAccess, * If primary_conninfo is set, launch walreceiver to try * to stream the missing WAL. * - * If fetching_ckpt is TRUE, RecPtr points to the initial + * If fetching_ckpt is true, RecPtr points to the initial * checkpoint location. In that case, we use RedoStartLSN * as the streaming start position instead of RecPtr, so * that when we later jump backwards to start redo at diff --git a/src/backend/access/transam/xlogarchive.c b/src/backend/access/transam/xlogarchive.c index c723c931d89..f64f04cfaf5 100644 --- a/src/backend/access/transam/xlogarchive.c +++ b/src/backend/access/transam/xlogarchive.c @@ -33,11 +33,11 @@ * Attempt to retrieve the specified file from off-line archival storage. * If successful, fill "path" with its complete path (note that this will be * a temp file name that doesn't follow the normal naming convention), and - * return TRUE. + * return true. * * If not successful, fill "path" with the name of the normal on-line file * (which may or may not actually exist, but we'll try to use it), and return - * FALSE. + * false. * * For fixed-size files, the caller may pass the expected size as an * additional crosscheck on successful recovery. If the file size is not diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c index 3af03ecdb12..2a41667c395 100644 --- a/src/backend/access/transam/xloginsert.c +++ b/src/backend/access/transam/xloginsert.c @@ -797,8 +797,8 @@ XLogRecordAssemble(RmgrId rmid, uint8 info, /* * Create a compressed version of a backup block image. * - * Returns FALSE if compression fails (i.e., compressed result is actually - * bigger than original). Otherwise, returns TRUE and sets 'dlen' to + * Returns false if compression fails (i.e., compressed result is actually + * bigger than original). Otherwise, returns true and sets 'dlen' to * the length of compressed block image. */ static bool @@ -965,7 +965,7 @@ XLogSaveBufferForHint(Buffer buffer, bool buffer_std) * log_newpage_buffer instead. * * If the page follows the standard page layout, with a PageHeader and unused - * space between pd_lower and pd_upper, set 'page_std' to TRUE. That allows + * space between pd_lower and pd_upper, set 'page_std' to true. That allows * the unused space to be left out from the WAL record, making it smaller. */ XLogRecPtr @@ -1002,7 +1002,7 @@ log_newpage(RelFileNode *rnode, ForkNumber forkNum, BlockNumber blkno, * function. This function will set the page LSN. * * If the page follows the standard page layout, with a PageHeader and unused - * space between pd_lower and pd_upper, set 'page_std' to TRUE. That allows + * space between pd_lower and pd_upper, set 'page_std' to true. That allows * the unused space to be left out from the WAL record, making it smaller. */ XLogRecPtr diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c index b1f9b90c50f..aeaafedf0b5 100644 --- a/src/backend/access/transam/xlogreader.c +++ b/src/backend/access/transam/xlogreader.c @@ -1302,8 +1302,8 @@ err: * Returns information about the block that a block reference refers to. * * If the WAL record contains a block reference with the given ID, *rnode, - * *forknum, and *blknum are filled in (if not NULL), and returns TRUE. - * Otherwise returns FALSE. + * *forknum, and *blknum are filled in (if not NULL), and returns true. + * Otherwise returns false. */ bool XLogRecGetBlockTag(XLogReaderState *record, uint8 block_id, diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 05e70818e77..2bc9e90dcfa 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -1000,15 +1000,15 @@ AddNewRelationType(const char *typeName, * cooked_constraints: list of precooked check constraints and defaults * relkind: relkind for new rel * relpersistence: rel's persistence status (permanent, temp, or unlogged) - * shared_relation: TRUE if it's to be a shared relation - * mapped_relation: TRUE if the relation will use the relfilenode map - * oidislocal: TRUE if oid column (if any) should be marked attislocal + * shared_relation: true if it's to be a shared relation + * mapped_relation: true if the relation will use the relfilenode map + * oidislocal: true if oid column (if any) should be marked attislocal * oidinhcount: attinhcount to assign to oid column (if any) * oncommit: ON COMMIT marking (only relevant if it's a temp table) * reloptions: reloptions in Datum form, or (Datum) 0 if none - * use_user_acl: TRUE if should look for user-defined default permissions; - * if FALSE, relacl is always set NULL - * allow_system_table_mods: TRUE to allow creation in system namespaces + * use_user_acl: true if should look for user-defined default permissions; + * if false, relacl is always set NULL + * allow_system_table_mods: true to allow creation in system namespaces * is_internal: is this a system-generated catalog? * * Output parameters: @@ -2208,9 +2208,9 @@ StoreConstraints(Relation rel, List *cooked_constraints, bool is_internal) * rel: relation to be modified * newColDefaults: list of RawColumnDefault structures * newConstraints: list of Constraint nodes - * allow_merge: TRUE if check constraints may be merged with existing ones - * is_local: TRUE if definition is local, FALSE if it's inherited - * is_internal: TRUE if result of some internal process, not a user request + * allow_merge: true if check constraints may be merged with existing ones + * is_local: true if definition is local, false if it's inherited + * is_internal: true if result of some internal process, not a user request * * All entries in newColDefaults will be processed. Entries in newConstraints * will be processed only if they are CONSTR_CHECK type. @@ -2455,7 +2455,7 @@ AddRelationNewConstraints(Relation rel, * new one, and either adjust its conislocal/coninhcount settings or throw * error as needed. * - * Returns TRUE if merged (constraint is a duplicate), or FALSE if it's + * Returns true if merged (constraint is a duplicate), or false if it's * got a so-far-unique name, or throws error if conflict. * * XXX See MergeConstraintsIntoExisting too if you change this code. diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c index 5d71302ded2..0a2fb1b93a6 100644 --- a/src/backend/catalog/namespace.c +++ b/src/backend/catalog/namespace.c @@ -95,7 +95,7 @@ * set up until the first attempt to create something in it. (The reason for * klugery is that we can't create the temp namespace outside a transaction, * but initial GUC processing of search_path happens outside a transaction.) - * activeTempCreationPending is TRUE if "pg_temp" appears first in the string + * activeTempCreationPending is true if "pg_temp" appears first in the string * but is not reflected in activeCreationNamespace because the namespace isn't * set up yet. * @@ -136,7 +136,7 @@ static List *activeSearchPath = NIL; /* default place to create stuff; if InvalidOid, no default */ static Oid activeCreationNamespace = InvalidOid; -/* if TRUE, activeCreationNamespace is wrong, it should be temp namespace */ +/* if true, activeCreationNamespace is wrong, it should be temp namespace */ static bool activeTempCreationPending = false; /* These variables are the values last derived from namespace_search_path: */ diff --git a/src/backend/catalog/pg_constraint.c b/src/backend/catalog/pg_constraint.c index 104e930a6fa..7dee6db0eba 100644 --- a/src/backend/catalog/pg_constraint.c +++ b/src/backend/catalog/pg_constraint.c @@ -1056,7 +1056,7 @@ get_primary_key_attnos(Oid relid, bool deferrableOk, Oid *constraintOid) /* * Determine whether a relation can be proven functionally dependent on - * a set of grouping columns. If so, return TRUE and add the pg_constraint + * a set of grouping columns. If so, return true and add the pg_constraint * OIDs of the constraints needed for the proof to the *constraintDeps list. * * grouping_columns is a list of grouping expressions, in which columns of diff --git a/src/backend/catalog/pg_depend.c b/src/backend/catalog/pg_depend.c index dd6ca3e8f78..cf0086b9bd1 100644 --- a/src/backend/catalog/pg_depend.c +++ b/src/backend/catalog/pg_depend.c @@ -490,7 +490,7 @@ getExtensionOfObject(Oid classId, Oid objectId) * * An ownership marker is an AUTO or INTERNAL dependency from the sequence to the * column. If we find one, store the identity of the owning column - * into *tableId and *colId and return TRUE; else return FALSE. + * into *tableId and *colId and return true; else return false. * * Note: if there's more than one such pg_depend entry then you get * a random one of them returned into the out parameters. This should diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c index ef811021504..61093dc4735 100644 --- a/src/backend/catalog/pg_operator.c +++ b/src/backend/catalog/pg_operator.c @@ -124,7 +124,7 @@ validOperatorName(const char *name) * finds an operator given an exact specification (name, namespace, * left and right type IDs). * - * *defined is set TRUE if defined (not a shell) + * *defined is set true if defined (not a shell) */ static Oid OperatorGet(const char *operatorName, @@ -164,7 +164,7 @@ OperatorGet(const char *operatorName, * looks up an operator given a possibly-qualified name and * left and right type IDs. * - * *defined is set TRUE if defined (not a shell) + * *defined is set true if defined (not a shell) */ static Oid OperatorLookup(List *operatorName, diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c index 59ffd2104df..e02d3120084 100644 --- a/src/backend/catalog/pg_type.c +++ b/src/backend/catalog/pg_type.c @@ -821,9 +821,9 @@ makeArrayTypeName(const char *typeName, Oid typeNamespace) * determine the new type's own array type name; else the latter will * certainly pick the same name. * - * Returns TRUE if successfully moved the type, FALSE if not. + * Returns true if successfully moved the type, false if not. * - * We also return TRUE if the given type is a shell type. In this case + * We also return true if the given type is a shell type. In this case * the type has not been renamed out of the way, but nonetheless it can * be expected that TypeCreate will succeed. This behavior is convenient * for most callers --- those that need to distinguish the shell-type case diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 1bdd4927d9c..8f1a8ede333 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -88,7 +88,7 @@ typedef enum EolType * characters, else we might find a false match to a trailing byte. In * supported server encodings, there is no possibility of a false match, and * it's faster to make useless comparisons to trailing bytes than it is to - * invoke pg_encoding_mblen() to skip over them. encoding_embeds_ascii is TRUE + * invoke pg_encoding_mblen() to skip over them. encoding_embeds_ascii is true * when we have to do it the hard way. */ typedef struct CopyStateData @@ -726,7 +726,7 @@ CopyGetInt16(CopyState cstate, int16 *val) /* * CopyLoadRawBuf loads some more data into raw_buf * - * Returns TRUE if able to obtain at least one more byte, else FALSE. + * Returns true if able to obtain at least one more byte, else false. * * If raw_buf_index < raw_buf_len, the unprocessed bytes are transferred * down to the start of the buffer and then we load more data after that. @@ -763,7 +763,7 @@ CopyLoadRawBuf(CopyState cstate) * DoCopy executes the SQL COPY statement * * Either unload or reload contents of table <relation>, depending on <from>. - * (<from> = TRUE means we are inserting into the table.) In the "TO" case + * (<from> = true means we are inserting into the table.) In the "TO" case * we also support copying the output of an arbitrary SELECT, INSERT, UPDATE * or DELETE query. * diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index e138539035e..eb1a4695c05 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -1718,8 +1718,8 @@ AlterDatabaseOwner(const char *dbname, Oid newOwnerId) /* * Look up info about the database named "name". If the database exists, * obtain the specified lock type on it, fill in any of the remaining - * parameters that aren't NULL, and return TRUE. If no such database, - * return FALSE. + * parameters that aren't NULL, and return true. If no such database, + * return false. */ static bool get_db_info(const char *name, LOCKMODE lockmode, @@ -1923,7 +1923,7 @@ remove_dbtablespaces(Oid db_id) /* * Check for existing files that conflict with a proposed new DB OID; - * return TRUE if there are any + * return true if there are any * * If there were a subdirectory in any tablespace matching the proposed new * OID, we'd get a create failure due to the duplicate name ... and then we'd diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c index 9d2d43fe6b1..1a239fabeaa 100644 --- a/src/backend/commands/proclang.c +++ b/src/backend/commands/proclang.c @@ -513,7 +513,7 @@ find_language_template(const char *languageName) /* - * This just returns TRUE if we have a valid template for a given language + * This just returns true if we have a valid template for a given language */ bool PLTemplateExists(const char *languageName) diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index c902293741c..b7ddb335d2d 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -2307,7 +2307,7 @@ MergeAttributes(List *schema, List *supers, char relpersistence, * * constraints is a list of CookedConstraint structs for previous constraints. * - * Returns TRUE if merged (constraint is a duplicate), or FALSE if it's + * Returns true if merged (constraint is a duplicate), or false if it's * got a so-far-unique name, or throws error if conflict. */ static bool @@ -5778,7 +5778,7 @@ ATExecDropNotNull(Relation rel, const char *colName, LOCKMODE lockmode) */ if (((Form_pg_attribute) GETSTRUCT(tuple))->attnotnull) { - ((Form_pg_attribute) GETSTRUCT(tuple))->attnotnull = FALSE; + ((Form_pg_attribute) GETSTRUCT(tuple))->attnotnull = false; CatalogTupleUpdate(attr_rel, &tuple->t_self, tuple); @@ -5859,7 +5859,7 @@ ATExecSetNotNull(AlteredTableInfo *tab, Relation rel, */ if (!((Form_pg_attribute) GETSTRUCT(tuple))->attnotnull) { - ((Form_pg_attribute) GETSTRUCT(tuple))->attnotnull = TRUE; + ((Form_pg_attribute) GETSTRUCT(tuple))->attnotnull = true; CatalogTupleUpdate(attr_rel, &tuple->t_self, tuple); @@ -8312,16 +8312,16 @@ validateForeignKeyConstraint(char *conname, trig.tgoid = InvalidOid; trig.tgname = conname; trig.tgenabled = TRIGGER_FIRES_ON_ORIGIN; - trig.tgisinternal = TRUE; + trig.tgisinternal = true; trig.tgconstrrelid = RelationGetRelid(pkrel); trig.tgconstrindid = pkindOid; trig.tgconstraint = constraintOid; - trig.tgdeferrable = FALSE; - trig.tginitdeferred = FALSE; + trig.tgdeferrable = false; + trig.tginitdeferred = false; /* we needn't fill in remaining fields */ /* - * See if we can do it with a single LEFT JOIN query. A FALSE result + * See if we can do it with a single LEFT JOIN query. A false result * indicates we must proceed with the fire-the-trigger method. */ if (RI_Initial_Check(&trig, rel, pkrel)) diff --git a/src/backend/commands/tablespace.c b/src/backend/commands/tablespace.c index 8559c3b6b36..d574e4dd008 100644 --- a/src/backend/commands/tablespace.c +++ b/src/backend/commands/tablespace.c @@ -655,7 +655,7 @@ create_tablespace_directories(const char *location, const Oid tablespaceoid) * does not justify throwing an error that would require manual intervention * to get the database running again. * - * Returns TRUE if successful, FALSE if some subdirectory is not empty + * Returns true if successful, false if some subdirectory is not empty */ static bool destroy_tablespace_directories(Oid tablespaceoid, bool redo) diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 8d0345cd64e..92ae3822d8a 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -127,7 +127,7 @@ static bool before_stmt_triggers_fired(Oid relid, CmdType cmdType); * * If isInternal is true then this is an internally-generated trigger. * This argument sets the tgisinternal field of the pg_trigger entry, and - * if TRUE causes us to modify the given trigger name to ensure uniqueness. + * if true causes us to modify the given trigger name to ensure uniqueness. * * When isInternal is not true we require ACL_TRIGGER permissions on the * relation, as well as ACL_EXECUTE on the trigger function. For internal @@ -4124,10 +4124,10 @@ AfterTriggerExecute(AfterTriggerEvent event, * If move_list isn't NULL, events that are not to be invoked now are * transferred to move_list. * - * When immediate_only is TRUE, do not invoke currently-deferred triggers. - * (This will be FALSE only at main transaction exit.) + * When immediate_only is true, do not invoke currently-deferred triggers. + * (This will be false only at main transaction exit.) * - * Returns TRUE if any invokable events were found. + * Returns true if any invokable events were found. */ static bool afterTriggerMarkEvents(AfterTriggerEventList *events, @@ -4191,14 +4191,14 @@ afterTriggerMarkEvents(AfterTriggerEventList *events, * make one locally to cache the info in case there are multiple trigger * events per rel. * - * When delete_ok is TRUE, it's safe to delete fully-processed events. + * When delete_ok is true, it's safe to delete fully-processed events. * (We are not very tense about that: we simply reset a chunk to be empty * if all its events got fired. The objective here is just to avoid useless * rescanning of events when a trigger queues new events during transaction * end, so it's not necessary to worry much about the case where only * some events are fired.) * - * Returns TRUE if no unfired events remain in the list (this allows us + * Returns true if no unfired events remain in the list (this allows us * to avoid repeating afterTriggerMarkEvents). */ static bool diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index 7df942b18b2..08f3a3d357a 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -3399,9 +3399,9 @@ AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype) * AlterTypeOwner_oid - change type owner unconditionally * * This function recurses to handle a pg_class entry, if necessary. It - * invokes any necessary access object hooks. If hasDependEntry is TRUE, this + * invokes any necessary access object hooks. If hasDependEntry is true, this * function modifies the pg_shdepend entry appropriately (this should be - * passed as FALSE only for table rowtypes and array types). + * passed as false only for table rowtypes and array types). * * This is used by ALTER TABLE/TYPE OWNER commands, as well as by REASSIGN * OWNED BY. It assumes the caller has done all needed check. @@ -3567,10 +3567,10 @@ AlterTypeNamespace_oid(Oid typeOid, Oid nspOid, ObjectAddresses *objsMoved) * Caller must have already checked privileges. * * The function automatically recurses to process the type's array type, - * if any. isImplicitArray should be TRUE only when doing this internal + * if any. isImplicitArray should be true only when doing this internal * recursion (outside callers must never try to move an array type directly). * - * If errorOnTableType is TRUE, the function errors out if the type is + * If errorOnTableType is true, the function errors out if the type is * a table type. ALTER TABLE has to be used to move a table to a new * namespace. * diff --git a/src/backend/executor/execCurrent.c b/src/backend/executor/execCurrent.c index f42df3916e3..a3e962ee67d 100644 --- a/src/backend/executor/execCurrent.c +++ b/src/backend/executor/execCurrent.c @@ -32,7 +32,7 @@ static ScanState *search_plan_tree(PlanState *node, Oid table_oid); * of the table is currently being scanned by the cursor named by CURRENT OF, * and return the row's TID into *current_tid. * - * Returns TRUE if a row was identified. Returns FALSE if the cursor is valid + * Returns true if a row was identified. Returns false if the cursor is valid * for the table but is not currently scanning a row of the table (this is a * legal situation in inheritance cases). Raises error if cursor is not a * valid updatable scan of the specified table. diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 2e8aca59a7f..493ff82775f 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -1487,8 +1487,8 @@ ExecCleanUpTriggerState(EState *estate) * going to be stored into a relation that has OIDs. In other contexts * we are free to choose whether to leave space for OIDs in result tuples * (we generally don't want to, but we do if a physical-tlist optimization - * is possible). This routine checks the plan context and returns TRUE if the - * choice is forced, FALSE if the choice is not forced. In the TRUE case, + * is possible). This routine checks the plan context and returns true if the + * choice is forced, false if the choice is not forced. In the true case, * *hasoids is set to the required value. * * One reason this is ugly is that all plan nodes in the plan tree will emit diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index 2b118359b53..d26ce0847a0 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -2628,7 +2628,7 @@ agg_retrieve_hash_table(AggState *aggstate) else { /* No more hashtables, so done */ - aggstate->agg_done = TRUE; + aggstate->agg_done = true; return NULL; } } @@ -4206,12 +4206,12 @@ AggGetTempMemoryContext(FunctionCallInfo fcinfo) * AggStateIsShared - find out whether transition state is shared * * If the function is being called as an aggregate support function, - * return TRUE if the aggregate's transition state is shared across - * multiple aggregates, FALSE if it is not. + * return true if the aggregate's transition state is shared across + * multiple aggregates, false if it is not. * - * Returns TRUE if not called as an aggregate support function. + * Returns true if not called as an aggregate support function. * This is intended as a conservative answer, ie "no you'd better not - * scribble on your input". In particular, will return TRUE if the + * scribble on your input". In particular, will return true if the * aggregate is being used as a window function, which is a scenario * in which changing the transition state is a bad idea. We might * want to refine the behavior for the window case in future. diff --git a/src/backend/executor/nodeAppend.c b/src/backend/executor/nodeAppend.c index bed9bb87138..1d2fb35d551 100644 --- a/src/backend/executor/nodeAppend.c +++ b/src/backend/executor/nodeAppend.c @@ -88,10 +88,10 @@ exec_append_initialize_next(AppendState *appendstate) /* * if scanning in reverse, we start at the last scan in the list and * then proceed back to the first.. in any case we inform ExecAppend - * that we are at the end of the line by returning FALSE + * that we are at the end of the line by returning false */ appendstate->as_whichplan = 0; - return FALSE; + return false; } else if (whichplan >= appendstate->as_nplans) { @@ -99,11 +99,11 @@ exec_append_initialize_next(AppendState *appendstate) * as above, end the scan if we go beyond the last scan in our list.. */ appendstate->as_whichplan = appendstate->as_nplans - 1; - return FALSE; + return false; } else { - return TRUE; + return true; } } diff --git a/src/backend/executor/nodeGroup.c b/src/backend/executor/nodeGroup.c index ab4ae24a6bc..6b68835ca19 100644 --- a/src/backend/executor/nodeGroup.c +++ b/src/backend/executor/nodeGroup.c @@ -73,7 +73,7 @@ ExecGroup(PlanState *pstate) if (TupIsNull(outerslot)) { /* empty input, so return nothing */ - node->grp_done = TRUE; + node->grp_done = true; return NULL; } /* Copy tuple into firsttupleslot */ @@ -116,7 +116,7 @@ ExecGroup(PlanState *pstate) if (TupIsNull(outerslot)) { /* no more groups, so we're done */ - node->grp_done = TRUE; + node->grp_done = true; return NULL; } @@ -177,7 +177,7 @@ ExecInitGroup(Group *node, EState *estate, int eflags) grpstate->ss.ps.plan = (Plan *) node; grpstate->ss.ps.state = estate; grpstate->ss.ps.ExecProcNode = ExecGroup; - grpstate->grp_done = FALSE; + grpstate->grp_done = false; /* * create expression context @@ -246,7 +246,7 @@ ExecReScanGroup(GroupState *node) { PlanState *outerPlan = outerPlanState(node); - node->grp_done = FALSE; + node->grp_done = false; /* must clear first tuple */ ExecClearTuple(node->ss.ss_ScanTupleSlot); diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c index d10d94ccc26..f7cd8fb3472 100644 --- a/src/backend/executor/nodeHash.c +++ b/src/backend/executor/nodeHash.c @@ -918,10 +918,10 @@ ExecHashTableInsert(HashJoinTable hashtable, * econtext->ecxt_innertuple. Vars in the hashkeys expressions should have * varno either OUTER_VAR or INNER_VAR. * - * A TRUE result means the tuple's hash value has been successfully computed - * and stored at *hashvalue. A FALSE result means the tuple cannot match + * A true result means the tuple's hash value has been successfully computed + * and stored at *hashvalue. A false result means the tuple cannot match * because it contains a null attribute, and hence it should be discarded - * immediately. (If keep_nulls is true then FALSE is never returned.) + * immediately. (If keep_nulls is true then false is never returned.) */ bool ExecHashGetHashValue(HashJoinTable hashtable, diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index 262008240db..2d6da28fbd9 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -676,8 +676,8 @@ ExecIndexEvalRuntimeKeys(ExprContext *econtext, * ExecIndexEvalArrayKeys * Evaluate any array key values, and set up to iterate through arrays. * - * Returns TRUE if there are array elements to consider; FALSE means there - * is at least one null or empty array, so no match is possible. On TRUE + * Returns true if there are array elements to consider; false means there + * is at least one null or empty array, so no match is possible. On true * result, the scankeys are initialized with the first elements of the arrays. */ bool @@ -756,8 +756,8 @@ ExecIndexEvalArrayKeys(ExprContext *econtext, * ExecIndexAdvanceArrayKeys * Advance to the next set of array key values, if any. * - * Returns TRUE if there is another set of values to consider, FALSE if not. - * On TRUE result, the scankeys are initialized with the next set of values. + * Returns true if there is another set of values to consider, false if not. + * On true result, the scankeys are initialized with the next set of values. */ bool ExecIndexAdvanceArrayKeys(IndexArrayKeyInfo *arrayKeys, int numArrayKeys) diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c index 925b4cf5535..ef9e1ee4710 100644 --- a/src/backend/executor/nodeMergejoin.c +++ b/src/backend/executor/nodeMergejoin.c @@ -510,7 +510,7 @@ MJFillInner(MergeJoinState *node) /* * Check that a qual condition is constant true or constant false. - * If it is constant false (or null), set *is_const_false to TRUE. + * If it is constant false (or null), set *is_const_false to true. * * Constant true would normally be represented by a NIL list, but we allow an * actual bool Const as well. We do expect that the planner will have thrown diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c index 77ef6f3df13..a93fbf646cb 100644 --- a/src/backend/executor/nodeSubplan.c +++ b/src/backend/executor/nodeSubplan.c @@ -220,7 +220,7 @@ ExecScanSubPlan(SubPlanState *node, MemoryContext oldcontext; TupleTableSlot *slot; Datum result; - bool found = false; /* TRUE if got at least one subplan tuple */ + bool found = false; /* true if got at least one subplan tuple */ ListCell *pvar; ListCell *l; ArrayBuildStateAny *astate = NULL; diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index 40292b86c1e..2da1cac3e21 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -1907,9 +1907,9 @@ _SPI_prepare_oneshot_plan(const char *src, SPIPlanPtr plan) * snapshot: query snapshot to use, or InvalidSnapshot for the normal * behavior of taking a new snapshot for each query. * crosscheck_snapshot: for RI use, all others pass InvalidSnapshot - * read_only: TRUE for read-only execution (no CommandCounterIncrement) - * fire_triggers: TRUE to fire AFTER triggers at end of query (normal case); - * FALSE means any AFTER triggers are postponed to end of outer query + * read_only: true for read-only execution (no CommandCounterIncrement) + * fire_triggers: true to fire AFTER triggers at end of query (normal case); + * false means any AFTER triggers are postponed to end of outer query * tcount: execution tuple-count limit, or 0 for none */ static int diff --git a/src/backend/executor/tqueue.c b/src/backend/executor/tqueue.c index e9a5d5a1a5e..4a295c936ba 100644 --- a/src/backend/executor/tqueue.c +++ b/src/backend/executor/tqueue.c @@ -48,7 +48,7 @@ struct TupleQueueReader /* * Receive a tuple from a query, and send it to the designated shm_mq. * - * Returns TRUE if successful, FALSE if shm_mq has been detached. + * Returns true if successful, false if shm_mq has been detached. */ static bool tqueueReceiveSlot(TupleTableSlot *slot, DestReceiver *self) diff --git a/src/backend/foreign/foreign.c b/src/backend/foreign/foreign.c index a113bf540da..45fca526216 100644 --- a/src/backend/foreign/foreign.c +++ b/src/backend/foreign/foreign.c @@ -428,7 +428,7 @@ GetFdwRoutineForRelation(Relation relation, bool makecopy) /* * IsImportableForeignTable - filter table names for IMPORT FOREIGN SCHEMA * - * Returns TRUE if given table name should be imported according to the + * Returns true if given table name should be imported according to the * statement's import filter options. */ bool diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index b2c487a8e86..210f13cc874 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -187,9 +187,9 @@ pg_isblank(const char c) * set *err_msg to a string describing the error. Currently the only * possible error is token too long for buf. * - * If successful: store null-terminated token at *buf and return TRUE. - * If no more tokens on line: set *buf = '\0' and return FALSE. - * If error: fill buf with truncated or misformatted token and return FALSE. + * If successful: store null-terminated token at *buf and return true. + * If no more tokens on line: set *buf = '\0' and return false. + * If error: fill buf with truncated or misformatted token and return false. */ static bool next_token(char **lineptr, char *buf, int bufsz, diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index 754154b83bb..fc15181a114 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -914,7 +914,7 @@ RemoveSocketFiles(void) /* -------------------------------- * socket_set_nonblocking - set socket blocking/non-blocking * - * Sets the socket non-blocking if nonblocking is TRUE, or sets it + * Sets the socket non-blocking if nonblocking is true, or sets it * blocking otherwise. * -------------------------------- */ diff --git a/src/backend/nodes/bitmapset.c b/src/backend/nodes/bitmapset.c index bf8545d4378..d4b82c63055 100644 --- a/src/backend/nodes/bitmapset.c +++ b/src/backend/nodes/bitmapset.c @@ -558,8 +558,8 @@ bms_singleton_member(const Bitmapset *a) * bms_get_singleton_member * * Test whether the given set is a singleton. - * If so, set *member to the value of its sole member, and return TRUE. - * If not, return FALSE, without changing *member. + * If so, set *member to the value of its sole member, and return true. + * If not, return false, without changing *member. * * This is more convenient and faster than calling bms_membership() and then * bms_singleton_member(), if we don't care about distinguishing empty sets diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c index 8e6f27e1536..c2a93b2d4c1 100644 --- a/src/backend/nodes/nodeFuncs.c +++ b/src/backend/nodes/nodeFuncs.c @@ -663,7 +663,7 @@ strip_implicit_coercions(Node *node) * Test whether an expression returns a set result. * * Because we use expression_tree_walker(), this can also be applied to - * whole targetlists; it'll produce TRUE if any one of the tlist items + * whole targetlists; it'll produce true if any one of the tlist items * returns a set. */ bool @@ -1632,9 +1632,9 @@ set_sa_opfuncid(ScalarArrayOpExpr *opexpr) * check_functions_in_node - * apply checker() to each function OID contained in given expression node * - * Returns TRUE if the checker() function does; for nodes representing more - * than one function call, returns TRUE if the checker() function does so - * for any of those functions. Returns FALSE if node does not invoke any + * Returns true if the checker() function does; for nodes representing more + * than one function call, returns true if the checker() function does so + * for any of those functions. Returns false if node does not invoke any * SQL-visible function. Caller must not pass node == NULL. * * This function examines only the given node; it does not recurse into any diff --git a/src/backend/nodes/tidbitmap.c b/src/backend/nodes/tidbitmap.c index 01d6bc5c118..c47d5849ef7 100644 --- a/src/backend/nodes/tidbitmap.c +++ b/src/backend/nodes/tidbitmap.c @@ -593,7 +593,7 @@ tbm_intersect(TIDBitmap *a, const TIDBitmap *b) /* * Process one page of a during an intersection op * - * Returns TRUE if apage is now empty and should be deleted from a + * Returns true if apage is now empty and should be deleted from a */ static bool tbm_intersect_page(TIDBitmap *a, PagetableEntry *apage, const TIDBitmap *b) diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index a6efb4e1d39..906d08ab373 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -1884,7 +1884,7 @@ set_subquery_pathlist(PlannerInfo *root, RelOptInfo *rel, * Zero out result area for subquery_is_pushdown_safe, so that it can set * flags as needed while recursing. In particular, we need a workspace * for keeping track of unsafe-to-reference columns. unsafeColumns[i] - * will be set TRUE if we find that output column i of the subquery is + * will be set true if we find that output column i of the subquery is * unsafe to use in a pushed-down qual. */ memset(&safetyInfo, 0, sizeof(safetyInfo)); @@ -2566,7 +2566,7 @@ standard_join_search(PlannerInfo *root, int levels_needed, List *initial_rels) * In addition, we make several checks on the subquery's output columns to see * if it is safe to reference them in pushed-down quals. If output column k * is found to be unsafe to reference, we set safetyInfo->unsafeColumns[k] - * to TRUE, but we don't reject the subquery overall since column k might not + * to true, but we don't reject the subquery overall since column k might not * be referenced by some/all quals. The unsafeColumns[] array will be * consulted later by qual_is_pushdown_safe(). It's better to do it this way * than to make the checks directly in qual_is_pushdown_safe(), because when @@ -2688,7 +2688,7 @@ recurse_pushdown_safe(Node *setOp, Query *topquery, * * There are several cases in which it's unsafe to push down an upper-level * qual if it references a particular output column of a subquery. We check - * each output column of the subquery and set unsafeColumns[k] to TRUE if + * each output column of the subquery and set unsafeColumns[k] to true if * that column is unsafe for a pushed-down qual to reference. The conditions * checked here are: * diff --git a/src/backend/optimizer/path/equivclass.c b/src/backend/optimizer/path/equivclass.c index a225414c970..45a6889b8b8 100644 --- a/src/backend/optimizer/path/equivclass.c +++ b/src/backend/optimizer/path/equivclass.c @@ -72,7 +72,7 @@ static bool reconsider_full_join_clause(PlannerInfo *root, * any delay by an outer join, so its two sides can be considered equal * anywhere they are both computable; moreover that equality can be * extended transitively. Record this knowledge in the EquivalenceClass - * data structure, if applicable. Returns TRUE if successful, FALSE if not + * data structure, if applicable. Returns true if successful, false if not * (in which case caller should treat the clause as ordinary, not an * equivalence). * @@ -602,8 +602,8 @@ add_eq_member(EquivalenceClass *ec, Expr *expr, Relids relids, * so for now we live with just reporting the first match. See also * generate_implied_equalities_for_column and match_pathkeys_to_index.) * - * If create_it is TRUE, we'll build a new EquivalenceClass when there is no - * match. If create_it is FALSE, we just return NULL when no match. + * If create_it is true, we'll build a new EquivalenceClass when there is no + * match. If create_it is false, we just return NULL when no match. * * This can be used safely both before and after EquivalenceClass merging; * since it never causes merging it does not invalidate any existing ECs @@ -1675,7 +1675,7 @@ reconsider_outer_join_clauses(PlannerInfo *root) /* * reconsider_outer_join_clauses for a single LEFT/RIGHT JOIN clause * - * Returns TRUE if we were able to propagate a constant through the clause. + * Returns true if we were able to propagate a constant through the clause. */ static bool reconsider_outer_join_clause(PlannerInfo *root, RestrictInfo *rinfo, @@ -1800,7 +1800,7 @@ reconsider_outer_join_clause(PlannerInfo *root, RestrictInfo *rinfo, /* * reconsider_outer_join_clauses for a single FULL JOIN clause * - * Returns TRUE if we were able to propagate a constant through the clause. + * Returns true if we were able to propagate a constant through the clause. */ static bool reconsider_full_join_clause(PlannerInfo *root, RestrictInfo *rinfo) diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index f35380391ad..18f6bafcdde 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -838,12 +838,12 @@ get_index_paths(PlannerInfo *root, RelOptInfo *rel, * * If skip_nonnative_saop is non-NULL, we ignore ScalarArrayOpExpr clauses * unless the index AM supports them directly, and we set *skip_nonnative_saop - * to TRUE if we found any such clauses (caller must initialize the variable - * to FALSE). If it's NULL, we do not ignore ScalarArrayOpExpr clauses. + * to true if we found any such clauses (caller must initialize the variable + * to false). If it's NULL, we do not ignore ScalarArrayOpExpr clauses. * * If skip_lower_saop is non-NULL, we ignore ScalarArrayOpExpr clauses for - * non-first index columns, and we set *skip_lower_saop to TRUE if we found - * any such clauses (caller must initialize the variable to FALSE). If it's + * non-first index columns, and we set *skip_lower_saop to true if we found + * any such clauses (caller must initialize the variable to false). If it's * NULL, we do not ignore non-first ScalarArrayOpExpr clauses, but they will * result in considering the scan's output to be unordered. * diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index 310262d87c0..02a630278f7 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -336,7 +336,7 @@ add_paths_to_joinrel(PlannerInfo *root, * across joins unless there's a join-order-constraint-based reason to do so. * So we ignore the param_source_rels restriction when this case applies. * - * allow_star_schema_join() returns TRUE if the param_source_rels restriction + * allow_star_schema_join() returns true if the param_source_rels restriction * should be overridden, ie, it's okay to perform this join. */ static inline bool @@ -1880,7 +1880,7 @@ hash_inner_and_outer(PlannerInfo *root, * Select mergejoin clauses that are usable for a particular join. * Returns a list of RestrictInfo nodes for those clauses. * - * *mergejoin_allowed is normally set to TRUE, but it is set to FALSE if + * *mergejoin_allowed is normally set to true, but it is set to false if * this is a right/full join and there are nonmergejoinable join clauses. * The executor's mergejoin machinery cannot handle such cases, so we have * to avoid generating a mergejoin plan. (Note that this flag does NOT diff --git a/src/backend/optimizer/path/joinrels.c b/src/backend/optimizer/path/joinrels.c index 2b868c52de4..244708ad5ac 100644 --- a/src/backend/optimizer/path/joinrels.c +++ b/src/backend/optimizer/path/joinrels.c @@ -335,7 +335,7 @@ make_rels_by_clauseless_joins(PlannerInfo *root, * * On success, *sjinfo_p is set to NULL if this is to be a plain inner join, * else it's set to point to the associated SpecialJoinInfo node. Also, - * *reversed_p is set TRUE if the given relations need to be swapped to + * *reversed_p is set true if the given relations need to be swapped to * match the SpecialJoinInfo node. */ static bool @@ -1250,7 +1250,7 @@ mark_dummy_rel(RelOptInfo *rel) * decide there's no match for an outer row, which is pretty stupid. So, * we need to detect the case. * - * If only_pushed_down is TRUE, then consider only pushed-down quals. + * If only_pushed_down is true, then consider only pushed-down quals. */ static bool restriction_is_constant_false(List *restrictlist, bool only_pushed_down) diff --git a/src/backend/optimizer/path/pathkeys.c b/src/backend/optimizer/path/pathkeys.c index 9d83a5ca62b..c6870d314e7 100644 --- a/src/backend/optimizer/path/pathkeys.c +++ b/src/backend/optimizer/path/pathkeys.c @@ -162,8 +162,8 @@ pathkey_is_redundant(PathKey *new_pathkey, List *pathkeys) * considered. Otherwise child members are ignored. (See the comments for * get_eclass_for_sort_expr.) * - * create_it is TRUE if we should create any missing EquivalenceClass - * needed to represent the sort key. If it's FALSE, we return NULL if the + * create_it is true if we should create any missing EquivalenceClass + * needed to represent the sort key. If it's false, we return NULL if the * sort key isn't already present in any EquivalenceClass. */ static PathKey * @@ -987,8 +987,8 @@ update_mergeclause_eclasses(PlannerInfo *root, RestrictInfo *restrictinfo) * If successful, it returns a list of mergeclauses. * * 'pathkeys' is a pathkeys list showing the ordering of an input path. - * 'outer_keys' is TRUE if these keys are for the outer input path, - * FALSE if for inner. + * 'outer_keys' is true if these keys are for the outer input path, + * false if for inner. * 'restrictinfos' is a list of mergejoinable restriction clauses for the * join relation being formed. * diff --git a/src/backend/optimizer/plan/analyzejoins.c b/src/backend/optimizer/plan/analyzejoins.c index 511603b5810..5b0da14748a 100644 --- a/src/backend/optimizer/plan/analyzejoins.c +++ b/src/backend/optimizer/plan/analyzejoins.c @@ -582,7 +582,7 @@ reduce_unique_semijoins(PlannerInfo *root) * Could the relation possibly be proven distinct on some set of columns? * * This is effectively a pre-checking function for rel_is_distinct_for(). - * It must return TRUE if rel_is_distinct_for() could possibly return TRUE + * It must return true if rel_is_distinct_for() could possibly return true * with this rel, but it should not expend a lot of cycles. The idea is * that callers can avoid doing possibly-expensive processing to compute * rel_is_distinct_for()'s argument lists if the call could not possibly @@ -735,7 +735,7 @@ rel_is_distinct_for(PlannerInfo *root, RelOptInfo *rel, List *clause_list) * on some set of output columns? * * This is effectively a pre-checking function for query_is_distinct_for(). - * It must return TRUE if query_is_distinct_for() could possibly return TRUE + * It must return true if query_is_distinct_for() could possibly return true * with this query, but it should not expend a lot of cycles. The idea is * that callers can avoid doing possibly-expensive processing to compute * query_is_distinct_for()'s argument lists if the call could not possibly diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 4b497486a0e..9c74e39bd34 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -5537,7 +5537,7 @@ make_sort(Plan *lefttree, int numCols, * 'pathkeys' is the list of pathkeys by which the result is to be sorted * 'relids' identifies the child relation being sorted, if any * 'reqColIdx' is NULL or an array of required sort key column numbers - * 'adjust_tlist_in_place' is TRUE if lefttree must be modified in-place + * 'adjust_tlist_in_place' is true if lefttree must be modified in-place * * We must convert the pathkey information into arrays of sort key column * numbers, sort operator OIDs, collation OIDs, and nulls-first flags, @@ -5558,7 +5558,7 @@ make_sort(Plan *lefttree, int numCols, * compute these expressions, since a Sort or MergeAppend node itself won't * do any such calculations. If the input plan type isn't one that can do * projections, this means adding a Result node just to do the projection. - * However, the caller can pass adjust_tlist_in_place = TRUE to force the + * However, the caller can pass adjust_tlist_in_place = true to force the * lefttree tlist to be modified in-place regardless of whether the node type * can project --- we use this for fixing the tlist of MergeAppend itself. * diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index 974eb58d837..448cb734672 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -740,7 +740,7 @@ deconstruct_jointree(PlannerInfo *root) * * Inputs: * jtnode is the jointree node to examine - * below_outer_join is TRUE if this node is within the nullable side of a + * below_outer_join is true if this node is within the nullable side of a * higher-level outer join * Outputs: * *qualscope gets the set of base Relids syntactically included in this @@ -1609,8 +1609,8 @@ compute_semijoin_info(SpecialJoinInfo *sjinfo, List *clause) * as belonging to a higher join level, just add it to postponed_qual_list. * * 'clause': the qual clause to be distributed - * 'is_deduced': TRUE if the qual came from implied-equality deduction - * 'below_outer_join': TRUE if the qual is from a JOIN/ON that is below the + * 'is_deduced': true if the qual came from implied-equality deduction + * 'below_outer_join': true if the qual is from a JOIN/ON that is below the * nullable side of a higher-level outer join * 'jointype': type of join the qual is from (JOIN_INNER for a WHERE clause) * 'security_level': security_level to assign to the qual @@ -1621,7 +1621,7 @@ compute_semijoin_info(SpecialJoinInfo *sjinfo, List *clause) * baserels appearing on the outer (nonnullable) side of the join * (for FULL JOIN this includes both sides of the join, and must in fact * equal qualscope) - * 'deduced_nullable_relids': if is_deduced is TRUE, the nullable relids to + * 'deduced_nullable_relids': if is_deduced is true, the nullable relids to * impute to the clause; otherwise NULL * 'postponed_qual_list': list of PostponedQual structs, which we can add * this qual to if it turns out to belong to a higher join level. @@ -1631,9 +1631,9 @@ compute_semijoin_info(SpecialJoinInfo *sjinfo, List *clause) * 'ojscope' is needed if we decide to force the qual up to the outer-join * level, which will be ojscope not necessarily qualscope. * - * In normal use (when is_deduced is FALSE), at the time this is called, + * In normal use (when is_deduced is false), at the time this is called, * root->join_info_list must contain entries for all and only those special - * joins that are syntactically below this qual. But when is_deduced is TRUE, + * joins that are syntactically below this qual. But when is_deduced is true, * we are adding new deduced clauses after completion of deconstruct_jointree, * so it cannot be assumed that root->join_info_list has anything to do with * qual placement. @@ -2023,8 +2023,8 @@ distribute_qual_to_rels(PlannerInfo *root, Node *clause, * may force extra delay of higher-level outer joins. * * If the qual must be delayed, add relids to *relids_p to reflect the lowest - * safe level for evaluating the qual, and return TRUE. Any extra delay for - * higher-level joins is reflected by setting delay_upper_joins to TRUE in + * safe level for evaluating the qual, and return true. Any extra delay for + * higher-level joins is reflected by setting delay_upper_joins to true in * SpecialJoinInfo structs. We also compute nullable_relids, the set of * referenced relids that are nullable by lower outer joins (note that this * can be nonempty even for a non-delayed qual). @@ -2056,7 +2056,7 @@ distribute_qual_to_rels(PlannerInfo *root, Node *clause, * Lastly, a pushed-down qual that references the nullable side of any current * join_info_list member and has to be evaluated above that OJ (because its * required relids overlap the LHS too) causes that OJ's delay_upper_joins - * flag to be set TRUE. This will prevent any higher-level OJs from + * flag to be set true. This will prevent any higher-level OJs from * being interchanged with that OJ, which would result in not having any * correct place to evaluate the qual. (The case we care about here is a * sub-select WHERE clause within the RHS of some outer join. The WHERE @@ -2140,7 +2140,7 @@ check_outerjoin_delay(PlannerInfo *root, /* * check_equivalence_delay * Detect whether a potential equivalence clause is rendered unsafe - * by outer-join-delay considerations. Return TRUE if it's safe. + * by outer-join-delay considerations. Return true if it's safe. * * The initial tests in distribute_qual_to_rels will consider a mergejoinable * clause to be a potential equivalence clause if it is not outerjoin_delayed. diff --git a/src/backend/optimizer/plan/planagg.c b/src/backend/optimizer/plan/planagg.c index bba8a1ff587..889e8af33bf 100644 --- a/src/backend/optimizer/plan/planagg.c +++ b/src/backend/optimizer/plan/planagg.c @@ -232,9 +232,9 @@ preprocess_minmax_aggregates(PlannerInfo *root, List *tlist) * that each one is a MIN/MAX aggregate. If so, build a list of the * distinct aggregate calls in the tree. * - * Returns TRUE if a non-MIN/MAX aggregate is found, FALSE otherwise. + * Returns true if a non-MIN/MAX aggregate is found, false otherwise. * (This seemingly-backward definition is used because expression_tree_walker - * aborts the scan on TRUE return, which is what we want.) + * aborts the scan on true return, which is what we want.) * * Found aggregates are added to the list at *context; it's up to the caller * to initialize the list to NIL. @@ -335,8 +335,8 @@ find_minmax_aggs_walker(Node *node, List **context) * Given a MIN/MAX aggregate, try to build an indexscan Path it can be * optimized with. * - * If successful, stash the best path in *mminfo and return TRUE. - * Otherwise, return FALSE. + * If successful, stash the best path in *mminfo and return true. + * Otherwise, return false. */ static bool build_minmax_path(PlannerInfo *root, MinMaxAggInfo *mminfo, diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index d58635c887c..9b7a8fd82c4 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -5688,7 +5688,7 @@ make_pathkeys_for_window(PlannerInfo *root, WindowClause *wc, * below the Sort step (and the Distinct step, if any). This will be * exactly final_target if we decide a projection step wouldn't be helpful. * - * In addition, *have_postponed_srfs is set to TRUE if we choose to postpone + * In addition, *have_postponed_srfs is set to true if we choose to postpone * any set-returning functions to after the Sort. */ static PathTarget * @@ -6040,7 +6040,7 @@ expression_planner(Expr *expr) * tableOid is the OID of a table to be clustered on its index indexOid * (which is already known to be a btree index). Decide whether it's * cheaper to do an indexscan or a seqscan-plus-sort to execute the CLUSTER. - * Return TRUE to use sorting, FALSE to use an indexscan. + * Return true to use sorting, false to use an indexscan. * * Note: caller had better already hold some type of lock on the table. */ diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c index 1103984779b..8f75fa98edc 100644 --- a/src/backend/optimizer/plan/subselect.c +++ b/src/backend/optimizer/plan/subselect.c @@ -1563,7 +1563,7 @@ convert_EXISTS_sublink_to_join(PlannerInfo *root, SubLink *sublink, * won't occur, nor will other side-effects of volatile functions. This seems * unlikely to bother anyone in practice. * - * Returns TRUE if was able to discard the targetlist, else FALSE. + * Returns true if was able to discard the targetlist, else false. */ static bool simplify_EXISTS_query(PlannerInfo *root, Query *query) diff --git a/src/backend/optimizer/prep/prepjointree.c b/src/backend/optimizer/prep/prepjointree.c index f3bb73a664b..1d7e4994f50 100644 --- a/src/backend/optimizer/prep/prepjointree.c +++ b/src/backend/optimizer/prep/prepjointree.c @@ -644,9 +644,9 @@ pull_up_subqueries(PlannerInfo *root) * This forces use of the PlaceHolderVar mechanism for all non-Var targetlist * items, and puts some additional restrictions on what can be pulled up. * - * deletion_ok is TRUE if the caller can cope with us returning NULL for a + * deletion_ok is true if the caller can cope with us returning NULL for a * deletable leaf node (for example, a VALUES RTE that could be pulled up). - * If it's FALSE, we'll avoid pullup in such cases. + * If it's false, we'll avoid pullup in such cases. * * A tricky aspect of this code is that if we pull up a subquery we have * to replace Vars that reference the subquery's outputs throughout the @@ -1401,7 +1401,7 @@ make_setop_translation_list(Query *query, Index newvarno, * (Note subquery is not necessarily equal to rte->subquery; it could be a * processed copy of that.) * lowest_outer_join is the lowest outer join above the subquery, or NULL. - * deletion_ok is TRUE if it'd be okay to delete the subquery entirely. + * deletion_ok is true if it'd be okay to delete the subquery entirely. */ static bool is_simple_subquery(Query *subquery, RangeTblEntry *rte, @@ -1457,7 +1457,7 @@ is_simple_subquery(Query *subquery, RangeTblEntry *rte, /* * Don't pull up a subquery with an empty jointree, unless it has no quals - * and deletion_ok is TRUE and we're not underneath an outer join. + * and deletion_ok is true and we're not underneath an outer join. * * query_planner() will correctly generate a Result plan for a jointree * that's totally empty, but we can't cope with an empty FromExpr @@ -1681,7 +1681,7 @@ pull_up_simple_values(PlannerInfo *root, Node *jtnode, RangeTblEntry *rte) * to pull up into the parent query. * * rte is the RTE_VALUES RangeTblEntry to check. - * deletion_ok is TRUE if it'd be okay to delete the VALUES RTE entirely. + * deletion_ok is true if it'd be okay to delete the VALUES RTE entirely. */ static bool is_simple_values(PlannerInfo *root, RangeTblEntry *rte, bool deletion_ok) @@ -1689,7 +1689,7 @@ is_simple_values(PlannerInfo *root, RangeTblEntry *rte, bool deletion_ok) Assert(rte->rtekind == RTE_VALUES); /* - * We can only pull up a VALUES RTE if deletion_ok is TRUE. It's + * We can only pull up a VALUES RTE if deletion_ok is true. It's * basically the same case as a sub-select with empty FROM list; see * comments in is_simple_subquery(). */ @@ -1844,7 +1844,7 @@ is_safe_append_member(Query *subquery) * * If restricted is false, all level-1 Vars are allowed (but we still must * search the jointree, since it might contain outer joins below which there - * will be restrictions). If restricted is true, return TRUE when any qual + * will be restrictions). If restricted is true, return true when any qual * in the jointree contains level-1 Vars coming from outside the rels listed * in safe_upper_varnos. */ diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 652843a146f..30cdd3da4c5 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -832,7 +832,7 @@ expression_returns_set_rows(Node *clause) * contain_subplans * Recursively search for subplan nodes within a clause. * - * If we see a SubLink node, we will return TRUE. This is only possible if + * If we see a SubLink node, we will return true. This is only possible if * the expression tree hasn't yet been transformed by subselect.c. We do not * know whether the node will produce a true subplan or just an initplan, * but we make the conservative assumption that it will be a subplan. @@ -1626,8 +1626,8 @@ contain_leaked_vars_walker(Node *node, void *context) * that either v1 or v2 can't be NULL, but it does prove that the t1 row * as a whole can't be all-NULL. * - * top_level is TRUE while scanning top-level AND/OR structure; here, showing - * the result is either FALSE or NULL is good enough. top_level is FALSE when + * top_level is true while scanning top-level AND/OR structure; here, showing + * the result is either FALSE or NULL is good enough. top_level is false when * we have descended below a NOT or a strict function: now we must be able to * prove that the subexpression goes to NULL. * @@ -1834,8 +1834,8 @@ find_nonnullable_rels_walker(Node *node, bool top_level) * The result is a palloc'd List, but we have not copied the member Var nodes. * Also, we don't bother trying to eliminate duplicate entries. * - * top_level is TRUE while scanning top-level AND/OR structure; here, showing - * the result is either FALSE or NULL is good enough. top_level is FALSE when + * top_level is true while scanning top-level AND/OR structure; here, showing + * the result is either FALSE or NULL is good enough. top_level is false when * we have descended below a NOT or a strict function: now we must be able to * prove that the subexpression goes to NULL. * @@ -3620,8 +3620,8 @@ eval_const_expressions_mutator(Node *node, * input is TRUE and at least one is NULL. We don't actually include the NULL * here, that's supposed to be done by the caller. * - * The output arguments *haveNull and *forceTrue must be initialized FALSE - * by the caller. They will be set TRUE if a null constant or true constant, + * The output arguments *haveNull and *forceTrue must be initialized false + * by the caller. They will be set true if a NULL constant or TRUE constant, * respectively, is detected anywhere in the argument list. */ static List * @@ -3732,8 +3732,8 @@ simplify_or_arguments(List *args, * no input is FALSE and at least one is NULL. We don't actually include the * NULL here, that's supposed to be done by the caller. * - * The output arguments *haveNull and *forceFalse must be initialized FALSE - * by the caller. They will be set TRUE if a null constant or false constant, + * The output arguments *haveNull and *forceFalse must be initialized false + * by the caller. They will be set true if a null constant or false constant, * respectively, is detected anywhere in the argument list. */ static List * diff --git a/src/backend/optimizer/util/placeholder.c b/src/backend/optimizer/util/placeholder.c index 3343521b971..864b2796ccc 100644 --- a/src/backend/optimizer/util/placeholder.c +++ b/src/backend/optimizer/util/placeholder.c @@ -63,7 +63,7 @@ make_placeholder_expr(PlannerInfo *root, Expr *expr, Relids phrels) * simplified query passed to query_planner(). * * Note: this should only be called after query_planner() has started. Also, - * create_new_ph must not be TRUE after deconstruct_jointree begins, because + * create_new_ph must not be true after deconstruct_jointree begins, because * make_outerjoininfo assumes that we already know about all placeholders. */ PlaceHolderInfo * diff --git a/src/backend/optimizer/util/predtest.c b/src/backend/optimizer/util/predtest.c index 536d24b698c..134460cc13f 100644 --- a/src/backend/optimizer/util/predtest.c +++ b/src/backend/optimizer/util/predtest.c @@ -1048,7 +1048,7 @@ arrayexpr_cleanup_fn(PredIterInfo info) * Does the predicate implication test for a "simple clause" predicate * and a "simple clause" restriction. * - * We return TRUE if able to prove the implication, FALSE if not. + * We return true if able to prove the implication, false if not. * * We have three strategies for determining whether one simple clause * implies another: @@ -1116,7 +1116,7 @@ predicate_implied_by_simple_clause(Expr *predicate, Node *clause, * Does the predicate refutation test for a "simple clause" predicate * and a "simple clause" restriction. * - * We return TRUE if able to prove the refutation, FALSE if not. + * We return true if able to prove the refutation, false if not. * * Unlike the implication case, checking for equal() clauses isn't * helpful. @@ -1360,12 +1360,12 @@ static const bool BT_implies_table[6][6] = { * The predicate operator: * LT LE EQ GE GT NE */ - {TRUE, TRUE, none, none, none, TRUE}, /* LT */ - {none, TRUE, none, none, none, none}, /* LE */ - {none, TRUE, TRUE, TRUE, none, none}, /* EQ */ - {none, none, none, TRUE, none, none}, /* GE */ - {none, none, none, TRUE, TRUE, TRUE}, /* GT */ - {none, none, none, none, none, TRUE} /* NE */ + {true, true, none, none, none, true}, /* LT */ + {none, true, none, none, none, none}, /* LE */ + {none, true, true, true, none, none}, /* EQ */ + {none, none, none, true, none, none}, /* GE */ + {none, none, none, true, true, true}, /* GT */ + {none, none, none, none, none, true} /* NE */ }; static const bool BT_refutes_table[6][6] = { @@ -1373,12 +1373,12 @@ static const bool BT_refutes_table[6][6] = { * The predicate operator: * LT LE EQ GE GT NE */ - {none, none, TRUE, TRUE, TRUE, none}, /* LT */ - {none, none, none, none, TRUE, none}, /* LE */ - {TRUE, none, none, none, TRUE, TRUE}, /* EQ */ - {TRUE, none, none, none, none, none}, /* GE */ - {TRUE, TRUE, TRUE, none, none, none}, /* GT */ - {none, none, TRUE, none, none, none} /* NE */ + {none, none, true, true, true, none}, /* LT */ + {none, none, none, none, true, none}, /* LE */ + {true, none, none, none, true, true}, /* EQ */ + {true, none, none, none, none, none}, /* GE */ + {true, true, true, none, none, none}, /* GT */ + {none, none, true, none, none, none} /* NE */ }; static const StrategyNumber BT_implic_table[6][6] = { @@ -1417,7 +1417,7 @@ static const StrategyNumber BT_refute_table[6][6] = { * When refute_it == false, we want to prove the predicate true; * when refute_it == true, we want to prove the predicate false. * (There is enough common code to justify handling these two cases - * in one routine.) We return TRUE if able to make the proof, FALSE + * in one routine.) We return true if able to make the proof, false * if not able to prove it. * * We can make proofs involving several expression forms (here "foo" and "bar" @@ -1661,7 +1661,7 @@ operator_predicate_proof(Expr *predicate, Node *clause, bool refute_it) * Assuming that EXPR1 clause_op EXPR2 is true, try to prove or refute * EXPR1 pred_op EXPR2. * - * Return TRUE if able to make the proof, false if not able to prove it. + * Return true if able to make the proof, false if not able to prove it. */ static bool operator_same_subexprs_proof(Oid pred_op, Oid clause_op, bool refute_it) diff --git a/src/backend/optimizer/util/var.c b/src/backend/optimizer/util/var.c index b8d7d3ffadc..81c60dce5ed 100644 --- a/src/backend/optimizer/util/var.c +++ b/src/backend/optimizer/util/var.c @@ -657,9 +657,9 @@ pull_var_clause_walker(Node *node, pull_var_clause_context *context) * entries might now be arbitrary expressions, not just Vars. This affects * this function in one important way: we might find ourselves inserting * SubLink expressions into subqueries, and we must make sure that their - * Query.hasSubLinks fields get set to TRUE if so. If there are any + * Query.hasSubLinks fields get set to true if so. If there are any * SubLinks in the join alias lists, the outer Query should already have - * hasSubLinks = TRUE, so this is only relevant to un-flattened subqueries. + * hasSubLinks = true, so this is only relevant to un-flattened subqueries. * * NOTE: this is used on not-yet-planned expressions. We do not expect it * to be applied directly to the whole Query, so if we see a Query to start diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 4c83a63f7d9..09b9a899e49 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -1007,7 +1007,7 @@ AlterOptRoleElem: } | INHERIT { - $$ = makeDefElem("inherit", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("inherit", (Node *)makeInteger(true), @1); } | CONNECTION LIMIT SignedIconst { @@ -1030,36 +1030,36 @@ AlterOptRoleElem: * size of the main parser. */ if (strcmp($1, "superuser") == 0) - $$ = makeDefElem("superuser", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("superuser", (Node *)makeInteger(true), @1); else if (strcmp($1, "nosuperuser") == 0) - $$ = makeDefElem("superuser", (Node *)makeInteger(FALSE), @1); + $$ = makeDefElem("superuser", (Node *)makeInteger(false), @1); else if (strcmp($1, "createrole") == 0) - $$ = makeDefElem("createrole", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("createrole", (Node *)makeInteger(true), @1); else if (strcmp($1, "nocreaterole") == 0) - $$ = makeDefElem("createrole", (Node *)makeInteger(FALSE), @1); + $$ = makeDefElem("createrole", (Node *)makeInteger(false), @1); else if (strcmp($1, "replication") == 0) - $$ = makeDefElem("isreplication", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("isreplication", (Node *)makeInteger(true), @1); else if (strcmp($1, "noreplication") == 0) - $$ = makeDefElem("isreplication", (Node *)makeInteger(FALSE), @1); + $$ = makeDefElem("isreplication", (Node *)makeInteger(false), @1); else if (strcmp($1, "createdb") == 0) - $$ = makeDefElem("createdb", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("createdb", (Node *)makeInteger(true), @1); else if (strcmp($1, "nocreatedb") == 0) - $$ = makeDefElem("createdb", (Node *)makeInteger(FALSE), @1); + $$ = makeDefElem("createdb", (Node *)makeInteger(false), @1); else if (strcmp($1, "login") == 0) - $$ = makeDefElem("canlogin", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("canlogin", (Node *)makeInteger(true), @1); else if (strcmp($1, "nologin") == 0) - $$ = makeDefElem("canlogin", (Node *)makeInteger(FALSE), @1); + $$ = makeDefElem("canlogin", (Node *)makeInteger(false), @1); else if (strcmp($1, "bypassrls") == 0) - $$ = makeDefElem("bypassrls", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("bypassrls", (Node *)makeInteger(true), @1); else if (strcmp($1, "nobypassrls") == 0) - $$ = makeDefElem("bypassrls", (Node *)makeInteger(FALSE), @1); + $$ = makeDefElem("bypassrls", (Node *)makeInteger(false), @1); else if (strcmp($1, "noinherit") == 0) { /* * Note that INHERIT is a keyword, so it's handled by main parser, but * NOINHERIT is handled here. */ - $$ = makeDefElem("inherit", (Node *)makeInteger(FALSE), @1); + $$ = makeDefElem("inherit", (Node *)makeInteger(false), @1); } else ereport(ERROR, @@ -1192,21 +1192,21 @@ DropRoleStmt: DROP ROLE role_list { DropRoleStmt *n = makeNode(DropRoleStmt); - n->missing_ok = FALSE; + n->missing_ok = false; n->roles = $3; $$ = (Node *)n; } | DROP ROLE IF_P EXISTS role_list { DropRoleStmt *n = makeNode(DropRoleStmt); - n->missing_ok = TRUE; + n->missing_ok = true; n->roles = $5; $$ = (Node *)n; } | DROP USER role_list { DropRoleStmt *n = makeNode(DropRoleStmt); - n->missing_ok = FALSE; + n->missing_ok = false; n->roles = $3; $$ = (Node *)n; } @@ -1214,20 +1214,20 @@ DropRoleStmt: { DropRoleStmt *n = makeNode(DropRoleStmt); n->roles = $5; - n->missing_ok = TRUE; + n->missing_ok = true; $$ = (Node *)n; } | DROP GROUP_P role_list { DropRoleStmt *n = makeNode(DropRoleStmt); - n->missing_ok = FALSE; + n->missing_ok = false; n->roles = $3; $$ = (Node *)n; } | DROP GROUP_P IF_P EXISTS role_list { DropRoleStmt *n = makeNode(DropRoleStmt); - n->missing_ok = TRUE; + n->missing_ok = true; n->roles = $5; $$ = (Node *)n; } @@ -1732,8 +1732,8 @@ constraints_set_list: ; constraints_set_mode: - DEFERRED { $$ = TRUE; } - | IMMEDIATE { $$ = FALSE; } + DEFERRED { $$ = true; } + | IMMEDIATE { $$ = false; } ; @@ -2174,7 +2174,7 @@ alter_table_cmd: n->subtype = AT_DropColumn; n->name = $5; n->behavior = $6; - n->missing_ok = TRUE; + n->missing_ok = true; $$ = (Node *)n; } /* ALTER TABLE <name> DROP [COLUMN] <colname> [RESTRICT|CASCADE] */ @@ -2184,7 +2184,7 @@ alter_table_cmd: n->subtype = AT_DropColumn; n->name = $3; n->behavior = $4; - n->missing_ok = FALSE; + n->missing_ok = false; $$ = (Node *)n; } /* @@ -2252,7 +2252,7 @@ alter_table_cmd: n->subtype = AT_DropConstraint; n->name = $5; n->behavior = $6; - n->missing_ok = TRUE; + n->missing_ok = true; $$ = (Node *)n; } /* ALTER TABLE <name> DROP CONSTRAINT <name> [RESTRICT|CASCADE] */ @@ -2262,7 +2262,7 @@ alter_table_cmd: n->subtype = AT_DropConstraint; n->name = $3; n->behavior = $4; - n->missing_ok = FALSE; + n->missing_ok = false; $$ = (Node *)n; } /* ALTER TABLE <name> SET WITH OIDS */ @@ -2770,7 +2770,7 @@ alter_type_cmd: n->subtype = AT_DropColumn; n->name = $5; n->behavior = $6; - n->missing_ok = TRUE; + n->missing_ok = true; $$ = (Node *)n; } /* ALTER TYPE <name> DROP ATTRIBUTE <attname> [RESTRICT|CASCADE] */ @@ -2780,7 +2780,7 @@ alter_type_cmd: n->subtype = AT_DropColumn; n->name = $3; n->behavior = $4; - n->missing_ok = FALSE; + n->missing_ok = false; $$ = (Node *)n; } /* ALTER TYPE <name> ALTER ATTRIBUTE <attname> [SET DATA] TYPE <typename> [RESTRICT|CASCADE] */ @@ -2900,13 +2900,13 @@ CopyStmt: COPY opt_binary qualified_name opt_column_list opt_oids ; copy_from: - FROM { $$ = TRUE; } - | TO { $$ = FALSE; } + FROM { $$ = true; } + | TO { $$ = false; } ; opt_program: - PROGRAM { $$ = TRUE; } - | /* EMPTY */ { $$ = FALSE; } + PROGRAM { $$ = true; } + | /* EMPTY */ { $$ = false; } ; /* @@ -2937,11 +2937,11 @@ copy_opt_item: } | OIDS { - $$ = makeDefElem("oids", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("oids", (Node *)makeInteger(true), @1); } | FREEZE { - $$ = makeDefElem("freeze", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("freeze", (Node *)makeInteger(true), @1); } | DELIMITER opt_as Sconst { @@ -2957,7 +2957,7 @@ copy_opt_item: } | HEADER_P { - $$ = makeDefElem("header", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("header", (Node *)makeInteger(true), @1); } | QUOTE opt_as Sconst { @@ -3002,7 +3002,7 @@ opt_binary: opt_oids: WITH OIDS { - $$ = makeDefElem("oids", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("oids", (Node *)makeInteger(true), @1); } | /*EMPTY*/ { $$ = NULL; } ; @@ -3656,8 +3656,8 @@ ConstraintElem: } ; -opt_no_inherit: NO INHERIT { $$ = TRUE; } - | /* EMPTY */ { $$ = FALSE; } +opt_no_inherit: NO INHERIT { $$ = true; } + | /* EMPTY */ { $$ = false; } ; opt_column_list: @@ -3934,9 +3934,9 @@ create_as_target: ; opt_with_data: - WITH DATA_P { $$ = TRUE; } - | WITH NO DATA_P { $$ = FALSE; } - | /*EMPTY*/ { $$ = TRUE; } + WITH DATA_P { $$ = true; } + | WITH NO DATA_P { $$ = false; } + | /*EMPTY*/ { $$ = true; } ; @@ -4087,11 +4087,11 @@ SeqOptElem: AS SimpleTypename } | CYCLE { - $$ = makeDefElem("cycle", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("cycle", (Node *)makeInteger(true), @1); } | NO CYCLE { - $$ = makeDefElem("cycle", (Node *)makeInteger(FALSE), @1); + $$ = makeDefElem("cycle", (Node *)makeInteger(false), @1); } | INCREMENT opt_by NumericOnly { @@ -4191,8 +4191,8 @@ CreatePLangStmt: ; opt_trusted: - TRUSTED { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } + TRUSTED { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; /* This ought to be just func_name, but that causes reduce/reduce conflicts @@ -4343,7 +4343,7 @@ create_extension_opt_item: } | CASCADE { - $$ = makeDefElem("cascade", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("cascade", (Node *)makeInteger(true), @1); } ; @@ -5207,9 +5207,9 @@ CreateTrigStmt: n->columns = (List *) lsecond($5); n->whenClause = $10; n->transitionRels = $8; - n->isconstraint = FALSE; - n->deferrable = FALSE; - n->initdeferred = FALSE; + n->isconstraint = false; + n->deferrable = false; + n->initdeferred = false; n->constrrel = NULL; $$ = (Node *)n; } @@ -5223,13 +5223,13 @@ CreateTrigStmt: n->relation = $8; n->funcname = $17; n->args = $19; - n->row = TRUE; + n->row = true; n->timing = TRIGGER_TYPE_AFTER; n->events = intVal(linitial($6)); n->columns = (List *) lsecond($6); n->whenClause = $14; n->transitionRels = NIL; - n->isconstraint = TRUE; + n->isconstraint = true; processCASbits($10, @10, "TRIGGER", &n->deferrable, &n->initdeferred, NULL, NULL, yyscanner); @@ -5303,12 +5303,12 @@ TriggerTransition: ; TransitionOldOrNew: - NEW { $$ = TRUE; } - | OLD { $$ = FALSE; } + NEW { $$ = true; } + | OLD { $$ = false; } ; TransitionRowOrTable: - TABLE { $$ = TRUE; } + TABLE { $$ = true; } /* * According to the standard, lack of a keyword here implies ROW. * Support for that would require prohibiting ROW entirely here, @@ -5317,7 +5317,7 @@ TransitionRowOrTable: * next token. Requiring ROW seems cleanest and easiest to * explain. */ - | ROW { $$ = FALSE; } + | ROW { $$ = false; } ; TransitionRelName: @@ -5335,7 +5335,7 @@ TriggerForSpec: * If ROW/STATEMENT not specified, default to * STATEMENT, per SQL */ - $$ = FALSE; + $$ = false; } ; @@ -5345,8 +5345,8 @@ TriggerForOptEach: ; TriggerForType: - ROW { $$ = TRUE; } - | STATEMENT { $$ = FALSE; } + ROW { $$ = true; } + | STATEMENT { $$ = false; } ; TriggerWhen: @@ -5497,7 +5497,7 @@ CreateAssertStmt: CreateTrigStmt *n = makeNode(CreateTrigStmt); n->trigname = $3; n->args = list_make1($6); - n->isconstraint = TRUE; + n->isconstraint = true; processCASbits($8, @8, "ASSERTION", &n->deferrable, &n->initdeferred, NULL, NULL, yyscanner); @@ -5877,8 +5877,8 @@ opclass_item: } ; -opt_default: DEFAULT { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } +opt_default: DEFAULT { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; opt_opfamily: FAMILY any_name { $$ = $2; } @@ -5902,9 +5902,9 @@ opt_recheck: RECHECK errmsg("RECHECK is no longer required"), errhint("Update your data type."), parser_errposition(@1))); - $$ = TRUE; + $$ = true; } - | /*EMPTY*/ { $$ = FALSE; } + | /*EMPTY*/ { $$ = false; } ; @@ -6052,7 +6052,7 @@ DropStmt: DROP drop_type_any_name IF_P EXISTS any_name_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = $2; - n->missing_ok = TRUE; + n->missing_ok = true; n->objects = $5; n->behavior = $6; n->concurrent = false; @@ -6062,7 +6062,7 @@ DropStmt: DROP drop_type_any_name IF_P EXISTS any_name_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = $2; - n->missing_ok = FALSE; + n->missing_ok = false; n->objects = $3; n->behavior = $4; n->concurrent = false; @@ -6072,7 +6072,7 @@ DropStmt: DROP drop_type_any_name IF_P EXISTS any_name_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = $2; - n->missing_ok = TRUE; + n->missing_ok = true; n->objects = $5; n->behavior = $6; n->concurrent = false; @@ -6082,7 +6082,7 @@ DropStmt: DROP drop_type_any_name IF_P EXISTS any_name_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = $2; - n->missing_ok = FALSE; + n->missing_ok = false; n->objects = $3; n->behavior = $4; n->concurrent = false; @@ -6112,7 +6112,7 @@ DropStmt: DROP drop_type_any_name IF_P EXISTS any_name_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_TYPE; - n->missing_ok = FALSE; + n->missing_ok = false; n->objects = $3; n->behavior = $4; n->concurrent = false; @@ -6122,7 +6122,7 @@ DropStmt: DROP drop_type_any_name IF_P EXISTS any_name_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_TYPE; - n->missing_ok = TRUE; + n->missing_ok = true; n->objects = $5; n->behavior = $6; n->concurrent = false; @@ -6132,7 +6132,7 @@ DropStmt: DROP drop_type_any_name IF_P EXISTS any_name_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_DOMAIN; - n->missing_ok = FALSE; + n->missing_ok = false; n->objects = $3; n->behavior = $4; n->concurrent = false; @@ -6142,7 +6142,7 @@ DropStmt: DROP drop_type_any_name IF_P EXISTS any_name_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_DOMAIN; - n->missing_ok = TRUE; + n->missing_ok = true; n->objects = $5; n->behavior = $6; n->concurrent = false; @@ -6152,7 +6152,7 @@ DropStmt: DROP drop_type_any_name IF_P EXISTS any_name_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_INDEX; - n->missing_ok = FALSE; + n->missing_ok = false; n->objects = $4; n->behavior = $5; n->concurrent = true; @@ -6162,7 +6162,7 @@ DropStmt: DROP drop_type_any_name IF_P EXISTS any_name_list opt_drop_behavior { DropStmt *n = makeNode(DropStmt); n->removeType = OBJECT_INDEX; - n->missing_ok = TRUE; + n->missing_ok = true; n->objects = $6; n->behavior = $7; n->concurrent = true; @@ -6584,13 +6584,13 @@ security_label: Sconst { $$ = $1; } FetchStmt: FETCH fetch_args { FetchStmt *n = (FetchStmt *) $2; - n->ismove = FALSE; + n->ismove = false; $$ = (Node *)n; } | MOVE fetch_args { FetchStmt *n = (FetchStmt *) $2; - n->ismove = TRUE; + n->ismove = true; $$ = (Node *)n; } ; @@ -7000,8 +7000,8 @@ grantee: opt_grant_grant_option: - WITH GRANT OPTION { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } + WITH GRANT OPTION { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; /***************************************************************************** @@ -7046,8 +7046,8 @@ RevokeRoleStmt: } ; -opt_grant_admin_option: WITH ADMIN OPTION { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } +opt_grant_admin_option: WITH ADMIN OPTION { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; opt_granted_by: GRANTED BY RoleSpec { $$ = $3; } @@ -7210,13 +7210,13 @@ IndexStmt: CREATE opt_unique INDEX opt_concurrently opt_index_name ; opt_unique: - UNIQUE { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } + UNIQUE { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; opt_concurrently: - CONCURRENTLY { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } + CONCURRENTLY { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; opt_index_name: @@ -7344,8 +7344,8 @@ CreateFunctionStmt: ; opt_or_replace: - OR REPLACE { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } + OR REPLACE { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; func_args: '(' func_args_list ')' { $$ = $2; } @@ -7514,7 +7514,7 @@ func_type: Typename { $$ = $1; } { $$ = makeTypeNameFromNameList(lcons(makeString($2), $3)); $$->pct_type = true; - $$->setof = TRUE; + $$->setof = true; $$->location = @2; } ; @@ -7630,15 +7630,15 @@ createfunc_opt_list: common_func_opt_item: CALLED ON NULL_P INPUT_P { - $$ = makeDefElem("strict", (Node *)makeInteger(FALSE), @1); + $$ = makeDefElem("strict", (Node *)makeInteger(false), @1); } | RETURNS NULL_P ON NULL_P INPUT_P { - $$ = makeDefElem("strict", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("strict", (Node *)makeInteger(true), @1); } | STRICT_P { - $$ = makeDefElem("strict", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("strict", (Node *)makeInteger(true), @1); } | IMMUTABLE { @@ -7654,27 +7654,27 @@ common_func_opt_item: } | EXTERNAL SECURITY DEFINER { - $$ = makeDefElem("security", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("security", (Node *)makeInteger(true), @1); } | EXTERNAL SECURITY INVOKER { - $$ = makeDefElem("security", (Node *)makeInteger(FALSE), @1); + $$ = makeDefElem("security", (Node *)makeInteger(false), @1); } | SECURITY DEFINER { - $$ = makeDefElem("security", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("security", (Node *)makeInteger(true), @1); } | SECURITY INVOKER { - $$ = makeDefElem("security", (Node *)makeInteger(FALSE), @1); + $$ = makeDefElem("security", (Node *)makeInteger(false), @1); } | LEAKPROOF { - $$ = makeDefElem("leakproof", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("leakproof", (Node *)makeInteger(true), @1); } | NOT LEAKPROOF { - $$ = makeDefElem("leakproof", (Node *)makeInteger(FALSE), @1); + $$ = makeDefElem("leakproof", (Node *)makeInteger(false), @1); } | COST NumericOnly { @@ -7710,7 +7710,7 @@ createfunc_opt_item: } | WINDOW { - $$ = makeDefElem("window", (Node *)makeInteger(TRUE), @1); + $$ = makeDefElem("window", (Node *)makeInteger(true), @1); } | common_func_opt_item { @@ -7999,8 +7999,8 @@ DropCastStmt: DROP CAST opt_if_exists '(' Typename AS Typename ')' opt_drop_beha } ; -opt_if_exists: IF_P EXISTS { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } +opt_if_exists: IF_P EXISTS { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; @@ -8128,7 +8128,7 @@ AlterTblSpcStmt: makeNode(AlterTableSpaceOptionsStmt); n->tablespacename = $3; n->options = $5; - n->isReset = FALSE; + n->isReset = false; $$ = (Node *)n; } | ALTER TABLESPACE name RESET reloptions @@ -8137,7 +8137,7 @@ AlterTblSpcStmt: makeNode(AlterTableSpaceOptionsStmt); n->tablespacename = $3; n->options = $5; - n->isReset = TRUE; + n->isReset = true; $$ = (Node *)n; } ; @@ -9164,7 +9164,7 @@ CreatePublicationStmt: n->tables = (List *)$4; /* FOR ALL TABLES */ else - n->for_all_tables = TRUE; + n->for_all_tables = true; } $$ = (Node *)n; } @@ -9182,7 +9182,7 @@ publication_for_tables: } | FOR ALL TABLES { - $$ = (Node *) makeInteger(TRUE); + $$ = (Node *) makeInteger(true); } ; @@ -9317,7 +9317,7 @@ AlterSubscriptionStmt: n->kind = ALTER_SUBSCRIPTION_ENABLED; n->subname = $3; n->options = list_make1(makeDefElem("enabled", - (Node *)makeInteger(TRUE), @1)); + (Node *)makeInteger(true), @1)); $$ = (Node *)n; } | ALTER SUBSCRIPTION name DISABLE_P @@ -9327,7 +9327,7 @@ AlterSubscriptionStmt: n->kind = ALTER_SUBSCRIPTION_ENABLED; n->subname = $3; n->options = list_make1(makeDefElem("enabled", - (Node *)makeInteger(FALSE), @1)); + (Node *)makeInteger(false), @1)); $$ = (Node *)n; } ; @@ -9420,9 +9420,9 @@ event: SELECT { $$ = CMD_SELECT; } ; opt_instead: - INSTEAD { $$ = TRUE; } - | ALSO { $$ = FALSE; } - | /*EMPTY*/ { $$ = FALSE; } + INSTEAD { $$ = true; } + | ALSO { $$ = false; } + | /*EMPTY*/ { $$ = false; } ; @@ -9598,16 +9598,16 @@ transaction_mode_item: makeStringConst($3, @3), @1); } | READ ONLY { $$ = makeDefElem("transaction_read_only", - makeIntConst(TRUE, @1), @1); } + makeIntConst(true, @1), @1); } | READ WRITE { $$ = makeDefElem("transaction_read_only", - makeIntConst(FALSE, @1), @1); } + makeIntConst(false, @1), @1); } | DEFERRABLE { $$ = makeDefElem("transaction_deferrable", - makeIntConst(TRUE, @1), @1); } + makeIntConst(true, @1), @1); } | NOT DEFERRABLE { $$ = makeDefElem("transaction_deferrable", - makeIntConst(FALSE, @1), @1); } + makeIntConst(false, @1), @1); } ; /* Syntax with commas is SQL-spec, without commas is Postgres historical */ @@ -9846,14 +9846,14 @@ DropdbStmt: DROP DATABASE database_name { DropdbStmt *n = makeNode(DropdbStmt); n->dbname = $3; - n->missing_ok = FALSE; + n->missing_ok = false; $$ = (Node *)n; } | DROP DATABASE IF_P EXISTS database_name { DropdbStmt *n = makeNode(DropdbStmt); n->dbname = $5; - n->missing_ok = TRUE; + n->missing_ok = true; $$ = (Node *)n; } ; @@ -10222,16 +10222,16 @@ analyze_keyword: ; opt_verbose: - VERBOSE { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } + VERBOSE { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; -opt_full: FULL { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } +opt_full: FULL { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; -opt_freeze: FREEZE { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } +opt_freeze: FREEZE { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; opt_name_list: @@ -10648,8 +10648,8 @@ lock_type: ACCESS SHARE { $$ = AccessShareLock; } | ACCESS EXCLUSIVE { $$ = AccessExclusiveLock; } ; -opt_nowait: NOWAIT { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } +opt_nowait: NOWAIT { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; opt_nowait_or_skip: @@ -11116,9 +11116,9 @@ opt_table: TABLE {} ; all_or_distinct: - ALL { $$ = TRUE; } - | DISTINCT { $$ = FALSE; } - | /*EMPTY*/ { $$ = FALSE; } + ALL { $$ = true; } + | DISTINCT { $$ = false; } + | /*EMPTY*/ { $$ = false; } ; /* We use (NIL) as a placeholder to indicate that all target expressions @@ -11547,7 +11547,7 @@ joined_table: /* CROSS JOIN is same as unqualified inner join */ JoinExpr *n = makeNode(JoinExpr); n->jointype = JOIN_INNER; - n->isNatural = FALSE; + n->isNatural = false; n->larg = $1; n->rarg = $4; n->usingClause = NIL; @@ -11558,7 +11558,7 @@ joined_table: { JoinExpr *n = makeNode(JoinExpr); n->jointype = $2; - n->isNatural = FALSE; + n->isNatural = false; n->larg = $1; n->rarg = $4; if ($5 != NULL && IsA($5, List)) @@ -11572,7 +11572,7 @@ joined_table: /* letting join_type reduce to empty doesn't work */ JoinExpr *n = makeNode(JoinExpr); n->jointype = JOIN_INNER; - n->isNatural = FALSE; + n->isNatural = false; n->larg = $1; n->rarg = $3; if ($4 != NULL && IsA($4, List)) @@ -11585,7 +11585,7 @@ joined_table: { JoinExpr *n = makeNode(JoinExpr); n->jointype = $3; - n->isNatural = TRUE; + n->isNatural = true; n->larg = $1; n->rarg = $5; n->usingClause = NIL; /* figure out which columns later... */ @@ -11597,7 +11597,7 @@ joined_table: /* letting join_type reduce to empty doesn't work */ JoinExpr *n = makeNode(JoinExpr); n->jointype = JOIN_INNER; - n->isNatural = TRUE; + n->isNatural = true; n->larg = $1; n->rarg = $4; n->usingClause = NIL; /* figure out which columns later... */ @@ -12067,7 +12067,7 @@ Typename: SimpleTypename opt_array_bounds { $$ = $2; $$->arrayBounds = $3; - $$->setof = TRUE; + $$->setof = true; } /* SQL standard syntax, currently only one-dimensional */ | SimpleTypename ARRAY '[' Iconst ']' @@ -12079,7 +12079,7 @@ Typename: SimpleTypename opt_array_bounds { $$ = $2; $$->arrayBounds = list_make1(makeInteger($5)); - $$->setof = TRUE; + $$->setof = true; } | SimpleTypename ARRAY { @@ -12090,7 +12090,7 @@ Typename: SimpleTypename opt_array_bounds { $$ = $2; $$->arrayBounds = list_make1(makeInteger(-1)); - $$->setof = TRUE; + $$->setof = true; } ; @@ -12377,8 +12377,8 @@ character: CHARACTER opt_varying ; opt_varying: - VARYING { $$ = TRUE; } - | /*EMPTY*/ { $$ = FALSE; } + VARYING { $$ = true; } + | /*EMPTY*/ { $$ = false; } ; /* @@ -12430,9 +12430,9 @@ ConstInterval: ; opt_timezone: - WITH_LA TIME ZONE { $$ = TRUE; } - | WITHOUT TIME ZONE { $$ = FALSE; } - | /*EMPTY*/ { $$ = FALSE; } + WITH_LA TIME ZONE { $$ = true; } + | WITHOUT TIME ZONE { $$ = false; } + | /*EMPTY*/ { $$ = false; } ; opt_interval: @@ -13193,14 +13193,14 @@ func_application: func_name '(' ')' | func_name '(' VARIADIC func_arg_expr opt_sort_clause ')' { FuncCall *n = makeFuncCall($1, list_make1($4), @1); - n->func_variadic = TRUE; + n->func_variadic = true; n->agg_order = $5; $$ = (Node *)n; } | func_name '(' func_arg_list ',' VARIADIC func_arg_expr opt_sort_clause ')' { FuncCall *n = makeFuncCall($1, lappend($3, $6), @1); - n->func_variadic = TRUE; + n->func_variadic = true; n->agg_order = $7; $$ = (Node *)n; } @@ -13218,7 +13218,7 @@ func_application: func_name '(' ')' { FuncCall *n = makeFuncCall($1, $4, @1); n->agg_order = $5; - n->agg_distinct = TRUE; + n->agg_distinct = true; $$ = (Node *)n; } | func_name '(' '*' ')' @@ -13234,7 +13234,7 @@ func_application: func_name '(' ')' * really was. */ FuncCall *n = makeFuncCall($1, NIL, @1); - n->agg_star = TRUE; + n->agg_star = true; $$ = (Node *)n; } ; @@ -13278,7 +13278,7 @@ func_expr: func_application within_group_clause filter_clause over_clause errmsg("cannot use VARIADIC with WITHIN GROUP"), parser_errposition(@2))); n->agg_order = $2; - n->agg_within_group = TRUE; + n->agg_within_group = true; } n->agg_filter = $3; n->over = $4; @@ -13568,9 +13568,9 @@ document_or_content: DOCUMENT_P { $$ = XMLOPTION_DOCUMENT; } | CONTENT_P { $$ = XMLOPTION_CONTENT; } ; -xml_whitespace_option: PRESERVE WHITESPACE_P { $$ = TRUE; } - | STRIP_P WHITESPACE_P { $$ = FALSE; } - | /*EMPTY*/ { $$ = FALSE; } +xml_whitespace_option: PRESERVE WHITESPACE_P { $$ = true; } + | STRIP_P WHITESPACE_P { $$ = false; } + | /*EMPTY*/ { $$ = false; } ; /* We allow several variants for SQL and other compatibility. */ @@ -14442,11 +14442,11 @@ AexprConst: Iconst } | TRUE_P { - $$ = makeBoolAConst(TRUE, @1); + $$ = makeBoolAConst(true, @1); } | FALSE_P { - $$ = makeBoolAConst(FALSE, @1); + $$ = makeBoolAConst(false, @1); } | NULL_P { diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index ed26517c266..2828bbf7966 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -2056,7 +2056,7 @@ findTargetlistEntrySQL99(ParseState *pstate, Node *node, List **tlist, /* * If no matches, construct a new target entry which is appended to the - * end of the target list. This target is given resjunk = TRUE so that it + * end of the target list. This target is given resjunk = true so that it * will not be projected into the final tuple. */ target_result = transformTargetEntry(pstate, node, expr, exprKind, diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c index def41b36b68..7d10d74a3e7 100644 --- a/src/backend/parser/parse_coerce.c +++ b/src/backend/parser/parse_coerce.c @@ -1465,7 +1465,7 @@ coerce_to_common_type(ParseState *pstate, Node *node, * that is, so long as there is no use of ANYELEMENT. This is mostly for * backwards compatibility with the pre-7.4 behavior of ANYARRAY. * - * We do not ereport here, but just return FALSE if a rule is violated. + * We do not ereport here, but just return false if a rule is violated. */ bool check_generic_type_consistency(Oid *actual_arg_types, @@ -2088,7 +2088,7 @@ TypeCategory(Oid type) /* IsPreferredType() * Check if this type is a preferred type for the given category. * - * If category is TYPCATEGORY_INVALID, then we'll return TRUE for preferred + * If category is TYPCATEGORY_INVALID, then we'll return true for preferred * types of any category; otherwise, only for preferred types of that * category. */ diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c index d7971cc3d9f..568eda0cf7c 100644 --- a/src/backend/parser/parse_oper.c +++ b/src/backend/parser/parse_oper.c @@ -1023,7 +1023,7 @@ static HTAB *OprCacheHash = NULL; * make_oper_cache_key * Fill the lookup key struct given operator name and arg types. * - * Returns TRUE if successful, FALSE if the search_path overflowed + * Returns true if successful, false if the search_path overflowed * (hence no caching is possible). * * pstate/location are used only to report the error position; pass NULL/-1 diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index 6acc21dfe6a..e6740c291da 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -2157,8 +2157,8 @@ addRTEtoQuery(ParseState *pstate, RangeTblEntry *rte, * * This creates lists of an RTE's column names (aliases if provided, else * real names) and Vars for each column. Only user columns are considered. - * If include_dropped is FALSE then dropped columns are omitted from the - * results. If include_dropped is TRUE then empty strings and NULL constants + * If include_dropped is false then dropped columns are omitted from the + * results. If include_dropped is true then empty strings and NULL constants * (not Vars!) are returned for dropped columns. * * rtindex, sublevels_up, and location are the varno, varlevelsup, and location @@ -3315,7 +3315,7 @@ errorMissingColumn(ParseState *pstate, /* - * Examine a fully-parsed query, and return TRUE iff any relation underlying + * Examine a fully-parsed query, and return true iff any relation underlying * the query is a temporary relation (table, view, or materialized view). */ bool diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c index 27e568fc626..30fc2d9ff84 100644 --- a/src/backend/parser/parse_utilcmd.c +++ b/src/backend/parser/parse_utilcmd.c @@ -628,7 +628,7 @@ transformColumnDefinition(CreateStmtContext *cxt, ColumnDef *column) column->colname, cxt->relation->relname), parser_errposition(cxt->pstate, constraint->location))); - column->is_not_null = FALSE; + column->is_not_null = false; saw_nullable = true; break; @@ -640,7 +640,7 @@ transformColumnDefinition(CreateStmtContext *cxt, ColumnDef *column) column->colname, cxt->relation->relname), parser_errposition(cxt->pstate, constraint->location))); - column->is_not_null = TRUE; + column->is_not_null = true; saw_nullable = true; break; @@ -680,7 +680,7 @@ transformColumnDefinition(CreateStmtContext *cxt, ColumnDef *column) column->identity = constraint->generated_when; saw_identity = true; - column->is_not_null = TRUE; + column->is_not_null = true; break; } @@ -2010,7 +2010,7 @@ transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt) { /* found column in the new table; force it to be NOT NULL */ if (constraint->contype == CONSTR_PRIMARY) - column->is_not_null = TRUE; + column->is_not_null = true; } else if (SystemAttributeByName(key, cxt->hasoids) != NULL) { diff --git a/src/backend/parser/scansup.c b/src/backend/parser/scansup.c index c3d28058032..dff7a04147d 100644 --- a/src/backend/parser/scansup.c +++ b/src/backend/parser/scansup.c @@ -209,7 +209,7 @@ truncate_identifier(char *ident, int len, bool warn) } /* - * scanner_isspace() --- return TRUE if flex scanner considers char whitespace + * scanner_isspace() --- return true if flex scanner considers char whitespace * * This should be used instead of the potentially locale-dependent isspace() * function when it's important to match the lexer's behavior. diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 3a0b49c7c40..5c256ff8abf 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -5270,7 +5270,7 @@ done: * pgstat_read_db_statsfile_timestamp() - * * Attempt to determine the timestamp of the last db statfile write. - * Returns TRUE if successful; the timestamp is stored in *ts. + * Returns true if successful; the timestamp is stored in *ts. * * This needs to be careful about handling databases for which no stats file * exists, such as databases without a stat entry or those not yet written: diff --git a/src/backend/replication/repl_gram.y b/src/backend/replication/repl_gram.y index a012447fa2a..6e4ca10116b 100644 --- a/src/backend/replication/repl_gram.y +++ b/src/backend/replication/repl_gram.y @@ -181,22 +181,22 @@ base_backup_opt: | K_PROGRESS { $$ = makeDefElem("progress", - (Node *)makeInteger(TRUE), -1); + (Node *)makeInteger(true), -1); } | K_FAST { $$ = makeDefElem("fast", - (Node *)makeInteger(TRUE), -1); + (Node *)makeInteger(true), -1); } | K_WAL { $$ = makeDefElem("wal", - (Node *)makeInteger(TRUE), -1); + (Node *)makeInteger(true), -1); } | K_NOWAIT { $$ = makeDefElem("nowait", - (Node *)makeInteger(TRUE), -1); + (Node *)makeInteger(true), -1); } | K_MAX_RATE UCONST { @@ -206,7 +206,7 @@ base_backup_opt: | K_TABLESPACE_MAP { $$ = makeDefElem("tablespace_map", - (Node *)makeInteger(TRUE), -1); + (Node *)makeInteger(true), -1); } ; @@ -247,22 +247,22 @@ create_slot_opt: K_EXPORT_SNAPSHOT { $$ = makeDefElem("export_snapshot", - (Node *)makeInteger(TRUE), -1); + (Node *)makeInteger(true), -1); } | K_NOEXPORT_SNAPSHOT { $$ = makeDefElem("export_snapshot", - (Node *)makeInteger(FALSE), -1); + (Node *)makeInteger(false), -1); } | K_USE_SNAPSHOT { $$ = makeDefElem("use_snapshot", - (Node *)makeInteger(TRUE), -1); + (Node *)makeInteger(true), -1); } | K_RESERVE_WAL { $$ = makeDefElem("reserve_wal", - (Node *)makeInteger(TRUE), -1); + (Node *)makeInteger(true), -1); } ; diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c index 071b3a9ec94..007d3dabc19 100644 --- a/src/backend/rewrite/rewriteDefine.c +++ b/src/backend/rewrite/rewriteDefine.c @@ -531,7 +531,7 @@ DefineQueryRewrite(char *rulename, replace); /* - * Set pg_class 'relhasrules' field TRUE for event relation. + * Set pg_class 'relhasrules' field true for event relation. * * Important side effect: an SI notice is broadcast to force all * backends (including me!) to update relcache entries with the new diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c index 7a61af79059..c2bc3ad4c57 100644 --- a/src/backend/rewrite/rewriteHandler.c +++ b/src/backend/rewrite/rewriteHandler.c @@ -325,8 +325,8 @@ acquireLocksOnSubLinks(Node *node, acquireLocksOnSubLinks_context *context) * rt_index - RT index of result relation in original query * event - type of rule event * Output arguments: - * *returning_flag - set TRUE if we rewrite RETURNING clause in rule_action - * (must be initialized to FALSE) + * *returning_flag - set true if we rewrite RETURNING clause in rule_action + * (must be initialized to false) * Return value: * rewritten form of rule_action */ @@ -2017,10 +2017,10 @@ CopyAndAddInvertedQual(Query *parsetree, * event - type of rule event * locks - list of rules to fire * Output arguments: - * *instead_flag - set TRUE if any unqualified INSTEAD rule is found - * (must be initialized to FALSE) - * *returning_flag - set TRUE if we rewrite RETURNING clause in any rule - * (must be initialized to FALSE) + * *instead_flag - set true if any unqualified INSTEAD rule is found + * (must be initialized to false) + * *returning_flag - set true if we rewrite RETURNING clause in any rule + * (must be initialized to false) * *qual_product - filled with modified original query if any qualified * INSTEAD rule is found (must be initialized to NULL) * Return value: diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c index 6579b2446d1..4ceaf641ba3 100644 --- a/src/backend/rewrite/rewriteManip.c +++ b/src/backend/rewrite/rewriteManip.c @@ -1203,7 +1203,7 @@ replace_rte_variables_mutator(Node *node, * appear in the expression. * * If the expression tree contains a whole-row Var for the target RTE, - * *found_whole_row is set to TRUE. In addition, if to_rowtype is + * *found_whole_row is set to true. In addition, if to_rowtype is * not InvalidOid, we replace the Var with a Var of that vartype, inserting * a ConvertRowTypeExpr to map back to the rowtype expected by the expression. * (Therefore, to_rowtype had better be a child rowtype of the rowtype of the diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 15795b0c5ad..572f413d6e4 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -975,7 +975,7 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, * * The returned buffer is pinned and is already marked as holding the * desired page. If it already did have the desired page, *foundPtr is - * set TRUE. Otherwise, *foundPtr is set FALSE and the buffer is marked + * set true. Otherwise, *foundPtr is set false and the buffer is marked * as IO_IN_PROGRESS; ReadBuffer will now need to do I/O to fill it. * * *foundPtr is actually redundant with the buffer's BM_VALID flag, but @@ -1025,7 +1025,7 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, /* Can release the mapping lock as soon as we've pinned it */ LWLockRelease(newPartitionLock); - *foundPtr = TRUE; + *foundPtr = true; if (!valid) { @@ -1042,7 +1042,7 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, * If we get here, previous attempts to read the buffer must * have failed ... but we shall bravely try again. */ - *foundPtr = FALSE; + *foundPtr = false; } } @@ -1237,7 +1237,7 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, /* Can release the mapping lock as soon as we've pinned it */ LWLockRelease(newPartitionLock); - *foundPtr = TRUE; + *foundPtr = true; if (!valid) { @@ -1254,7 +1254,7 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, * If we get here, previous attempts to read the buffer * must have failed ... but we shall bravely try again. */ - *foundPtr = FALSE; + *foundPtr = false; } } @@ -1324,9 +1324,9 @@ BufferAlloc(SMgrRelation smgr, char relpersistence, ForkNumber forkNum, * read it before we did, so there's nothing left for BufferAlloc() to do. */ if (StartBufferIO(buf, true)) - *foundPtr = FALSE; + *foundPtr = false; else - *foundPtr = TRUE; + *foundPtr = true; return buf; } @@ -1564,7 +1564,7 @@ ReleaseAndReadBuffer(Buffer buffer, * * Note that ResourceOwnerEnlargeBuffers must have been done already. * - * Returns TRUE if buffer is BM_VALID, else FALSE. This provision allows + * Returns true if buffer is BM_VALID, else false. This provision allows * some callers to avoid an extra spinlock cycle. */ static bool @@ -1688,7 +1688,7 @@ PinBuffer_Locked(BufferDesc *buf) * This should be applied only to shared buffers, never local ones. * * Most but not all callers want CurrentResourceOwner to be adjusted. - * Those that don't should pass fixOwner = FALSE. + * Those that don't should pass fixOwner = false. */ static void UnpinBuffer(BufferDesc *buf, bool fixOwner) @@ -3712,7 +3712,7 @@ HoldingBufferPinThatDelaysRecovery(void) * ConditionalLockBufferForCleanup - as above, but don't wait to get the lock * * We won't loop, but just check once to see if the pin count is OK. If - * not, return FALSE with no lock held. + * not, return false with no lock held. */ bool ConditionalLockBufferForCleanup(Buffer buffer) @@ -3868,8 +3868,8 @@ WaitIO(BufferDesc *buf) * and output operations only on buffers that are BM_VALID and BM_DIRTY, * so we can always tell if the work is already done. * - * Returns TRUE if we successfully marked the buffer as I/O busy, - * FALSE if someone else already did the work. + * Returns true if we successfully marked the buffer as I/O busy, + * false if someone else already did the work. */ static bool StartBufferIO(BufferDesc *buf, bool forInput) @@ -3929,7 +3929,7 @@ StartBufferIO(BufferDesc *buf, bool forInput) * We hold the buffer's io_in_progress lock * The buffer is Pinned * - * If clear_dirty is TRUE and BM_JUST_DIRTIED is not set, we clear the + * If clear_dirty is true and BM_JUST_DIRTIED is not set, we clear the * buffer's BM_DIRTY flag. This is appropriate when terminating a * successful write. The check on BM_JUST_DIRTIED is necessary to avoid * marking the buffer clean if it was re-dirtied while we were writing. diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c index 1d540e87e88..1930f0ee0b4 100644 --- a/src/backend/storage/buffer/localbuf.c +++ b/src/backend/storage/buffer/localbuf.c @@ -145,11 +145,11 @@ LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum, BlockNumber blockNum, ResourceOwnerRememberBuffer(CurrentResourceOwner, BufferDescriptorGetBuffer(bufHdr)); if (buf_state & BM_VALID) - *foundPtr = TRUE; + *foundPtr = true; else { /* Previous read attempt must have failed; try again */ - *foundPtr = FALSE; + *foundPtr = false; } return bufHdr; } @@ -268,7 +268,7 @@ LocalBufferAlloc(SMgrRelation smgr, ForkNumber forkNum, BlockNumber blockNum, buf_state += BUF_USAGECOUNT_ONE; pg_atomic_unlocked_write_u32(&bufHdr->state, buf_state); - *foundPtr = FALSE; + *foundPtr = false; return bufHdr; } diff --git a/src/backend/storage/file/buffile.c b/src/backend/storage/file/buffile.c index de85b6805c2..a73c025c815 100644 --- a/src/backend/storage/file/buffile.c +++ b/src/backend/storage/file/buffile.c @@ -68,7 +68,7 @@ struct BufFile * avoid making redundant FileSeek calls. */ - bool isTemp; /* can only add files if this is TRUE */ + bool isTemp; /* can only add files if this is true */ bool isInterXact; /* keep open over transactions? */ bool dirty; /* does buffer need to be written? */ diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index b0c174284b4..3849bfb15d9 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -2577,7 +2577,7 @@ SetTempTablespaces(Oid *tableSpaces, int numSpaces) /* * TempTablespacesAreSet * - * Returns TRUE if SetTempTablespaces has been called in current transaction. + * Returns true if SetTempTablespaces has been called in current transaction. * (This is just so that tablespaces.c doesn't need its own per-transaction * state.) */ diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index ffa6180effd..37e12bd8295 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -1791,7 +1791,7 @@ GetSnapshotData(Snapshot snapshot) * check that the source transaction is still running, and we'd better do * that atomically with installing the new xmin. * - * Returns TRUE if successful, FALSE if source xact is no longer running. + * Returns true if successful, false if source xact is no longer running. */ bool ProcArrayInstallImportedXmin(TransactionId xmin, @@ -1866,7 +1866,7 @@ ProcArrayInstallImportedXmin(TransactionId xmin, * PGPROC of the transaction from which we imported the snapshot, rather than * an XID. * - * Returns TRUE if successful, FALSE if source xact is no longer running. + * Returns true if successful, false if source xact is no longer running. */ bool ProcArrayInstallRestoredXmin(TransactionId xmin, PGPROC *proc) @@ -2873,7 +2873,7 @@ CountUserBackends(Oid roleid) * The current backend is always ignored; it is caller's responsibility to * check whether the current backend uses the given DB, if it's important. * - * Returns TRUE if there are (still) other backends in the DB, FALSE if not. + * Returns true if there are (still) other backends in the DB, false if not. * Also, *nbackends and *nprepared are set to the number of other backends * and prepared transactions in the DB, respectively. * diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c index 81c291f6e37..22522676f3c 100644 --- a/src/backend/storage/ipc/shmem.c +++ b/src/backend/storage/ipc/shmem.c @@ -257,7 +257,7 @@ ShmemAllocUnlocked(Size size) /* * ShmemAddrIsValid -- test if an address refers to shared memory * - * Returns TRUE if the pointer points within the shared memory segment. + * Returns true if the pointer points within the shared memory segment. */ bool ShmemAddrIsValid(const void *addr) @@ -361,7 +361,7 @@ ShmemInitHash(const char *name, /* table string name for shmem index */ * for it. If it exists already, a pointer to the existing * structure is returned. * - * Returns: pointer to the object. *foundPtr is set TRUE if the object was + * Returns: pointer to the object. *foundPtr is set true if the object was * already in the shmem index (hence, already initialized). * * Note: before Postgres 9.0, this function returned NULL for some failure @@ -388,7 +388,7 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr) /* Must be initializing a (non-standalone) backend */ Assert(shmemseghdr->index != NULL); structPtr = shmemseghdr->index; - *foundPtr = TRUE; + *foundPtr = true; } else { @@ -403,7 +403,7 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr) Assert(shmemseghdr->index == NULL); structPtr = ShmemAlloc(size); shmemseghdr->index = structPtr; - *foundPtr = FALSE; + *foundPtr = false; } LWLockRelease(ShmemIndexLock); return structPtr; diff --git a/src/backend/storage/ipc/shmqueue.c b/src/backend/storage/ipc/shmqueue.c index 1026e67b947..da67495b034 100644 --- a/src/backend/storage/ipc/shmqueue.c +++ b/src/backend/storage/ipc/shmqueue.c @@ -40,7 +40,7 @@ SHMQueueInit(SHM_QUEUE *queue) } /* - * SHMQueueIsDetached -- TRUE if element is not currently + * SHMQueueIsDetached -- true if element is not currently * in a queue. */ bool @@ -174,7 +174,7 @@ SHMQueuePrev(const SHM_QUEUE *queue, const SHM_QUEUE *curElem, Size linkOffset) } /* - * SHMQueueEmpty -- TRUE if queue head is only element, FALSE otherwise + * SHMQueueEmpty -- true if queue head is only element, false otherwise */ bool SHMQueueEmpty(const SHM_QUEUE *queue) @@ -184,7 +184,7 @@ SHMQueueEmpty(const SHM_QUEUE *queue) if (queue->prev == queue) { Assert(queue->next == queue); - return TRUE; + return true; } - return FALSE; + return false; } diff --git a/src/backend/storage/ipc/sinvaladt.c b/src/backend/storage/ipc/sinvaladt.c index 1b9d32b7cff..0d517a00e63 100644 --- a/src/backend/storage/ipc/sinvaladt.c +++ b/src/backend/storage/ipc/sinvaladt.c @@ -627,7 +627,7 @@ SIGetDataEntries(SharedInvalidationMessage *data, int datasize) * SICleanupQueue * Remove messages that have been consumed by all active backends * - * callerHasWriteLock is TRUE if caller is holding SInvalWriteLock. + * callerHasWriteLock is true if caller is holding SInvalWriteLock. * minFree is the minimum number of message slots to make free. * * Possible side effects of this routine include marking one or more diff --git a/src/backend/storage/lmgr/deadlock.c b/src/backend/storage/lmgr/deadlock.c index 5e49c789057..968e6c0e6dc 100644 --- a/src/backend/storage/lmgr/deadlock.c +++ b/src/backend/storage/lmgr/deadlock.c @@ -307,7 +307,7 @@ GetBlockingAutoVacuumPgproc(void) * by an outer level of recursion. Add to this each possible solution * constraint for any cycle detected at this level. * - * Returns TRUE if no solution exists. Returns FALSE if a deadlock-free + * Returns true if no solution exists. Returns false if a deadlock-free * state is attainable, in which case waitOrders[] shows the required * rearrangements of lock wait queues (if any). */ @@ -432,8 +432,8 @@ TestConfiguration(PGPROC *startProc) * FindLockCycle -- basic check for deadlock cycles * * Scan outward from the given proc to see if there is a cycle in the - * waits-for graph that includes this proc. Return TRUE if a cycle - * is found, else FALSE. If a cycle is found, we return a list of + * waits-for graph that includes this proc. Return true if a cycle + * is found, else false. If a cycle is found, we return a list of * the "soft edges", if any, included in the cycle. These edges could * potentially be eliminated by rearranging wait queues. We also fill * deadlockDetails[] with information about the detected cycle; this info @@ -792,8 +792,8 @@ FindLockCycleRecurseMember(PGPROC *checkProc, * of nWaitOrders WAIT_ORDER structs in waitOrders[], with PGPROC array * workspace in waitOrderProcs[]. * - * Returns TRUE if able to build an ordering that satisfies all the - * constraints, FALSE if not (there are contradictory constraints). + * Returns true if able to build an ordering that satisfies all the + * constraints, false if not (there are contradictory constraints). */ static bool ExpandConstraints(EDGE *constraints, @@ -864,8 +864,8 @@ ExpandConstraints(EDGE *constraints, * the "blocker" in the output array. The EDGE array may well contain * edges associated with other locks; these should be ignored. * - * Returns TRUE if able to build an ordering that satisfies all the - * constraints, FALSE if not (there are contradictory constraints). + * Returns true if able to build an ordering that satisfies all the + * constraints, false if not (there are contradictory constraints). */ static bool TopoSort(LOCK *lock, diff --git a/src/backend/storage/lmgr/lmgr.c b/src/backend/storage/lmgr/lmgr.c index fe9889894bb..da5679b7a36 100644 --- a/src/backend/storage/lmgr/lmgr.c +++ b/src/backend/storage/lmgr/lmgr.c @@ -129,7 +129,7 @@ LockRelationOid(Oid relid, LOCKMODE lockmode) * ConditionalLockRelationOid * * As above, but only lock if we can get the lock without blocking. - * Returns TRUE iff the lock was acquired. + * Returns true iff the lock was acquired. * * NOTE: we do not currently need conditional versions of all the * LockXXX routines in this file, but they could easily be added if needed. @@ -344,7 +344,7 @@ LockRelationForExtension(Relation relation, LOCKMODE lockmode) * ConditionalLockRelationForExtension * * As above, but only lock if we can get the lock without blocking. - * Returns TRUE iff the lock was acquired. + * Returns true iff the lock was acquired. */ bool ConditionalLockRelationForExtension(Relation relation, LOCKMODE lockmode) @@ -413,7 +413,7 @@ LockPage(Relation relation, BlockNumber blkno, LOCKMODE lockmode) * ConditionalLockPage * * As above, but only lock if we can get the lock without blocking. - * Returns TRUE iff the lock was acquired. + * Returns true iff the lock was acquired. */ bool ConditionalLockPage(Relation relation, BlockNumber blkno, LOCKMODE lockmode) @@ -469,7 +469,7 @@ LockTuple(Relation relation, ItemPointer tid, LOCKMODE lockmode) * ConditionalLockTuple * * As above, but only lock if we can get the lock without blocking. - * Returns TRUE iff the lock was acquired. + * Returns true iff the lock was acquired. */ bool ConditionalLockTuple(Relation relation, ItemPointer tid, LOCKMODE lockmode) @@ -601,7 +601,7 @@ XactLockTableWait(TransactionId xid, Relation rel, ItemPointer ctid, * ConditionalXactLockTableWait * * As above, but only lock if we can get the lock without blocking. - * Returns TRUE if the lock was acquired. + * Returns true if the lock was acquired. */ bool ConditionalXactLockTableWait(TransactionId xid) diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index 2b261739241..5833086c627 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -768,7 +768,7 @@ LockAcquireExtended(const LOCKTAG *locktag, locallock->nLocks = 0; locallock->numLockOwners = 0; locallock->maxLockOwners = 8; - locallock->holdsStrongLockCount = FALSE; + locallock->holdsStrongLockCount = false; locallock->lockOwners = NULL; /* in case next line fails */ locallock->lockOwners = (LOCALLOCKOWNER *) MemoryContextAlloc(TopMemoryContext, @@ -1264,7 +1264,7 @@ RemoveLocalLock(LOCALLOCK *locallock) SpinLockAcquire(&FastPathStrongRelationLocks->mutex); Assert(FastPathStrongRelationLocks->count[fasthashcode] > 0); FastPathStrongRelationLocks->count[fasthashcode]--; - locallock->holdsStrongLockCount = FALSE; + locallock->holdsStrongLockCount = false; SpinLockRelease(&FastPathStrongRelationLocks->mutex); } @@ -1578,7 +1578,7 @@ static void BeginStrongLockAcquire(LOCALLOCK *locallock, uint32 fasthashcode) { Assert(StrongLockInProgress == NULL); - Assert(locallock->holdsStrongLockCount == FALSE); + Assert(locallock->holdsStrongLockCount == false); /* * Adding to a memory location is not atomic, so we take a spinlock to @@ -1591,7 +1591,7 @@ BeginStrongLockAcquire(LOCALLOCK *locallock, uint32 fasthashcode) SpinLockAcquire(&FastPathStrongRelationLocks->mutex); FastPathStrongRelationLocks->count[fasthashcode]++; - locallock->holdsStrongLockCount = TRUE; + locallock->holdsStrongLockCount = true; StrongLockInProgress = locallock; SpinLockRelease(&FastPathStrongRelationLocks->mutex); } @@ -1620,11 +1620,11 @@ AbortStrongLockAcquire(void) return; fasthashcode = FastPathStrongLockHashPartition(locallock->hashcode); - Assert(locallock->holdsStrongLockCount == TRUE); + Assert(locallock->holdsStrongLockCount == true); SpinLockAcquire(&FastPathStrongRelationLocks->mutex); Assert(FastPathStrongRelationLocks->count[fasthashcode] > 0); FastPathStrongRelationLocks->count[fasthashcode]--; - locallock->holdsStrongLockCount = FALSE; + locallock->holdsStrongLockCount = false; StrongLockInProgress = NULL; SpinLockRelease(&FastPathStrongRelationLocks->mutex); } @@ -1857,7 +1857,7 @@ LockRelease(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock) { elog(WARNING, "you don't own a lock of type %s", lockMethodTable->lockModeNames[lockmode]); - return FALSE; + return false; } /* @@ -1896,7 +1896,7 @@ LockRelease(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock) /* don't release a lock belonging to another owner */ elog(WARNING, "you don't own a lock of type %s", lockMethodTable->lockModeNames[lockmode]); - return FALSE; + return false; } } @@ -1907,7 +1907,7 @@ LockRelease(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock) locallock->nLocks--; if (locallock->nLocks > 0) - return TRUE; + return true; /* Attempt fast release of any lock eligible for the fast path. */ if (EligibleForRelationFastPath(locktag, lockmode) && @@ -1926,7 +1926,7 @@ LockRelease(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock) if (released) { RemoveLocalLock(locallock); - return TRUE; + return true; } } @@ -1984,7 +1984,7 @@ LockRelease(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock) elog(WARNING, "you don't own a lock of type %s", lockMethodTable->lockModeNames[lockmode]); RemoveLocalLock(locallock); - return FALSE; + return false; } /* @@ -1999,7 +1999,7 @@ LockRelease(const LOCKTAG *locktag, LOCKMODE lockmode, bool sessionLock) LWLockRelease(partitionLock); RemoveLocalLock(locallock); - return TRUE; + return true; } /* @@ -3137,7 +3137,7 @@ AtPrepare_Locks(void) * entry. We must retain the count until the prepared transaction is * committed or rolled back. */ - locallock->holdsStrongLockCount = FALSE; + locallock->holdsStrongLockCount = false; /* * Create a 2PC record. diff --git a/src/backend/storage/lmgr/lwlock.c b/src/backend/storage/lmgr/lwlock.c index f1060f96757..6b53b70d333 100644 --- a/src/backend/storage/lmgr/lwlock.c +++ b/src/backend/storage/lmgr/lwlock.c @@ -1281,7 +1281,7 @@ LWLockAcquire(LWLock *lock, LWLockMode mode) /* * LWLockConditionalAcquire - acquire a lightweight lock in the specified mode * - * If the lock is not available, return FALSE with no side-effects. + * If the lock is not available, return false with no side-effects. * * If successful, cancel/die interrupts are held off until lock release. */ diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 2c7260e564b..05c5c194ec6 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -2122,7 +2122,7 @@ check_log_statement(List *stmt_list) * If logging is needed, the duration in msec is formatted into msec_str[], * which must be a 32-byte buffer. * - * was_logged should be TRUE if caller already logged query details (this + * was_logged should be true if caller already logged query details (this * essentially prevents 2 from being returned). */ int diff --git a/src/backend/tcop/pquery.c b/src/backend/tcop/pquery.c index cc462efc370..2f98135a59c 100644 --- a/src/backend/tcop/pquery.c +++ b/src/backend/tcop/pquery.c @@ -682,7 +682,7 @@ PortalSetResultFormat(Portal portal, int nFormats, int16 *formats) * in which to store a command completion status string. * May be NULL if caller doesn't want a status string. * - * Returns TRUE if the portal's execution is complete, FALSE if it was + * Returns true if the portal's execution is complete, false if it was * suspended due to exhaustion of the count parameter. */ bool diff --git a/src/backend/tsearch/spell.c b/src/backend/tsearch/spell.c index 6527c737314..e82a69d337d 100644 --- a/src/backend/tsearch/spell.c +++ b/src/backend/tsearch/spell.c @@ -776,7 +776,7 @@ NIAddAffix(IspellDict *Conf, const char *flag, char flagflags, const char *mask, * * The buffer at "next" must be of size BUFSIZ; we truncate the input to fit. * - * Returns TRUE if we found a field, FALSE if not. + * Returns true if we found a field, false if not. */ static bool get_nextfield(char **str, char *next) diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index b4c31ef65c2..ac21241f69a 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -706,7 +706,7 @@ ArrayCount(const char *str, int *dim, char typdelim) * Outputs: * values[]: filled with converted data values. * nulls[]: filled with is-null markers. - * *hasnulls: set TRUE iff there are any null elements. + * *hasnulls: set true iff there are any null elements. * *nbytes: set to total size of data area needed (including alignment * padding but not including array header overhead). * @@ -946,7 +946,7 @@ ReadArrayStr(char *arrayStr, * nulls: array of is-null flags (can be NULL if no nulls) * nitems: number of Datums to be copied * typbyval, typlen, typalign: info about element datatype - * freedata: if TRUE and element type is pass-by-ref, pfree data values + * freedata: if true and element type is pass-by-ref, pfree data values * referenced by Datums after copying them. * * If the input data is of varlena type, the caller must have ensured that @@ -1419,7 +1419,7 @@ array_recv(PG_FUNCTION_ARGS) * Outputs: * values[]: filled with converted data values. * nulls[]: filled with is-null markers. - * *hasnulls: set TRUE iff there are any null elements. + * *hasnulls: set true iff there are any null elements. * *nbytes: set to total size of data area needed (including alignment * padding but not including array header overhead). * diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index a3d7dc3697a..efa37644fc9 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -791,10 +791,10 @@ DecodeDateTime(char **field, int *ftype, int nf, int val; int dterr; int mer = HR24; - bool haveTextMonth = FALSE; - bool isjulian = FALSE; - bool is2digits = FALSE; - bool bc = FALSE; + bool haveTextMonth = false; + bool isjulian = false; + bool is2digits = false; + bool bc = false; pg_tz *namedTz = NULL; pg_tz *abbrevTz = NULL; pg_tz *valtz; @@ -840,7 +840,7 @@ DecodeDateTime(char **field, int *ftype, int nf, return DTERR_FIELD_OVERFLOW; j2date(val, &tm->tm_year, &tm->tm_mon, &tm->tm_mday); - isjulian = TRUE; + isjulian = true; /* Get the time zone from the end of the string */ dterr = DecodeTimezone(cp, tzp); @@ -1087,7 +1087,7 @@ DecodeDateTime(char **field, int *ftype, int nf, return DTERR_FIELD_OVERFLOW; tmask = DTK_DATE_M; j2date(val, &tm->tm_year, &tm->tm_mon, &tm->tm_mday); - isjulian = TRUE; + isjulian = true; /* fractional Julian Day? */ if (*cp == '.') @@ -1271,7 +1271,7 @@ DecodeDateTime(char **field, int *ftype, int nf, tm->tm_mday = tm->tm_mon; tmask = DTK_M(DAY); } - haveTextMonth = TRUE; + haveTextMonth = true; tm->tm_mon = val; break; @@ -1751,9 +1751,9 @@ DecodeTimeOnly(char **field, int *ftype, int nf, int i; int val; int dterr; - bool isjulian = FALSE; - bool is2digits = FALSE; - bool bc = FALSE; + bool isjulian = false; + bool is2digits = false; + bool bc = false; int mer = HR24; pg_tz *namedTz = NULL; pg_tz *abbrevTz = NULL; @@ -1991,7 +1991,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf, return DTERR_FIELD_OVERFLOW; tmask = DTK_DATE_M; j2date(val, &tm->tm_year, &tm->tm_mon, &tm->tm_mday); - isjulian = TRUE; + isjulian = true; if (*cp == '.') { @@ -2086,7 +2086,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf, else { dterr = DecodeNumber(flen, field[i], - FALSE, + false, (fmask | DTK_DATE_M), &tmask, tm, fsec, &is2digits); @@ -2362,7 +2362,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf, * str: field to be parsed * fmask: bitmask for field types already seen * *tmask: receives bitmask for fields found here - * *is2digits: set to TRUE if we find 2-digit year + * *is2digits: set to true if we find 2-digit year * *tm: field values are stored into appropriate members of this struct */ static int @@ -2374,7 +2374,7 @@ DecodeDate(char *str, int fmask, int *tmask, bool *is2digits, int i, len; int dterr; - bool haveTextMonth = FALSE; + bool haveTextMonth = false; int type, val, dmask = 0; @@ -2424,7 +2424,7 @@ DecodeDate(char *str, int fmask, int *tmask, bool *is2digits, { case MONTH: tm->tm_mon = val; - haveTextMonth = TRUE; + haveTextMonth = true; break; default: @@ -2755,7 +2755,7 @@ DecodeNumber(int flen, char *str, bool haveTextMonth, int fmask, *tmask = DTK_M(DAY); /* YEAR is already set */ tm->tm_mday = tm->tm_year; tm->tm_year = val; - *is2digits = FALSE; + *is2digits = false; } else { @@ -2859,7 +2859,7 @@ DecodeNumberField(int len, char *str, int fmask, *(str + (len - 4)) = '\0'; tm->tm_year = atoi(str); if ((len - 4) == 2) - *is2digits = TRUE; + *is2digits = true; return DTK_DATE; } @@ -3095,7 +3095,7 @@ int DecodeInterval(char **field, int *ftype, int nf, int range, int *dtype, struct pg_tm *tm, fsec_t *fsec) { - bool is_before = FALSE; + bool is_before = false; char *cp; int fmask = 0, tmask, @@ -3350,7 +3350,7 @@ DecodeInterval(char **field, int *ftype, int nf, int range, break; case AGO: - is_before = TRUE; + is_before = true; type = val; break; @@ -4193,7 +4193,7 @@ AddPostgresIntPart(char *cp, int value, const char *units, * tad bizarre but it's how it worked before... */ *is_before = (value < 0); - *is_zero = FALSE; + *is_zero = false; return cp + strlen(cp); } @@ -4213,7 +4213,7 @@ AddVerboseIntPart(char *cp, int value, const char *units, else if (*is_before) value = -value; sprintf(cp, " %d %s%s", value, units, (value == 1) ? "" : "s"); - *is_zero = FALSE; + *is_zero = false; return cp + strlen(cp); } @@ -4247,8 +4247,8 @@ EncodeInterval(struct pg_tm *tm, fsec_t fsec, int style, char *str) int hour = tm->tm_hour; int min = tm->tm_min; int sec = tm->tm_sec; - bool is_before = FALSE; - bool is_zero = TRUE; + bool is_before = false; + bool is_zero = true; /* * The sign of year and month are guaranteed to match, since they are @@ -4403,7 +4403,7 @@ EncodeInterval(struct pg_tm *tm, fsec_t fsec, int style, char *str) if (sec < 0 || (sec == 0 && fsec < 0)) { if (is_zero) - is_before = TRUE; + is_before = true; else if (!is_before) *cp++ = '-'; } @@ -4412,7 +4412,7 @@ EncodeInterval(struct pg_tm *tm, fsec_t fsec, int style, char *str) cp = AppendSeconds(cp, sec, fsec, MAX_INTERVAL_PRECISION, false); sprintf(cp, " sec%s", (abs(sec) != 1 || fsec != 0) ? "s" : ""); - is_zero = FALSE; + is_zero = false; } /* identically zero? then put in a unitless zero... */ if (is_zero) diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index 7877af2d6be..50254f23888 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -718,99 +718,99 @@ typedef enum */ static const KeyWord DCH_keywords[] = { /* name, len, id, is_digit, date_mode */ - {"A.D.", 4, DCH_A_D, FALSE, FROM_CHAR_DATE_NONE}, /* A */ - {"A.M.", 4, DCH_A_M, FALSE, FROM_CHAR_DATE_NONE}, - {"AD", 2, DCH_AD, FALSE, FROM_CHAR_DATE_NONE}, - {"AM", 2, DCH_AM, FALSE, FROM_CHAR_DATE_NONE}, - {"B.C.", 4, DCH_B_C, FALSE, FROM_CHAR_DATE_NONE}, /* B */ - {"BC", 2, DCH_BC, FALSE, FROM_CHAR_DATE_NONE}, - {"CC", 2, DCH_CC, TRUE, FROM_CHAR_DATE_NONE}, /* C */ - {"DAY", 3, DCH_DAY, FALSE, FROM_CHAR_DATE_NONE}, /* D */ - {"DDD", 3, DCH_DDD, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"DD", 2, DCH_DD, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"DY", 2, DCH_DY, FALSE, FROM_CHAR_DATE_NONE}, - {"Day", 3, DCH_Day, FALSE, FROM_CHAR_DATE_NONE}, - {"Dy", 2, DCH_Dy, FALSE, FROM_CHAR_DATE_NONE}, - {"D", 1, DCH_D, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"FX", 2, DCH_FX, FALSE, FROM_CHAR_DATE_NONE}, /* F */ - {"HH24", 4, DCH_HH24, TRUE, FROM_CHAR_DATE_NONE}, /* H */ - {"HH12", 4, DCH_HH12, TRUE, FROM_CHAR_DATE_NONE}, - {"HH", 2, DCH_HH, TRUE, FROM_CHAR_DATE_NONE}, - {"IDDD", 4, DCH_IDDD, TRUE, FROM_CHAR_DATE_ISOWEEK}, /* I */ - {"ID", 2, DCH_ID, TRUE, FROM_CHAR_DATE_ISOWEEK}, - {"IW", 2, DCH_IW, TRUE, FROM_CHAR_DATE_ISOWEEK}, - {"IYYY", 4, DCH_IYYY, TRUE, FROM_CHAR_DATE_ISOWEEK}, - {"IYY", 3, DCH_IYY, TRUE, FROM_CHAR_DATE_ISOWEEK}, - {"IY", 2, DCH_IY, TRUE, FROM_CHAR_DATE_ISOWEEK}, - {"I", 1, DCH_I, TRUE, FROM_CHAR_DATE_ISOWEEK}, - {"J", 1, DCH_J, TRUE, FROM_CHAR_DATE_NONE}, /* J */ - {"MI", 2, DCH_MI, TRUE, FROM_CHAR_DATE_NONE}, /* M */ - {"MM", 2, DCH_MM, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"MONTH", 5, DCH_MONTH, FALSE, FROM_CHAR_DATE_GREGORIAN}, - {"MON", 3, DCH_MON, FALSE, FROM_CHAR_DATE_GREGORIAN}, - {"MS", 2, DCH_MS, TRUE, FROM_CHAR_DATE_NONE}, - {"Month", 5, DCH_Month, FALSE, FROM_CHAR_DATE_GREGORIAN}, - {"Mon", 3, DCH_Mon, FALSE, FROM_CHAR_DATE_GREGORIAN}, - {"OF", 2, DCH_OF, FALSE, FROM_CHAR_DATE_NONE}, /* O */ - {"P.M.", 4, DCH_P_M, FALSE, FROM_CHAR_DATE_NONE}, /* P */ - {"PM", 2, DCH_PM, FALSE, FROM_CHAR_DATE_NONE}, - {"Q", 1, DCH_Q, TRUE, FROM_CHAR_DATE_NONE}, /* Q */ - {"RM", 2, DCH_RM, FALSE, FROM_CHAR_DATE_GREGORIAN}, /* R */ - {"SSSS", 4, DCH_SSSS, TRUE, FROM_CHAR_DATE_NONE}, /* S */ - {"SS", 2, DCH_SS, TRUE, FROM_CHAR_DATE_NONE}, - {"TZ", 2, DCH_TZ, FALSE, FROM_CHAR_DATE_NONE}, /* T */ - {"US", 2, DCH_US, TRUE, FROM_CHAR_DATE_NONE}, /* U */ - {"WW", 2, DCH_WW, TRUE, FROM_CHAR_DATE_GREGORIAN}, /* W */ - {"W", 1, DCH_W, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"Y,YYY", 5, DCH_Y_YYY, TRUE, FROM_CHAR_DATE_GREGORIAN}, /* Y */ - {"YYYY", 4, DCH_YYYY, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"YYY", 3, DCH_YYY, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"YY", 2, DCH_YY, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"Y", 1, DCH_Y, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"a.d.", 4, DCH_a_d, FALSE, FROM_CHAR_DATE_NONE}, /* a */ - {"a.m.", 4, DCH_a_m, FALSE, FROM_CHAR_DATE_NONE}, - {"ad", 2, DCH_ad, FALSE, FROM_CHAR_DATE_NONE}, - {"am", 2, DCH_am, FALSE, FROM_CHAR_DATE_NONE}, - {"b.c.", 4, DCH_b_c, FALSE, FROM_CHAR_DATE_NONE}, /* b */ - {"bc", 2, DCH_bc, FALSE, FROM_CHAR_DATE_NONE}, - {"cc", 2, DCH_CC, TRUE, FROM_CHAR_DATE_NONE}, /* c */ - {"day", 3, DCH_day, FALSE, FROM_CHAR_DATE_NONE}, /* d */ - {"ddd", 3, DCH_DDD, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"dd", 2, DCH_DD, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"dy", 2, DCH_dy, FALSE, FROM_CHAR_DATE_NONE}, - {"d", 1, DCH_D, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"fx", 2, DCH_FX, FALSE, FROM_CHAR_DATE_NONE}, /* f */ - {"hh24", 4, DCH_HH24, TRUE, FROM_CHAR_DATE_NONE}, /* h */ - {"hh12", 4, DCH_HH12, TRUE, FROM_CHAR_DATE_NONE}, - {"hh", 2, DCH_HH, TRUE, FROM_CHAR_DATE_NONE}, - {"iddd", 4, DCH_IDDD, TRUE, FROM_CHAR_DATE_ISOWEEK}, /* i */ - {"id", 2, DCH_ID, TRUE, FROM_CHAR_DATE_ISOWEEK}, - {"iw", 2, DCH_IW, TRUE, FROM_CHAR_DATE_ISOWEEK}, - {"iyyy", 4, DCH_IYYY, TRUE, FROM_CHAR_DATE_ISOWEEK}, - {"iyy", 3, DCH_IYY, TRUE, FROM_CHAR_DATE_ISOWEEK}, - {"iy", 2, DCH_IY, TRUE, FROM_CHAR_DATE_ISOWEEK}, - {"i", 1, DCH_I, TRUE, FROM_CHAR_DATE_ISOWEEK}, - {"j", 1, DCH_J, TRUE, FROM_CHAR_DATE_NONE}, /* j */ - {"mi", 2, DCH_MI, TRUE, FROM_CHAR_DATE_NONE}, /* m */ - {"mm", 2, DCH_MM, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"month", 5, DCH_month, FALSE, FROM_CHAR_DATE_GREGORIAN}, - {"mon", 3, DCH_mon, FALSE, FROM_CHAR_DATE_GREGORIAN}, - {"ms", 2, DCH_MS, TRUE, FROM_CHAR_DATE_NONE}, - {"p.m.", 4, DCH_p_m, FALSE, FROM_CHAR_DATE_NONE}, /* p */ - {"pm", 2, DCH_pm, FALSE, FROM_CHAR_DATE_NONE}, - {"q", 1, DCH_Q, TRUE, FROM_CHAR_DATE_NONE}, /* q */ - {"rm", 2, DCH_rm, FALSE, FROM_CHAR_DATE_GREGORIAN}, /* r */ - {"ssss", 4, DCH_SSSS, TRUE, FROM_CHAR_DATE_NONE}, /* s */ - {"ss", 2, DCH_SS, TRUE, FROM_CHAR_DATE_NONE}, - {"tz", 2, DCH_tz, FALSE, FROM_CHAR_DATE_NONE}, /* t */ - {"us", 2, DCH_US, TRUE, FROM_CHAR_DATE_NONE}, /* u */ - {"ww", 2, DCH_WW, TRUE, FROM_CHAR_DATE_GREGORIAN}, /* w */ - {"w", 1, DCH_W, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"y,yyy", 5, DCH_Y_YYY, TRUE, FROM_CHAR_DATE_GREGORIAN}, /* y */ - {"yyyy", 4, DCH_YYYY, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"yyy", 3, DCH_YYY, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"yy", 2, DCH_YY, TRUE, FROM_CHAR_DATE_GREGORIAN}, - {"y", 1, DCH_Y, TRUE, FROM_CHAR_DATE_GREGORIAN}, + {"A.D.", 4, DCH_A_D, false, FROM_CHAR_DATE_NONE}, /* A */ + {"A.M.", 4, DCH_A_M, false, FROM_CHAR_DATE_NONE}, + {"AD", 2, DCH_AD, false, FROM_CHAR_DATE_NONE}, + {"AM", 2, DCH_AM, false, FROM_CHAR_DATE_NONE}, + {"B.C.", 4, DCH_B_C, false, FROM_CHAR_DATE_NONE}, /* B */ + {"BC", 2, DCH_BC, false, FROM_CHAR_DATE_NONE}, + {"CC", 2, DCH_CC, true, FROM_CHAR_DATE_NONE}, /* C */ + {"DAY", 3, DCH_DAY, false, FROM_CHAR_DATE_NONE}, /* D */ + {"DDD", 3, DCH_DDD, true, FROM_CHAR_DATE_GREGORIAN}, + {"DD", 2, DCH_DD, true, FROM_CHAR_DATE_GREGORIAN}, + {"DY", 2, DCH_DY, false, FROM_CHAR_DATE_NONE}, + {"Day", 3, DCH_Day, false, FROM_CHAR_DATE_NONE}, + {"Dy", 2, DCH_Dy, false, FROM_CHAR_DATE_NONE}, + {"D", 1, DCH_D, true, FROM_CHAR_DATE_GREGORIAN}, + {"FX", 2, DCH_FX, false, FROM_CHAR_DATE_NONE}, /* F */ + {"HH24", 4, DCH_HH24, true, FROM_CHAR_DATE_NONE}, /* H */ + {"HH12", 4, DCH_HH12, true, FROM_CHAR_DATE_NONE}, + {"HH", 2, DCH_HH, true, FROM_CHAR_DATE_NONE}, + {"IDDD", 4, DCH_IDDD, true, FROM_CHAR_DATE_ISOWEEK}, /* I */ + {"ID", 2, DCH_ID, true, FROM_CHAR_DATE_ISOWEEK}, + {"IW", 2, DCH_IW, true, FROM_CHAR_DATE_ISOWEEK}, + {"IYYY", 4, DCH_IYYY, true, FROM_CHAR_DATE_ISOWEEK}, + {"IYY", 3, DCH_IYY, true, FROM_CHAR_DATE_ISOWEEK}, + {"IY", 2, DCH_IY, true, FROM_CHAR_DATE_ISOWEEK}, + {"I", 1, DCH_I, true, FROM_CHAR_DATE_ISOWEEK}, + {"J", 1, DCH_J, true, FROM_CHAR_DATE_NONE}, /* J */ + {"MI", 2, DCH_MI, true, FROM_CHAR_DATE_NONE}, /* M */ + {"MM", 2, DCH_MM, true, FROM_CHAR_DATE_GREGORIAN}, + {"MONTH", 5, DCH_MONTH, false, FROM_CHAR_DATE_GREGORIAN}, + {"MON", 3, DCH_MON, false, FROM_CHAR_DATE_GREGORIAN}, + {"MS", 2, DCH_MS, true, FROM_CHAR_DATE_NONE}, + {"Month", 5, DCH_Month, false, FROM_CHAR_DATE_GREGORIAN}, + {"Mon", 3, DCH_Mon, false, FROM_CHAR_DATE_GREGORIAN}, + {"OF", 2, DCH_OF, false, FROM_CHAR_DATE_NONE}, /* O */ + {"P.M.", 4, DCH_P_M, false, FROM_CHAR_DATE_NONE}, /* P */ + {"PM", 2, DCH_PM, false, FROM_CHAR_DATE_NONE}, + {"Q", 1, DCH_Q, true, FROM_CHAR_DATE_NONE}, /* Q */ + {"RM", 2, DCH_RM, false, FROM_CHAR_DATE_GREGORIAN}, /* R */ + {"SSSS", 4, DCH_SSSS, true, FROM_CHAR_DATE_NONE}, /* S */ + {"SS", 2, DCH_SS, true, FROM_CHAR_DATE_NONE}, + {"TZ", 2, DCH_TZ, false, FROM_CHAR_DATE_NONE}, /* T */ + {"US", 2, DCH_US, true, FROM_CHAR_DATE_NONE}, /* U */ + {"WW", 2, DCH_WW, true, FROM_CHAR_DATE_GREGORIAN}, /* W */ + {"W", 1, DCH_W, true, FROM_CHAR_DATE_GREGORIAN}, + {"Y,YYY", 5, DCH_Y_YYY, true, FROM_CHAR_DATE_GREGORIAN}, /* Y */ + {"YYYY", 4, DCH_YYYY, true, FROM_CHAR_DATE_GREGORIAN}, + {"YYY", 3, DCH_YYY, true, FROM_CHAR_DATE_GREGORIAN}, + {"YY", 2, DCH_YY, true, FROM_CHAR_DATE_GREGORIAN}, + {"Y", 1, DCH_Y, true, FROM_CHAR_DATE_GREGORIAN}, + {"a.d.", 4, DCH_a_d, false, FROM_CHAR_DATE_NONE}, /* a */ + {"a.m.", 4, DCH_a_m, false, FROM_CHAR_DATE_NONE}, + {"ad", 2, DCH_ad, false, FROM_CHAR_DATE_NONE}, + {"am", 2, DCH_am, false, FROM_CHAR_DATE_NONE}, + {"b.c.", 4, DCH_b_c, false, FROM_CHAR_DATE_NONE}, /* b */ + {"bc", 2, DCH_bc, false, FROM_CHAR_DATE_NONE}, + {"cc", 2, DCH_CC, true, FROM_CHAR_DATE_NONE}, /* c */ + {"day", 3, DCH_day, false, FROM_CHAR_DATE_NONE}, /* d */ + {"ddd", 3, DCH_DDD, true, FROM_CHAR_DATE_GREGORIAN}, + {"dd", 2, DCH_DD, true, FROM_CHAR_DATE_GREGORIAN}, + {"dy", 2, DCH_dy, false, FROM_CHAR_DATE_NONE}, + {"d", 1, DCH_D, true, FROM_CHAR_DATE_GREGORIAN}, + {"fx", 2, DCH_FX, false, FROM_CHAR_DATE_NONE}, /* f */ + {"hh24", 4, DCH_HH24, true, FROM_CHAR_DATE_NONE}, /* h */ + {"hh12", 4, DCH_HH12, true, FROM_CHAR_DATE_NONE}, + {"hh", 2, DCH_HH, true, FROM_CHAR_DATE_NONE}, + {"iddd", 4, DCH_IDDD, true, FROM_CHAR_DATE_ISOWEEK}, /* i */ + {"id", 2, DCH_ID, true, FROM_CHAR_DATE_ISOWEEK}, + {"iw", 2, DCH_IW, true, FROM_CHAR_DATE_ISOWEEK}, + {"iyyy", 4, DCH_IYYY, true, FROM_CHAR_DATE_ISOWEEK}, + {"iyy", 3, DCH_IYY, true, FROM_CHAR_DATE_ISOWEEK}, + {"iy", 2, DCH_IY, true, FROM_CHAR_DATE_ISOWEEK}, + {"i", 1, DCH_I, true, FROM_CHAR_DATE_ISOWEEK}, + {"j", 1, DCH_J, true, FROM_CHAR_DATE_NONE}, /* j */ + {"mi", 2, DCH_MI, true, FROM_CHAR_DATE_NONE}, /* m */ + {"mm", 2, DCH_MM, true, FROM_CHAR_DATE_GREGORIAN}, + {"month", 5, DCH_month, false, FROM_CHAR_DATE_GREGORIAN}, + {"mon", 3, DCH_mon, false, FROM_CHAR_DATE_GREGORIAN}, + {"ms", 2, DCH_MS, true, FROM_CHAR_DATE_NONE}, + {"p.m.", 4, DCH_p_m, false, FROM_CHAR_DATE_NONE}, /* p */ + {"pm", 2, DCH_pm, false, FROM_CHAR_DATE_NONE}, + {"q", 1, DCH_Q, true, FROM_CHAR_DATE_NONE}, /* q */ + {"rm", 2, DCH_rm, false, FROM_CHAR_DATE_GREGORIAN}, /* r */ + {"ssss", 4, DCH_SSSS, true, FROM_CHAR_DATE_NONE}, /* s */ + {"ss", 2, DCH_SS, true, FROM_CHAR_DATE_NONE}, + {"tz", 2, DCH_tz, false, FROM_CHAR_DATE_NONE}, /* t */ + {"us", 2, DCH_US, true, FROM_CHAR_DATE_NONE}, /* u */ + {"ww", 2, DCH_WW, true, FROM_CHAR_DATE_GREGORIAN}, /* w */ + {"w", 1, DCH_W, true, FROM_CHAR_DATE_GREGORIAN}, + {"y,yyy", 5, DCH_Y_YYY, true, FROM_CHAR_DATE_GREGORIAN}, /* y */ + {"yyyy", 4, DCH_YYYY, true, FROM_CHAR_DATE_GREGORIAN}, + {"yyy", 3, DCH_YYY, true, FROM_CHAR_DATE_GREGORIAN}, + {"yy", 2, DCH_YY, true, FROM_CHAR_DATE_GREGORIAN}, + {"y", 1, DCH_Y, true, FROM_CHAR_DATE_GREGORIAN}, /* last */ {NULL, 0, 0, 0, 0} @@ -1102,7 +1102,7 @@ NUMDesc_prepare(NUMDesc *num, FormatNode *n) case NUM_D: num->flag |= NUM_F_LDECIMAL; - num->need_locale = TRUE; + num->need_locale = true; /* FALLTHROUGH */ case NUM_DEC: if (IS_DECIMAL(num)) @@ -1133,13 +1133,13 @@ NUMDesc_prepare(NUMDesc *num, FormatNode *n) { num->lsign = NUM_LSIGN_PRE; num->pre_lsign_num = num->pre; - num->need_locale = TRUE; + num->need_locale = true; num->flag |= NUM_F_LSIGN; } else if (num->lsign == NUM_LSIGN_NONE) { num->lsign = NUM_LSIGN_POST; - num->need_locale = TRUE; + num->need_locale = true; num->flag |= NUM_F_LSIGN; } break; @@ -1188,7 +1188,7 @@ NUMDesc_prepare(NUMDesc *num, FormatNode *n) case NUM_L: case NUM_G: - num->need_locale = TRUE; + num->need_locale = true; break; case NUM_V: @@ -2066,17 +2066,17 @@ dump_index(const KeyWord *k, const int *index) #endif /* DEBUG */ /* ---------- - * Return TRUE if next format picture is not digit value + * Return true if next format picture is not digit value * ---------- */ static bool is_next_separator(FormatNode *n) { if (n->type == NODE_TYPE_END) - return FALSE; + return false; if (n->type == NODE_TYPE_ACTION && S_THth(n->suffix)) - return TRUE; + return true; /* * Next node @@ -2085,19 +2085,19 @@ is_next_separator(FormatNode *n) /* end of format string is treated like a non-digit separator */ if (n->type == NODE_TYPE_END) - return TRUE; + return true; if (n->type == NODE_TYPE_ACTION) { if (n->key->is_digit) - return FALSE; + return false; - return TRUE; + return true; } else if (isdigit((unsigned char) n->character)) - return FALSE; + return false; - return TRUE; /* some non-digit input (separator) */ + return true; /* some non-digit input (separator) */ } @@ -3391,7 +3391,7 @@ datetime_to_char_body(TmToChar *tmtc, text *fmt, bool is_interval, Oid collid) * Allocate new memory if format picture is bigger than static cache * and do not use cache (call parser always) */ - incache = FALSE; + incache = false; format = (FormatNode *) palloc((fmt_len + 1) * sizeof(FormatNode)); @@ -3405,7 +3405,7 @@ datetime_to_char_body(TmToChar *tmtc, text *fmt, bool is_interval, Oid collid) */ DCHCacheEntry *ent = DCH_cache_fetch(fmt_str); - incache = TRUE; + incache = true; format = ent->format; } @@ -3636,7 +3636,7 @@ do_to_timestamp(text *date_txt, text *fmt, * Allocate new memory if format picture is bigger than static * cache and do not use cache (call parser always) */ - incache = FALSE; + incache = false; format = (FormatNode *) palloc((fmt_len + 1) * sizeof(FormatNode)); @@ -3650,7 +3650,7 @@ do_to_timestamp(text *date_txt, text *fmt, */ DCHCacheEntry *ent = DCH_cache_fetch(fmt_str); - incache = TRUE; + incache = true; format = ent->format; } @@ -4239,7 +4239,7 @@ get_last_relevant_decnum(char *num) static void NUM_numpart_from_char(NUMProc *Np, int id, int input_len) { - bool isread = FALSE; + bool isread = false; #ifdef DEBUG_TO_FROM_CHAR elog(DEBUG_elog_output, " --- scan start --- id=%s", @@ -4340,13 +4340,13 @@ NUM_numpart_from_char(NUMProc *Np, int id, int input_len) else Np->read_pre++; - isread = TRUE; + isread = true; #ifdef DEBUG_TO_FROM_CHAR elog(DEBUG_elog_output, "Read digit (%c)", *Np->inout_p); #endif } - else if (IS_DECIMAL(Np->Num) && Np->read_dec == FALSE) + else if (IS_DECIMAL(Np->Num) && Np->read_dec == false) { /* * We need not test IS_LDECIMAL(Np->Num) explicitly here, because @@ -4364,8 +4364,8 @@ NUM_numpart_from_char(NUMProc *Np, int id, int input_len) Np->inout_p += x - 1; *Np->number_p = '.'; Np->number_p++; - Np->read_dec = TRUE; - isread = TRUE; + Np->read_dec = true; + isread = true; } } @@ -4423,11 +4423,11 @@ NUM_numpart_from_char(NUMProc *Np, int id, int input_len) * * FM9.999999MI -> 5.01- * - * if (.... && IS_LSIGN(Np->Num)==FALSE) prevents read wrong formats + * if (.... && IS_LSIGN(Np->Num)==false) prevents read wrong formats * like to_number('1 -', '9S') where sign is not anchored to last * number. */ - else if (isread == FALSE && IS_LSIGN(Np->Num) == FALSE && + else if (isread == false && IS_LSIGN(Np->Num) == false && (IS_PLUS(Np->Num) || IS_MINUS(Np->Num))) { #ifdef DEBUG_TO_FROM_CHAR @@ -4445,7 +4445,7 @@ NUM_numpart_from_char(NUMProc *Np, int id, int input_len) } #define IS_PREDEC_SPACE(_n) \ - (IS_ZERO((_n)->Num)==FALSE && \ + (IS_ZERO((_n)->Num)==false && \ (_n)->number == (_n)->number_p && \ *(_n)->number == '0' && \ (_n)->Num->post != 0) @@ -4477,15 +4477,15 @@ NUM_numpart_to_char(NUMProc *Np, int id) Np->number_p, Np->inout); #endif - Np->num_in = FALSE; + Np->num_in = false; /* * Write sign if real number will write to output Note: IS_PREDEC_SPACE() * handle "9.9" --> " .1" */ - if (Np->sign_wrote == FALSE && + if (Np->sign_wrote == false && (Np->num_curr >= Np->out_pre_spaces || (IS_ZERO(Np->Num) && Np->Num->zero_start == Np->num_curr)) && - (IS_PREDEC_SPACE(Np) == FALSE || (Np->last_relevant && *Np->last_relevant == '.'))) + (IS_PREDEC_SPACE(Np) == false || (Np->last_relevant && *Np->last_relevant == '.'))) { if (IS_LSIGN(Np->Num)) { @@ -4496,14 +4496,14 @@ NUM_numpart_to_char(NUMProc *Np, int id) else strcpy(Np->inout_p, Np->L_positive_sign); Np->inout_p += strlen(Np->inout_p); - Np->sign_wrote = TRUE; + Np->sign_wrote = true; } } else if (IS_BRACKET(Np->Num)) { *Np->inout_p = Np->sign == '+' ? ' ' : '<'; ++Np->inout_p; - Np->sign_wrote = TRUE; + Np->sign_wrote = true; } else if (Np->sign == '+') { @@ -4512,13 +4512,13 @@ NUM_numpart_to_char(NUMProc *Np, int id) *Np->inout_p = ' '; /* Write + */ ++Np->inout_p; } - Np->sign_wrote = TRUE; + Np->sign_wrote = true; } else if (Np->sign == '-') { /* Write - */ *Np->inout_p = '-'; ++Np->inout_p; - Np->sign_wrote = TRUE; + Np->sign_wrote = true; } } @@ -4549,7 +4549,7 @@ NUM_numpart_to_char(NUMProc *Np, int id) */ *Np->inout_p = '0'; /* Write '0' */ ++Np->inout_p; - Np->num_in = TRUE; + Np->num_in = true; } else { @@ -4607,7 +4607,7 @@ NUM_numpart_to_char(NUMProc *Np, int id) { *Np->inout_p = *Np->number_p; /* Write DIGIT */ ++Np->inout_p; - Np->num_in = TRUE; + Np->num_in = true; } } /* do no exceed string length */ @@ -4622,7 +4622,7 @@ NUM_numpart_to_char(NUMProc *Np, int id) if (Np->num_curr + 1 == end) { - if (Np->sign_wrote == TRUE && IS_BRACKET(Np->Num)) + if (Np->sign_wrote == true && IS_BRACKET(Np->Num)) { *Np->inout_p = Np->sign == '+' ? ' ' : '>'; ++Np->inout_p; @@ -4659,7 +4659,7 @@ NUM_processor(FormatNode *node, NUMDesc *Num, char *inout, Np->last_relevant = NULL; Np->read_post = 0; Np->read_pre = 0; - Np->read_dec = FALSE; + Np->read_dec = false; if (Np->Num->zero_start) --Np->Num->zero_start; @@ -4706,10 +4706,10 @@ NUM_processor(FormatNode *node, NUMDesc *Num, char *inout, /* MI/PL/SG - write sign itself and not in number */ if (IS_PLUS(Np->Num) || IS_MINUS(Np->Num)) { - if (IS_PLUS(Np->Num) && IS_MINUS(Np->Num) == FALSE) - Np->sign_wrote = FALSE; /* need sign */ + if (IS_PLUS(Np->Num) && IS_MINUS(Np->Num) == false) + Np->sign_wrote = false; /* need sign */ else - Np->sign_wrote = TRUE; /* needn't sign */ + Np->sign_wrote = true; /* needn't sign */ } else { @@ -4723,17 +4723,17 @@ NUM_processor(FormatNode *node, NUMDesc *Num, char *inout, else if (Np->sign != '+' && IS_PLUS(Np->Num)) Np->Num->flag &= ~NUM_F_PLUS; - if (Np->sign == '+' && IS_FILLMODE(Np->Num) && IS_LSIGN(Np->Num) == FALSE) - Np->sign_wrote = TRUE; /* needn't sign */ + if (Np->sign == '+' && IS_FILLMODE(Np->Num) && IS_LSIGN(Np->Num) == false) + Np->sign_wrote = true; /* needn't sign */ else - Np->sign_wrote = FALSE; /* need sign */ + Np->sign_wrote = false; /* need sign */ if (Np->Num->lsign == NUM_LSIGN_PRE && Np->Num->pre == Np->Num->pre_lsign_num) Np->Num->lsign = NUM_LSIGN_POST; } } else - Np->sign = FALSE; + Np->sign = false; /* * Count @@ -4762,7 +4762,7 @@ NUM_processor(FormatNode *node, NUMDesc *Num, char *inout, } } - if (Np->sign_wrote == FALSE && Np->out_pre_spaces == 0) + if (Np->sign_wrote == false && Np->out_pre_spaces == 0) ++Np->num_count; } else diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index e13389a6cc7..9dbe5db2b2b 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -1530,7 +1530,7 @@ path_close(PG_FUNCTION_ARGS) { PATH *path = PG_GETARG_PATH_P_COPY(0); - path->closed = TRUE; + path->closed = true; PG_RETURN_PATH_P(path); } @@ -1540,7 +1540,7 @@ path_open(PG_FUNCTION_ARGS) { PATH *path = PG_GETARG_PATH_P_COPY(0); - path->closed = FALSE; + path->closed = false; PG_RETURN_PATH_P(path); } @@ -4499,7 +4499,7 @@ poly_path(PG_FUNCTION_ARGS) SET_VARSIZE(path, size); path->npts = poly->npts; - path->closed = TRUE; + path->closed = true; /* prevent instability in unused pad bytes */ path->dummy = 0; @@ -5401,7 +5401,7 @@ plist_same(int npts, Point *p1, Point *p2) printf("plist_same- ii = %d/%d after forward match\n", ii, npts); #endif if (ii == npts) - return TRUE; + return true; /* match not found forwards? then look backwards */ for (ii = 1, j = i - 1; ii < npts; ii++, j--) @@ -5421,11 +5421,11 @@ plist_same(int npts, Point *p1, Point *p2) printf("plist_same- ii = %d/%d after reverse match\n", ii, npts); #endif if (ii == npts) - return TRUE; + return true; } } - return FALSE; + return false; } diff --git a/src/backend/utils/adt/misc.c b/src/backend/utils/adt/misc.c index 62341b84d1c..1980ff5ac72 100644 --- a/src/backend/utils/adt/misc.c +++ b/src/backend/utils/adt/misc.c @@ -47,7 +47,7 @@ /* * Common subroutine for num_nulls() and num_nonnulls(). - * Returns TRUE if successful, FALSE if function should return NULL. + * Returns true if successful, false if function should return NULL. * If successful, total argument count and number of nulls are * returned into *nargs and *nulls. */ diff --git a/src/backend/utils/adt/network_gist.c b/src/backend/utils/adt/network_gist.c index 0e36b7685de..c4cafba5036 100644 --- a/src/backend/utils/adt/network_gist.c +++ b/src/backend/utils/adt/network_gist.c @@ -561,13 +561,13 @@ inet_gist_compress(PG_FUNCTION_ARGS) gistentryinit(*retval, PointerGetDatum(r), entry->rel, entry->page, - entry->offset, FALSE); + entry->offset, false); } else { gistentryinit(*retval, (Datum) 0, entry->rel, entry->page, - entry->offset, FALSE); + entry->offset, false); } } else @@ -602,7 +602,7 @@ inet_gist_fetch(PG_FUNCTION_ARGS) retval = palloc(sizeof(GISTENTRY)); gistentryinit(*retval, InetPGetDatum(dst), entry->rel, entry->page, - entry->offset, FALSE); + entry->offset, false); PG_RETURN_POINTER(retval); } diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index 2cd14f34012..82e6f4483bd 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -5527,7 +5527,7 @@ zero_var(NumericVar *var) static const char * set_var_from_str(const char *str, const char *cp, NumericVar *dest) { - bool have_dp = FALSE; + bool have_dp = false; int i; unsigned char *decdigits; int sign = NUMERIC_POS; @@ -5558,7 +5558,7 @@ set_var_from_str(const char *str, const char *cp, NumericVar *dest) if (*cp == '.') { - have_dp = TRUE; + have_dp = true; cp++; } @@ -5591,7 +5591,7 @@ set_var_from_str(const char *str, const char *cp, NumericVar *dest) (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), errmsg("invalid input syntax for type %s: \"%s\"", "numeric", str))); - have_dp = TRUE; + have_dp = true; cp++; } else @@ -6160,7 +6160,7 @@ apply_typmod(NumericVar *var, int32 typmod) /* * Convert numeric to int8, rounding if needed. * - * If overflow, return FALSE (no error is raised). Return TRUE if okay. + * If overflow, return false (no error is raised). Return true if okay. */ static bool numericvar_to_int64(const NumericVar *var, int64 *result) @@ -6279,7 +6279,7 @@ int64_to_numericvar(int64 val, NumericVar *var) /* * Convert numeric to int128, rounding if needed. * - * If overflow, return FALSE (no error is raised). Return TRUE if okay. + * If overflow, return false (no error is raised). Return true if okay. */ static bool numericvar_to_int128(const NumericVar *var, int128 *result) diff --git a/src/backend/utils/adt/regexp.c b/src/backend/utils/adt/regexp.c index 139bb583b1c..e858b5910f5 100644 --- a/src/backend/utils/adt/regexp.c +++ b/src/backend/utils/adt/regexp.c @@ -247,7 +247,7 @@ RE_compile_and_cache(text *text_re, int cflags, Oid collation) /* * RE_wchar_execute - execute a RE on pg_wchar data * - * Returns TRUE on match, FALSE on no match + * Returns true on match, false on no match * * re --- the compiled pattern as returned by RE_compile_and_cache * data --- the data to match against (need not be null-terminated) @@ -291,7 +291,7 @@ RE_wchar_execute(regex_t *re, pg_wchar *data, int data_len, /* * RE_execute - execute a RE * - * Returns TRUE on match, FALSE on no match + * Returns true on match, false on no match * * re --- the compiled pattern as returned by RE_compile_and_cache * dat --- the data to match against (need not be null-terminated) @@ -323,7 +323,7 @@ RE_execute(regex_t *re, char *dat, int dat_len, /* * RE_compile_and_execute - compile and execute a RE * - * Returns TRUE on match, FALSE on no match + * Returns true on match, false on no match * * text_re --- the pattern, expressed as a TEXT object * dat --- the data to match against (need not be null-terminated) @@ -1294,7 +1294,7 @@ build_regexp_split_result(regexp_matches_ctx *splitctx) * regexp_fixed_prefix - extract fixed prefix, if any, for a regexp * * The result is NULL if there is no fixed prefix, else a palloc'd string. - * If it is an exact match, not just a prefix, *exact is returned as TRUE. + * If it is an exact match, not just a prefix, *exact is returned as true. */ char * regexp_fixed_prefix(text *text_re, bool case_insensitive, Oid collation, diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c index 6fe81fab7e4..afd0c00b8ad 100644 --- a/src/backend/utils/adt/regproc.c +++ b/src/backend/utils/adt/regproc.c @@ -1728,7 +1728,7 @@ stringToQualifiedNameList(const char *string) * the argtypes array should be of size FUNC_MAX_ARGS). The function or * operator name is returned to *names as a List of Strings. * - * If allowNone is TRUE, accept "NONE" and return it as InvalidOid (this is + * If allowNone is true, accept "NONE" and return it as InvalidOid (this is * for unary operators). */ static void diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index ba0e3ad87d2..4badb5fd7cf 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -2075,8 +2075,8 @@ RI_FKey_setdefault_upd(PG_FUNCTION_ARGS) * * Check if we really need to fire the RI trigger for an update to a PK * relation. This is called by the AFTER trigger queue manager to see if - * it can skip queuing an instance of an RI trigger. Returns TRUE if the - * trigger must be fired, FALSE if we can prove the constraint will still + * it can skip queuing an instance of an RI trigger. Returns true if the + * trigger must be fired, false if we can prove the constraint will still * be satisfied. * ---------- */ @@ -2132,8 +2132,8 @@ RI_FKey_pk_upd_check_required(Trigger *trigger, Relation pk_rel, * * Check if we really need to fire the RI trigger for an update to an FK * relation. This is called by the AFTER trigger queue manager to see if - * it can skip queuing an instance of an RI trigger. Returns TRUE if the - * trigger must be fired, FALSE if we can prove the constraint will still + * it can skip queuing an instance of an RI trigger. Returns true if the + * trigger must be fired, false if we can prove the constraint will still * be satisfied. * ---------- */ diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c index cc6cec7877d..752cef09e66 100644 --- a/src/backend/utils/adt/ruleutils.c +++ b/src/backend/utils/adt/ruleutils.c @@ -112,7 +112,7 @@ typedef struct int prettyFlags; /* enabling of pretty-print functions */ int wrapColumn; /* max line length, or -1 for no limit */ int indentLevel; /* current indent level for prettyprint */ - bool varprefix; /* TRUE to print prefixes on Vars */ + bool varprefix; /* true to print prefixes on Vars */ ParseExprKind special_exprkind; /* set only for exprkinds needing special * handling */ } deparse_context; @@ -130,7 +130,7 @@ typedef struct * rtable_columns holds the column alias names to be used for each RTE. * * In some cases we need to make names of merged JOIN USING columns unique - * across the whole query, not only per-RTE. If so, unique_using is TRUE + * across the whole query, not only per-RTE. If so, unique_using is true * and using_names is a list of C strings representing names already assigned * to USING columns. * @@ -3012,9 +3012,9 @@ deparse_expression(Node *expr, List *dpcontext, * for interpreting Vars in the node tree. It can be NIL if no Vars are * expected. * - * forceprefix is TRUE to force all Vars to be prefixed with their table names. + * forceprefix is true to force all Vars to be prefixed with their table names. * - * showimplicit is TRUE to force all implicit casts to be shown explicitly. + * showimplicit is true to force all implicit casts to be shown explicitly. * * Tries to pretty up the output according to prettyFlags and startIndent. * @@ -3587,7 +3587,7 @@ set_using_names(deparse_namespace *dpns, Node *jtnode, List *parentUsing) * If there's a USING clause, select the USING column names and push * those names down to the children. We have two strategies: * - * If dpns->unique_using is TRUE, we force all USING names to be + * If dpns->unique_using is true, we force all USING names to be * unique across the whole query level. In principle we'd only need * the names of dangerous USING columns to be globally unique, but to * safely assign all USING names in a single pass, we have to enforce @@ -3600,7 +3600,7 @@ set_using_names(deparse_namespace *dpns, Node *jtnode, List *parentUsing) * this simplifies the logic and seems likely to lead to less aliasing * overall. * - * If dpns->unique_using is FALSE, we only need USING names to be + * If dpns->unique_using is false, we only need USING names to be * unique within their own join RTE. We still need to honor * pushed-down names, though. * @@ -5167,7 +5167,7 @@ get_simple_values_rte(Query *query) ListCell *lc; /* - * We want to return TRUE even if the Query also contains OLD or NEW rule + * We want to return true even if the Query also contains OLD or NEW rule * RTEs. So the idea is to scan the rtable and see if there is only one * inFromCl RTE that is a VALUES RTE. */ @@ -6416,7 +6416,7 @@ get_utility_query_def(Query *query, deparse_context *context) * the Var's varlevelsup has to be interpreted with respect to a context * above the current one; levelsup indicates the offset. * - * If istoplevel is TRUE, the Var is at the top level of a SELECT's + * If istoplevel is true, the Var is at the top level of a SELECT's * targetlist, which means we need special treatment of whole-row Vars. * Instead of the normal "tab.*", we'll print "tab.*::typename", which is a * dirty hack to prevent "tab.*" from being expanded into multiple columns. @@ -10612,7 +10612,7 @@ generate_qualified_relation_name(Oid relid) * means a FuncExpr or Aggref, not some other way of calling a function), then * has_variadic must specify whether variadic arguments have been merged, * and *use_variadic_p will be set to indicate whether to print VARIADIC in - * the output. For non-FuncExpr cases, has_variadic should be FALSE and + * the output. For non-FuncExpr cases, has_variadic should be false and * use_variadic_p can be NULL. * * The result includes all necessary quoting and schema-prefixing. diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 7361e9d43ca..4bbb4a850eb 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -790,7 +790,7 @@ ineq_histogram_selectivity(PlannerInfo *root, * hand! (For example, we might have a '<=' operator rather than the '<' * operator that will appear in staop.) For now, assume that whatever * appears in pg_statistic is sorted the same way our operator sorts, or - * the reverse way if isgt is TRUE. + * the reverse way if isgt is true. */ if (HeapTupleIsValid(vardata->statsTuple) && statistic_proc_security_check(vardata, opproc->fn_oid) && @@ -3814,7 +3814,7 @@ estimate_hash_bucket_stats(PlannerInfo *root, Node *hashkey, double nbuckets, * * Varinfos that aren't for simple Vars are ignored. * - * Return TRUE if we're able to find a match, FALSE otherwise. + * Return true if we're able to find a match, false otherwise. */ static bool estimate_multivariate_ndistinct(PlannerInfo *root, RelOptInfo *rel, @@ -4527,12 +4527,12 @@ convert_timevalue_to_scalar(Datum value, Oid typid) * args: clause argument list * varRelid: see specs for restriction selectivity functions * - * Outputs: (these are valid only if TRUE is returned) + * Outputs: (these are valid only if true is returned) * *vardata: gets information about variable (see examine_variable) * *other: gets other clause argument, aggressively reduced to a constant - * *varonleft: set TRUE if variable is on the left, FALSE if on the right + * *varonleft: set true if variable is on the left, false if on the right * - * Returns TRUE if a variable is identified, otherwise FALSE. + * Returns true if a variable is identified, otherwise false. * * Note: if there are Vars on both sides of the clause, we must fail, because * callers are expecting that the other side will act like a pseudoconstant. @@ -4648,12 +4648,12 @@ get_join_variables(PlannerInfo *root, List *args, SpecialJoinInfo *sjinfo, * atttype, atttypmod: actual type/typmod of the "var" expression. This is * commonly the same as the exposed type of the variable argument, * but can be different in binary-compatible-type cases. - * isunique: TRUE if we were able to match the var to a unique index or a + * isunique: true if we were able to match the var to a unique index or a * single-column DISTINCT clause, implying its values are unique for * this query. (Caution: this should be trusted for statistical * purposes only, since we do not check indimmediate nor verify that * the exact same definition of equality applies.) - * acl_ok: TRUE if current user has permission to read the column(s) + * acl_ok: true if current user has permission to read the column(s) * underlying the pg_statistic entry. This is consulted by * statistic_proc_security_check(). * @@ -5060,7 +5060,7 @@ statistic_proc_security_check(VariableStatData *vardata, Oid func_oid) * Estimate the number of distinct values of a variable. * * vardata: results of examine_variable - * *isdefault: set to TRUE if the result is a default rather than based on + * *isdefault: set to true if the result is a default rather than based on * anything meaningful. * * NB: be careful to produce a positive integral result, since callers may @@ -5193,8 +5193,8 @@ get_variable_numdistinct(VariableStatData *vardata, bool *isdefault) /* * get_variable_range * Estimate the minimum and maximum value of the specified variable. - * If successful, store values in *min and *max, and return TRUE. - * If no data available, return FALSE. + * If successful, store values in *min and *max, and return true. + * If no data available, return false. * * sortop is the "<" comparison operator to use. This should generally * be "<" not ">", as only the former is likely to be found in pg_statistic. @@ -5327,9 +5327,9 @@ get_variable_range(PlannerInfo *root, VariableStatData *vardata, Oid sortop, * Attempt to identify the current *actual* minimum and/or maximum * of the specified variable, by looking for a suitable btree index * and fetching its low and/or high values. - * If successful, store values in *min and *max, and return TRUE. + * If successful, store values in *min and *max, and return true. * (Either pointer can be NULL if that endpoint isn't needed.) - * If no data available, return FALSE. + * If no data available, return false. * * sortop is the "<" comparison operator to use. */ diff --git a/src/backend/utils/adt/tsginidx.c b/src/backend/utils/adt/tsginidx.c index 83a939dfd5c..aba456ed880 100644 --- a/src/backend/utils/adt/tsginidx.c +++ b/src/backend/utils/adt/tsginidx.c @@ -295,7 +295,7 @@ gin_tsquery_consistent(PG_FUNCTION_ARGS) /* int32 nkeys = PG_GETARG_INT32(3); */ Pointer *extra_data = (Pointer *) PG_GETARG_POINTER(4); bool *recheck = (bool *) PG_GETARG_POINTER(5); - bool res = FALSE; + bool res = false; /* Initially assume query doesn't require recheck */ *recheck = false; diff --git a/src/backend/utils/adt/tsgistidx.c b/src/backend/utils/adt/tsgistidx.c index 578af5d5126..3295f7252b9 100644 --- a/src/backend/utils/adt/tsgistidx.c +++ b/src/backend/utils/adt/tsgistidx.c @@ -240,7 +240,7 @@ gtsvector_compress(PG_FUNCTION_ARGS) retval = (GISTENTRY *) palloc(sizeof(GISTENTRY)); gistentryinit(*retval, PointerGetDatum(res), entry->rel, entry->page, - entry->offset, FALSE); + entry->offset, false); } else if (ISSIGNKEY(DatumGetPointer(entry->key)) && !ISALLTRUE(DatumGetPointer(entry->key))) @@ -264,7 +264,7 @@ gtsvector_compress(PG_FUNCTION_ARGS) retval = (GISTENTRY *) palloc(sizeof(GISTENTRY)); gistentryinit(*retval, PointerGetDatum(res), entry->rel, entry->page, - entry->offset, FALSE); + entry->offset, false); } PG_RETURN_POINTER(retval); } @@ -285,7 +285,7 @@ gtsvector_decompress(PG_FUNCTION_ARGS) gistentryinit(*retval, PointerGetDatum(key), entry->rel, entry->page, - entry->offset, FALSE); + entry->offset, false); PG_RETURN_POINTER(retval); } diff --git a/src/backend/utils/adt/tsquery_gist.c b/src/backend/utils/adt/tsquery_gist.c index 05bc0d6adb3..04134d14adb 100644 --- a/src/backend/utils/adt/tsquery_gist.c +++ b/src/backend/utils/adt/tsquery_gist.c @@ -37,7 +37,7 @@ gtsquery_compress(PG_FUNCTION_ARGS) gistentryinit(*retval, TSQuerySignGetDatum(sign), entry->rel, entry->page, - entry->offset, FALSE); + entry->offset, false); } PG_RETURN_POINTER(retval); @@ -79,7 +79,7 @@ gtsquery_consistent(PG_FUNCTION_ARGS) retval = (key & sq) != 0; break; default: - retval = FALSE; + retval = false; } PG_RETURN_BOOL(retval); } diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index 4b5483dbb97..4674ee2938a 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -3255,7 +3255,7 @@ textToQualifiedNameList(text *textval) * namelist: filled with a palloc'd list of pointers to identifiers within * rawstring. Caller should list_free() this even on error return. * - * Returns TRUE if okay, FALSE if there is a syntax error in the string. + * Returns true if okay, false if there is a syntax error in the string. * * Note that an empty string is considered okay here, though not in * textToQualifiedNameList. @@ -3383,7 +3383,7 @@ SplitIdentifierString(char *rawstring, char separator, * namelist: filled with a palloc'd list of directory names. * Caller should list_free_deep() this even on error return. * - * Returns TRUE if okay, FALSE if there is a syntax error in the string. + * Returns true if okay, false if there is a syntax error in the string. * * Note that an empty string is considered okay here. */ diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c index 24229c2dff7..c9d07f2ae9b 100644 --- a/src/backend/utils/adt/xml.c +++ b/src/backend/utils/adt/xml.c @@ -4376,7 +4376,7 @@ XmlTableSetColumnFilter(TableFuncScanState *state, char *path, int colnum) /* * XmlTableFetchRow * Prepare the next "current" tuple for upcoming GetValue calls. - * Returns FALSE if the row-filter expression returned no more rows. + * Returns false if the row-filter expression returned no more rows. */ static bool XmlTableFetchRow(TableFuncScanState *state) diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c index 48961e31aa9..0ea2f2bc54c 100644 --- a/src/backend/utils/cache/lsyscache.c +++ b/src/backend/utils/cache/lsyscache.c @@ -186,7 +186,7 @@ get_opfamily_member(Oid opfamily, Oid lefttype, Oid righttype, * determine its opfamily, its declared input datatype, and its * strategy number (BTLessStrategyNumber or BTGreaterStrategyNumber). * - * Returns TRUE if successful, FALSE if no matching pg_amop entry exists. + * Returns true if successful, false if no matching pg_amop entry exists. * (This indicates that the operator is not a valid ordering operator.) * * Note: the operator could be registered in multiple families, for example @@ -254,8 +254,8 @@ get_ordering_op_properties(Oid opno, * Get the OID of the datatype-specific btree equality operator * associated with an ordering operator (a "<" or ">" operator). * - * If "reverse" isn't NULL, also set *reverse to FALSE if the operator is "<", - * TRUE if it's ">" + * If "reverse" isn't NULL, also set *reverse to false if the operator is "<", + * true if it's ">" * * Returns InvalidOid if no matching equality operator can be found. * (This indicates that the operator is not a valid ordering operator.) @@ -682,7 +682,7 @@ get_op_btree_interpretation(Oid opno) /* * equality_ops_are_compatible - * Return TRUE if the two given equality operators have compatible + * Return true if the two given equality operators have compatible * semantics. * * This is trivially true if they are the same operator. Otherwise, @@ -2868,7 +2868,7 @@ get_attavgwidth(Oid relid, AttrNumber attnum) * get_attstatsslot * * Extract the contents of a "slot" of a pg_statistic tuple. - * Returns TRUE if requested slot type was found, else FALSE. + * Returns true if requested slot type was found, else false. * * Unlike other routines in this file, this takes a pointer to an * already-looked-up tuple in the pg_statistic cache. We do this since @@ -2884,7 +2884,7 @@ get_attavgwidth(Oid relid, AttrNumber attnum) * reqop: STAOP value wanted, or InvalidOid if don't care. * flags: bitmask of ATTSTATSSLOT_VALUES and/or ATTSTATSSLOT_NUMBERS. * - * If a matching slot is found, TRUE is returned, and *sslot is filled thus: + * If a matching slot is found, true is returned, and *sslot is filled thus: * staop: receives the actual STAOP value. * valuetype: receives actual datatype of the elements of stavalues. * values: receives pointer to an array of the slot's stavalues. @@ -2896,7 +2896,7 @@ get_attavgwidth(Oid relid, AttrNumber attnum) * wasn't specified. Likewise, numbers/nnumbers are NULL/0 if * ATTSTATSSLOT_NUMBERS wasn't specified. * - * If no matching slot is found, FALSE is returned, and *sslot is zeroed. + * If no matching slot is found, false is returned, and *sslot is zeroed. * * The data referred to by the fields of sslot is locally palloc'd and * is independent of the original pg_statistic tuple. When the caller diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c index ad8a82f1e3f..853c1f6e856 100644 --- a/src/backend/utils/cache/plancache.c +++ b/src/backend/utils/cache/plancache.c @@ -319,7 +319,7 @@ CreateOneShotCachedPlan(RawStmt *raw_parse_tree, * parserSetup: alternate method for handling query parameters * parserSetupArg: data to pass to parserSetup * cursor_options: options bitmask to pass to planner - * fixed_result: TRUE to disallow future changes in query's result tupdesc + * fixed_result: true to disallow future changes in query's result tupdesc */ void CompleteCachedPlan(CachedPlanSource *plansource, diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 5015719915b..a31b68a8d5e 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -227,7 +227,7 @@ do { \ typedef struct opclasscacheent { Oid opclassoid; /* lookup key: OID of opclass */ - bool valid; /* set TRUE after successful fill-in */ + bool valid; /* set true after successful fill-in */ StrategyNumber numSupport; /* max # of support procs (from pg_am) */ Oid opcfamily; /* OID of opclass's family */ Oid opcintype; /* OID of opclass's declared input type */ @@ -5358,9 +5358,9 @@ errtableconstraint(Relation rel, const char *conname) * load_relcache_init_file -- attempt to load cache from the shared * or local cache init file * - * If successful, return TRUE and set criticalRelcachesBuilt or + * If successful, return true and set criticalRelcachesBuilt or * criticalSharedRelcachesBuilt to true. - * If not successful, return FALSE. + * If not successful, return false. * * NOTE: we assume we are already switched into CacheMemoryContext. */ diff --git a/src/backend/utils/cache/relmapper.c b/src/backend/utils/cache/relmapper.c index 41c2ba7f976..e0c5dd404c3 100644 --- a/src/backend/utils/cache/relmapper.c +++ b/src/backend/utils/cache/relmapper.c @@ -693,13 +693,13 @@ load_relmap_file(bool shared) * The magic number and CRC are automatically updated in *newmap. On * success, we copy the data to the appropriate permanent static variable. * - * If write_wal is TRUE then an appropriate WAL message is emitted. + * If write_wal is true then an appropriate WAL message is emitted. * (It will be false for bootstrap and WAL replay cases.) * - * If send_sinval is TRUE then a SI invalidation message is sent. + * If send_sinval is true then a SI invalidation message is sent. * (This should be true except in bootstrap case.) * - * If preserve_files is TRUE then the storage manager is warned not to + * If preserve_files is true then the storage manager is warned not to * delete the files listed in the map. * * Because this may be called during WAL replay when MyDatabaseId, diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index 977c03834a5..f6bb05f135e 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -226,7 +226,7 @@ err_gettext(const char *str) * the stack entry. Finally, errfinish() will be called to actually process * the error report. * - * Returns TRUE in normal case. Returns FALSE to short-circuit the error + * Returns true in normal case. Returns false to short-circuit the error * report (if it's a warning or lower and not to be reported anywhere). */ bool @@ -285,7 +285,7 @@ errstart(int elevel, const char *filename, int lineno, /* * Now decide whether we need to process this report at all; if it's - * warning or less and not enabled for logging, just return FALSE without + * warning or less and not enabled for logging, just return false without * starting up any error logging machinery. */ diff --git a/src/backend/utils/fmgr/funcapi.c b/src/backend/utils/fmgr/funcapi.c index bfd5031b9d6..24a39505750 100644 --- a/src/backend/utils/fmgr/funcapi.c +++ b/src/backend/utils/fmgr/funcapi.c @@ -441,8 +441,8 @@ get_expr_result_tupdesc(Node *expr, bool noError) /* * Given the result tuple descriptor for a function with OUT parameters, * replace any polymorphic columns (ANYELEMENT etc) with correct data types - * deduced from the input arguments. Returns TRUE if able to deduce all types, - * FALSE if not. + * deduced from the input arguments. Returns true if able to deduce all types, + * false if not. */ static bool resolve_polymorphic_tupdesc(TupleDesc tupdesc, oidvector *declared_args, @@ -634,7 +634,7 @@ resolve_polymorphic_tupdesc(TupleDesc tupdesc, oidvector *declared_args, /* * Given the declared argument types and modes for a function, replace any * polymorphic types (ANYELEMENT etc) with correct data types deduced from the - * input arguments. Returns TRUE if able to deduce all types, FALSE if not. + * input arguments. Returns true if able to deduce all types, false if not. * This is the same logic as resolve_polymorphic_tupdesc, but with a different * argument representation. * diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c index 6f6b03c815e..71f5f0688a0 100644 --- a/src/backend/utils/hash/dynahash.c +++ b/src/backend/utils/hash/dynahash.c @@ -891,8 +891,8 @@ calc_bucket(HASHHDR *hctl, uint32 hash_val) * HASH_ENTER_NULL cannot be used with the default palloc-based allocator, * since palloc internally ereports on out-of-memory. * - * If foundPtr isn't NULL, then *foundPtr is set TRUE if we found an - * existing entry in the table, FALSE otherwise. This is needed in the + * If foundPtr isn't NULL, then *foundPtr is set true if we found an + * existing entry in the table, false otherwise. This is needed in the * HASH_ENTER case, but is redundant with the return value otherwise. * * For hash_search_with_hash_value, the hashvalue parameter must have been @@ -1096,12 +1096,12 @@ hash_search_with_hash_value(HTAB *hashp, * Therefore this cannot suffer an out-of-memory failure, even if there are * other processes operating in other partitions of the hashtable. * - * Returns TRUE if successful, FALSE if the requested new hash key is already + * Returns true if successful, false if the requested new hash key is already * present. Throws error if the specified entry pointer isn't actually a * table member. * * NB: currently, there is no special case for old and new hash keys being - * identical, which means we'll report FALSE for that situation. This is + * identical, which means we'll report false for that situation. This is * preferable for existing uses. * * NB: for a partitioned hashtable, caller must hold lock on both relevant diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c index afbf8f86919..544fed80969 100644 --- a/src/backend/utils/init/miscinit.c +++ b/src/backend/utils/init/miscinit.c @@ -1273,11 +1273,11 @@ AddToDataDirLockFile(int target_line, const char *str) /* * Recheck that the data directory lock file still exists with expected - * content. Return TRUE if the lock file appears OK, FALSE if it isn't. + * content. Return true if the lock file appears OK, false if it isn't. * * We call this periodically in the postmaster. The idea is that if the * lock file has been removed or replaced by another postmaster, we should - * do a panic database shutdown. Therefore, we should return TRUE if there + * do a panic database shutdown. Therefore, we should return true if there * is any doubt: we do not want to cause a panic shutdown unnecessarily. * Transient failures like EINTR or ENFILE should not cause us to fail. * (If there really is something wrong, we'll detect it on a future recheck.) diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index 65372d7cc55..a609619f4d6 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -3950,9 +3950,9 @@ static int num_guc_variables; static int size_guc_variables; -static bool guc_dirty; /* TRUE if need to do commit/abort work */ +static bool guc_dirty; /* true if need to do commit/abort work */ -static bool reporting_enabled; /* TRUE to enable GUC_REPORT */ +static bool reporting_enabled; /* true to enable GUC_REPORT */ static int GUCNestLevel = 0; /* 1 when in main transaction */ @@ -4374,7 +4374,7 @@ add_placeholder_variable(const char *name, int elevel) /* * Look up option NAME. If it exists, return a pointer to its record, - * else return NULL. If create_placeholders is TRUE, we'll create a + * else return NULL. If create_placeholders is true, we'll create a * placeholder record for a valid-looking custom variable name. */ static struct config_generic * @@ -5643,7 +5643,7 @@ config_enum_lookup_by_value(struct config_enum *record, int val) * Lookup the value for an enum option with the selected name * (case-insensitive). * If the enum option is found, sets the retval value and returns - * true. If it's not found, return FALSE and retval is set to 0. + * true. If it's not found, return false and retval is set to 0. */ bool config_enum_lookup_by_name(struct config_enum *record, const char *value, @@ -5656,12 +5656,12 @@ config_enum_lookup_by_name(struct config_enum *record, const char *value, if (pg_strcasecmp(value, entry->name) == 0) { *retval = entry->val; - return TRUE; + return true; } } *retval = 0; - return FALSE; + return false; } @@ -8370,7 +8370,7 @@ show_config_by_name(PG_FUNCTION_ARGS) /* * show_config_by_name_missing_ok - equiv to SHOW X command but implemented as * a function. If X does not exist, suppress the error and just return NULL - * if missing_ok is TRUE. + * if missing_ok is true. */ Datum show_config_by_name_missing_ok(PG_FUNCTION_ARGS) @@ -9692,7 +9692,7 @@ GUCArrayReset(ArrayType *array) * or NULL for the Delete/Reset cases. If skipIfNoPermissions is true, it's * not an error to have no permissions to set the option. * - * Returns TRUE if OK, FALSE if skipIfNoPermissions is true and user does not + * Returns true if OK, false if skipIfNoPermissions is true and user does not * have permission to change this option (all other error cases result in an * error being thrown). */ @@ -9718,7 +9718,7 @@ validate_option_array_item(const char *name, const char *value, * define_custom_variable assumes we checked that. * * name is not known and can't be created as a placeholder. Throw error, - * unless skipIfNoPermissions is true, in which case return FALSE. + * unless skipIfNoPermissions is true, in which case return false. */ gconf = find_option(name, true, WARNING); if (!gconf) diff --git a/src/backend/utils/misc/tzparser.c b/src/backend/utils/misc/tzparser.c index 04d6ee35036..3986141899e 100644 --- a/src/backend/utils/misc/tzparser.c +++ b/src/backend/utils/misc/tzparser.c @@ -45,7 +45,7 @@ static int ParseTzFile(const char *filename, int depth, /* * Apply additional validation checks to a tzEntry * - * Returns TRUE if OK, else false + * Returns true if OK, else false */ static bool validateTzEntry(tzEntry *tzentry) @@ -92,7 +92,7 @@ validateTzEntry(tzEntry *tzentry) * name zone * name offset dst * - * Returns TRUE if OK, else false; data is stored in *tzentry + * Returns true if OK, else false; data is stored in *tzentry */ static bool splitTzLine(const char *filename, int lineno, char *line, tzEntry *tzentry) @@ -180,7 +180,7 @@ splitTzLine(const char *filename, int lineno, char *line, tzEntry *tzentry) * *arraysize: allocated length of array (changeable if must enlarge array) * n: current number of valid elements in array * entry: new data to insert - * override: TRUE if OK to override + * override: true if OK to override * * Returns the new array length (new value for n), or -1 if error */ diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c index 89db08464fe..d03b7794078 100644 --- a/src/backend/utils/mmgr/portalmem.c +++ b/src/backend/utils/mmgr/portalmem.c @@ -623,8 +623,8 @@ PortalHashTableDeleteAll(void) * simply removed. Portals remaining from prior transactions should be * left untouched. * - * Returns TRUE if any portals changed state (possibly causing user-defined - * code to be run), FALSE if not. + * Returns true if any portals changed state (possibly causing user-defined + * code to be run), false if not. */ bool PreCommit_Portals(bool isPrepare) diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c index 60522cb4424..34af8d6334b 100644 --- a/src/backend/utils/sort/tuplesort.c +++ b/src/backend/utils/sort/tuplesort.c @@ -1166,7 +1166,7 @@ tuplesort_end(Tuplesortstate *state) /* * Grow the memtuples[] array, if possible within our memory constraint. We * must not exceed INT_MAX tuples in memory or the caller-provided memory - * limit. Return TRUE if we were able to enlarge the array, FALSE if not. + * limit. Return true if we were able to enlarge the array, false if not. * * Normally, at each increment we double the size of the array. When doing * that would exceed a limit, we attempt one last, smaller increase (and then @@ -1733,7 +1733,7 @@ tuplesort_performsort(Tuplesortstate *state) /* * Internal routine to fetch the next tuple in either forward or back - * direction into *stup. Returns FALSE if no more tuples. + * direction into *stup. Returns false if no more tuples. * Returned tuple belongs to tuplesort memory context, and must not be freed * by caller. Note that fetched tuple is stored in memory that may be * recycled by any future fetch. @@ -1975,10 +1975,10 @@ tuplesort_gettuple_common(Tuplesortstate *state, bool forward, /* * Fetch the next tuple in either forward or back direction. - * If successful, put tuple in slot and return TRUE; else, clear the slot - * and return FALSE. + * If successful, put tuple in slot and return true; else, clear the slot + * and return false. * - * Caller may optionally be passed back abbreviated value (on TRUE return + * Caller may optionally be passed back abbreviated value (on true return * value) when abbreviation was used, which can be used to cheaply avoid * equality checks that might otherwise be required. Caller can safely make a * determination of "non-equal tuple" based on simple binary inequality. A @@ -2065,13 +2065,13 @@ tuplesort_getindextuple(Tuplesortstate *state, bool forward) /* * Fetch the next Datum in either forward or back direction. - * Returns FALSE if no more datums. + * Returns false if no more datums. * * If the Datum is pass-by-ref type, the returned value is freshly palloc'd * and is now owned by the caller (this differs from similar routines for * other types of tuplesorts). * - * Caller may optionally be passed back abbreviated value (on TRUE return + * Caller may optionally be passed back abbreviated value (on true return * value) when abbreviation was used, which can be used to cheaply avoid * equality checks that might otherwise be required. Caller can safely make a * determination of "non-equal tuple" based on simple binary inequality. A @@ -2115,7 +2115,7 @@ tuplesort_getdatum(Tuplesortstate *state, bool forward, /* * Advance over N tuples in either forward or back direction, * without returning any data. N==0 is a no-op. - * Returns TRUE if successful, FALSE if ran out of tuples. + * Returns true if successful, false if ran out of tuples. */ bool tuplesort_skiptuples(Tuplesortstate *state, int64 ntuples, bool forward) diff --git a/src/backend/utils/sort/tuplestore.c b/src/backend/utils/sort/tuplestore.c index 98c006b663e..1977b61fd94 100644 --- a/src/backend/utils/sort/tuplestore.c +++ b/src/backend/utils/sort/tuplestore.c @@ -562,7 +562,7 @@ tuplestore_ateof(Tuplestorestate *state) /* * Grow the memtuples[] array, if possible within our memory constraint. We * must not exceed INT_MAX tuples in memory or the caller-provided memory - * limit. Return TRUE if we were able to enlarge the array, FALSE if not. + * limit. Return true if we were able to enlarge the array, false if not. * * Normally, at each increment we double the size of the array. When doing * that would exceed a limit, we attempt one last, smaller increase (and then @@ -1064,12 +1064,12 @@ tuplestore_gettuple(Tuplestorestate *state, bool forward, /* * tuplestore_gettupleslot - exported function to fetch a MinimalTuple * - * If successful, put tuple in slot and return TRUE; else, clear the slot - * and return FALSE. + * If successful, put tuple in slot and return true; else, clear the slot + * and return false. * - * If copy is TRUE, the slot receives a copied tuple (allocated in current + * If copy is true, the slot receives a copied tuple (allocated in current * memory context) that will stay valid regardless of future manipulations of - * the tuplestore's state. If copy is FALSE, the slot may just receive a + * the tuplestore's state. If copy is false, the slot may just receive a * pointer to a tuple held within the tuplestore. The latter is more * efficient but the slot contents may be corrupted if additional writes to * the tuplestore occur. (If using tuplestore_trim, see comments therein.) @@ -1129,7 +1129,7 @@ tuplestore_advance(Tuplestorestate *state, bool forward) /* * Advance over N tuples in either forward or back direction, * without returning any data. N<=0 is a no-op. - * Returns TRUE if successful, FALSE if ran out of tuples. + * Returns true if successful, false if ran out of tuples. */ bool tuplestore_skiptuples(Tuplestorestate *state, int64 ntuples, bool forward) diff --git a/src/backend/utils/time/combocid.c b/src/backend/utils/time/combocid.c index c7e4331efbd..200fa3765f8 100644 --- a/src/backend/utils/time/combocid.c +++ b/src/backend/utils/time/combocid.c @@ -142,8 +142,8 @@ HeapTupleHeaderGetCmax(HeapTupleHeader tup) * into its t_cid field. * * If we don't need a combo CID, *cmax is unchanged and *iscombo is set to - * FALSE. If we do need one, *cmax is replaced by a combo CID and *iscombo - * is set to TRUE. + * false. If we do need one, *cmax is replaced by a combo CID and *iscombo + * is set to true. * * The reason this is separate from the actual HeapTupleHeaderSetCmax() * operation is that this could fail due to out-of-memory conditions. Hence diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c index b7aab0dd190..a821e2eed10 100644 --- a/src/backend/utils/time/tqual.c +++ b/src/backend/utils/time/tqual.c @@ -1422,7 +1422,7 @@ HeapTupleSatisfiesNonVacuumable(HeapTuple htup, Snapshot snapshot, * should already be set. We assume that if no hint bits are set, the xmin * or xmax transaction is still running. This is therefore faster than * HeapTupleSatisfiesVacuum, because we don't consult PGXACT nor CLOG. - * It's okay to return FALSE when in doubt, but we must return TRUE only + * It's okay to return false when in doubt, but we must return true only * if the tuple is removable. */ bool diff --git a/src/bin/pg_dump/dumputils.c b/src/bin/pg_dump/dumputils.c index e4c95feb63f..70d8f24d173 100644 --- a/src/bin/pg_dump/dumputils.c +++ b/src/bin/pg_dump/dumputils.c @@ -42,7 +42,7 @@ static void AddAcl(PQExpBuffer aclbuf, const char *keyword, * prefix: string to prefix to each generated command; typically empty * remoteVersion: version of database * - * Returns TRUE if okay, FALSE if could not parse the acl string. + * Returns true if okay, false if could not parse the acl string. * The resulting commands (if any) are appended to the contents of 'sql'. * * Note: when processing a default ACL, prefix is "ALTER DEFAULT PRIVILEGES " @@ -359,7 +359,7 @@ buildACLCommands(const char *name, const char *subname, * owner: username of privileges owner (will be passed through fmtId) * remoteVersion: version of database * - * Returns TRUE if okay, FALSE if could not parse the acl string. + * Returns true if okay, false if could not parse the acl string. * The resulting commands (if any) are appended to the contents of 'sql'. */ bool diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 6d4c28852ce..d8fb3561302 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -2455,7 +2455,7 @@ getTableDataFKConstraints(void) * In 8.4 and up we can rely on the conislocal field to decide which * constraints must be dumped; much safer. * - * This function assumes all conislocal flags were initialized to TRUE. + * This function assumes all conislocal flags were initialized to true. * It clears the flag on anything that seems to be inherited. */ static void diff --git a/src/bin/pg_dump/pg_dump.h b/src/bin/pg_dump/pg_dump.h index e7593e6da7f..da884ffd099 100644 --- a/src/bin/pg_dump/pg_dump.h +++ b/src/bin/pg_dump/pg_dump.h @@ -339,7 +339,7 @@ typedef struct _attrDefInfo TableInfo *adtable; /* link to table of attribute */ int adnum; char *adef_expr; /* decompiled DEFAULT expression */ - bool separate; /* TRUE if must dump as separate item */ + bool separate; /* true if must dump as separate item */ } AttrDefInfo; typedef struct _tableDataInfo @@ -380,7 +380,7 @@ typedef struct _ruleInfo char ev_type; bool is_instead; char ev_enabled; - bool separate; /* TRUE if must dump as separate item */ + bool separate; /* true if must dump as separate item */ /* separate is always true for non-ON SELECT rules */ } RuleInfo; @@ -430,10 +430,10 @@ typedef struct _constraintInfo char *condef; /* definition, if CHECK or FOREIGN KEY */ Oid confrelid; /* referenced table, if FOREIGN KEY */ DumpId conindex; /* identifies associated index if any */ - bool condeferrable; /* TRUE if constraint is DEFERRABLE */ - bool condeferred; /* TRUE if constraint is INITIALLY DEFERRED */ - bool conislocal; /* TRUE if constraint has local definition */ - bool separate; /* TRUE if must dump as separate item */ + bool condeferrable; /* true if constraint is DEFERRABLE */ + bool condeferred; /* true if constraint is INITIALLY DEFERRED */ + bool conislocal; /* true if constraint has local definition */ + bool separate; /* true if must dump as separate item */ } ConstraintInfo; typedef struct _procLangInfo diff --git a/src/bin/pg_dump/pg_dump_sort.c b/src/bin/pg_dump/pg_dump_sort.c index 5044a767873..48b6dd594cb 100644 --- a/src/bin/pg_dump/pg_dump_sort.c +++ b/src/bin/pg_dump/pg_dump_sort.c @@ -342,13 +342,13 @@ sortDumpableObjects(DumpableObject **objs, int numObjs, * The input is the list of numObjs objects in objs[]. This list is not * modified. * - * Returns TRUE if able to build an ordering that satisfies all the - * constraints, FALSE if not (there are contradictory constraints). + * Returns true if able to build an ordering that satisfies all the + * constraints, false if not (there are contradictory constraints). * - * On success (TRUE result), ordering[] is filled with a sorted array of + * On success (true result), ordering[] is filled with a sorted array of * DumpableObject pointers, of length equal to the input list length. * - * On failure (FALSE result), ordering[] is filled with an unsorted array of + * On failure (false result), ordering[] is filled with an unsorted array of * DumpableObject pointers of length *nOrdering, listing the objects that * prevented the sort from being completed. In general, these objects either * participate directly in a dependency cycle, or are depended on by objects diff --git a/src/bin/pg_upgrade/pg_upgrade.h b/src/bin/pg_upgrade/pg_upgrade.h index e44c23654d2..a21dd48c42d 100644 --- a/src/bin/pg_upgrade/pg_upgrade.h +++ b/src/bin/pg_upgrade/pg_upgrade.h @@ -284,7 +284,7 @@ typedef struct typedef struct { FILE *internal; /* internal log FILE */ - bool verbose; /* TRUE -> be verbose in messages */ + bool verbose; /* true -> be verbose in messages */ bool retain; /* retain log files on success */ } LogOpts; @@ -294,7 +294,7 @@ typedef struct */ typedef struct { - bool check; /* TRUE -> ask user for permission to make + bool check; /* true -> ask user for permission to make * changes */ transferMode transfer_mode; /* copy files or link them? */ int jobs; diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c index 041b5e0c877..8cc4de3878d 100644 --- a/src/bin/psql/command.c +++ b/src/bin/psql/command.c @@ -4370,7 +4370,7 @@ echo_hidden_command(const char *query) /* * Look up the object identified by obj_type and desc. If successful, - * store its OID in *obj_oid and return TRUE, else return FALSE. + * store its OID in *obj_oid and return true, else return false. * * Note that we'll fail if the object doesn't exist OR if there are multiple * matching candidates OR if there's something syntactically wrong with the diff --git a/src/bin/psql/common.c b/src/bin/psql/common.c index 9b59ee840b9..7a91a44b2b3 100644 --- a/src/bin/psql/common.c +++ b/src/bin/psql/common.c @@ -44,7 +44,7 @@ static bool is_select_command(const char *query); * Returns output file pointer into *fout, and is-a-pipe flag into *is_pipe. * Caller is responsible for adjusting SIGPIPE state if it's a pipe. * - * On error, reports suitable error message and returns FALSE. + * On error, reports suitable error message and returns false. */ bool openQueryOutputFile(const char *fname, FILE **fout, bool *is_pipe) @@ -266,7 +266,7 @@ NoticeProcessor(void *arg, const char *message) * database queries. In most places, this is accomplished by checking * cancel_pressed during long-running loops. However, that won't work when * blocked on user input (in readline() or fgets()). In those places, we - * set sigint_interrupt_enabled TRUE while blocked, instructing the signal + * set sigint_interrupt_enabled true while blocked, instructing the signal * catcher to longjmp through sigint_interrupt_jmp. We assume readline and * fgets are coded to handle possible interruption. (XXX currently this does * not work on win32, so control-C is less useful there) diff --git a/src/bin/psql/large_obj.c b/src/bin/psql/large_obj.c index 2a3416b3698..8a8887202a8 100644 --- a/src/bin/psql/large_obj.c +++ b/src/bin/psql/large_obj.c @@ -48,7 +48,7 @@ print_lo_result(const char *fmt,...) * Prepare to do a large-object operation. We *must* be inside a transaction * block for all these operations, so start one if needed. * - * Returns TRUE if okay, FALSE if failed. *own_transaction is set to indicate + * Returns true if okay, false if failed. *own_transaction is set to indicate * if we started our own transaction or not. */ static bool diff --git a/src/bin/psql/stringutils.c b/src/bin/psql/stringutils.c index 959381d0852..eefd18fbd94 100644 --- a/src/bin/psql/stringutils.c +++ b/src/bin/psql/stringutils.c @@ -27,8 +27,8 @@ * delim - set of non-whitespace separator characters (or NULL) * quote - set of characters that can quote a token (NULL if none) * escape - character that can quote quotes (0 if none) - * e_strings - if TRUE, treat E'...' syntax as a valid token - * del_quotes - if TRUE, strip quotes from the returned token, else return + * e_strings - if true, treat E'...' syntax as a valid token + * del_quotes - if true, strip quotes from the returned token, else return * it exactly as found in the string * encoding - the active character-set encoding * @@ -39,7 +39,7 @@ * a single quote character in the data. If escape isn't 0, then escape * followed by anything (except \0) is a data character too. * - * The combination of e_strings and del_quotes both TRUE is not currently + * The combination of e_strings and del_quotes both true is not currently * handled. This could be fixed but it's not needed anywhere at the moment. * * Note that the string s is _not_ overwritten in this implementation. diff --git a/src/common/md5.c b/src/common/md5.c index ba65b02af68..9144cab6ee7 100644 --- a/src/common/md5.c +++ b/src/common/md5.c @@ -317,7 +317,7 @@ pg_md5_binary(const void *buff, size_t len, void *outbuf) * Output format is "md5" followed by a 32-hex-digit MD5 checksum. * Hence, the output buffer "buf" must be at least 36 bytes long. * - * Returns TRUE if okay, FALSE on error (out of memory). + * Returns true if okay, false on error (out of memory). */ bool pg_md5_encrypt(const char *passwd, const char *salt, size_t salt_len, diff --git a/src/include/access/gin_private.h b/src/include/access/gin_private.h index adfdb0c6d9c..7b5c845b83f 100644 --- a/src/include/access/gin_private.h +++ b/src/include/access/gin_private.h @@ -300,7 +300,7 @@ typedef struct GinScanKeyData /* * Match status data. curItem is the TID most recently tested (could be a - * lossy-page pointer). curItemMatches is TRUE if it passes the + * lossy-page pointer). curItemMatches is true if it passes the * consistentFn test; if so, recheckCurItem is the recheck flag. * isFinished means that all the input entry streams are finished, so this * key cannot succeed for any later TIDs. diff --git a/src/include/access/hash_xlog.h b/src/include/access/hash_xlog.h index c778fdc8df8..abe85792497 100644 --- a/src/include/access/hash_xlog.h +++ b/src/include/access/hash_xlog.h @@ -149,7 +149,7 @@ typedef struct xl_hash_split_complete typedef struct xl_hash_move_page_contents { uint16 ntups; - bool is_prim_bucket_same_wrt; /* TRUE if the page to which + bool is_prim_bucket_same_wrt; /* true if the page to which * tuples are moved is same as * primary bucket page */ } xl_hash_move_page_contents; @@ -174,10 +174,10 @@ typedef struct xl_hash_squeeze_page BlockNumber prevblkno; BlockNumber nextblkno; uint16 ntups; - bool is_prim_bucket_same_wrt; /* TRUE if the page to which + bool is_prim_bucket_same_wrt; /* true if the page to which * tuples are moved is same as * primary bucket page */ - bool is_prev_bucket_same_wrt; /* TRUE if the page to which + bool is_prev_bucket_same_wrt; /* true if the page to which * tuples are moved is the page * previous to the freed overflow * page */ @@ -196,9 +196,9 @@ typedef struct xl_hash_squeeze_page */ typedef struct xl_hash_delete { - bool clear_dead_marking; /* TRUE if this operation clears + bool clear_dead_marking; /* true if this operation clears * LH_PAGE_HAS_DEAD_TUPLES flag */ - bool is_primary_bucket_page; /* TRUE if the operation is for + bool is_primary_bucket_page; /* true if the operation is for * primary bucket page */ } xl_hash_delete; diff --git a/src/include/access/slru.h b/src/include/access/slru.h index d829a6fab45..20114c4d444 100644 --- a/src/include/access/slru.h +++ b/src/include/access/slru.h @@ -37,7 +37,7 @@ /* * Page status codes. Note that these do not include the "dirty" bit. - * page_dirty can be TRUE only in the VALID or WRITE_IN_PROGRESS states; + * page_dirty can be true only in the VALID or WRITE_IN_PROGRESS states; * in the latter case it implies that the page has been re-dirtied since * the write started. */ diff --git a/src/include/access/xlog.h b/src/include/access/xlog.h index 0f2b8bd53fb..8fd6010ba04 100644 --- a/src/include/access/xlog.h +++ b/src/include/access/xlog.h @@ -43,7 +43,7 @@ extern bool InRecovery; /* * Like InRecovery, standbyState is only valid in the startup process. * In all other processes it will have the value STANDBY_DISABLED (so - * InHotStandby will read as FALSE). + * InHotStandby will read as false). * * In DISABLED state, we're performing crash recovery or hot standby was * disabled in postgresql.conf. diff --git a/src/include/c.h b/src/include/c.h index 62df4d5b0c1..852551c121c 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -493,7 +493,7 @@ typedef NameData *Name; #define NameStr(name) ((name).data) /* - * Support macros for escaping strings. escape_backslash should be TRUE + * Support macros for escaping strings. escape_backslash should be true * if generating a non-standard-conforming string. Prefixing a string * with ESCAPE_STRING_SYNTAX guarantees it is non-standard-conforming. * Beware of multiple evaluation of the "ch" argument! diff --git a/src/include/catalog/pg_conversion.h b/src/include/catalog/pg_conversion.h index 0682d7eb224..9344585e666 100644 --- a/src/include/catalog/pg_conversion.h +++ b/src/include/catalog/pg_conversion.h @@ -32,7 +32,7 @@ * conforencoding FOR encoding id * contoencoding TO encoding id * conproc OID of the conversion proc - * condefault TRUE if this is a default conversion + * condefault true if this is a default conversion * ---------------------------------------------------------------- */ #define ConversionRelationId 2607 diff --git a/src/include/catalog/pg_type.h b/src/include/catalog/pg_type.h index ffdb452b021..e3551440a04 100644 --- a/src/include/catalog/pg_type.h +++ b/src/include/catalog/pg_type.h @@ -51,7 +51,7 @@ CATALOG(pg_type,1247) BKI_BOOTSTRAP BKI_ROWTYPE_OID(71) BKI_SCHEMA_MACRO /* * typbyval determines whether internal Postgres routines pass a value of - * this type by value or by reference. typbyval had better be FALSE if + * this type by value or by reference. typbyval had better be false if * the length is not 1, 2, or 4 (or 8 on 8-byte-Datum machines). * Variable-length types are always passed by reference. Note that * typbyval can be false even if the length would allow pass-by-value; diff --git a/src/include/commands/vacuum.h b/src/include/commands/vacuum.h index 7a7b793ddfe..60586b2ca64 100644 --- a/src/include/commands/vacuum.h +++ b/src/include/commands/vacuum.h @@ -29,8 +29,8 @@ * so they live until the end of the ANALYZE operation. * * The type-specific typanalyze function is passed a pointer to this struct - * and must return TRUE to continue analysis, FALSE to skip analysis of this - * column. In the TRUE case it must set the compute_stats and minrows fields, + * and must return true to continue analysis, false to skip analysis of this + * column. In the true case it must set the compute_stats and minrows fields, * and can optionally set extra_data to pass additional info to compute_stats. * minrows is its request for the minimum number of sample rows to be gathered * (but note this request might not be honored, eg if there are fewer rows @@ -45,7 +45,7 @@ * The fetchfunc may be called with rownum running from 0 to samplerows-1. * It returns a Datum and an isNull flag. * - * compute_stats should set stats_valid TRUE if it is able to compute + * compute_stats should set stats_valid true if it is able to compute * any useful statistics. If it does, the remainder of the struct holds * the information to be stored in a pg_statistic row for the column. Be * careful to allocate any pointed-to data in anl_context, which will NOT @@ -86,7 +86,7 @@ typedef struct VacAttrStats /* * These fields must be filled in by the typanalyze routine, unless it - * returns FALSE. + * returns false. */ AnalyzeAttrComputeStatsFunc compute_stats; /* function pointer */ int minrows; /* Minimum # of rows wanted for stats */ diff --git a/src/include/executor/instrument.h b/src/include/executor/instrument.h index 31573145a9f..f1bae7a44d7 100644 --- a/src/include/executor/instrument.h +++ b/src/include/executor/instrument.h @@ -44,10 +44,10 @@ typedef enum InstrumentOption typedef struct Instrumentation { /* Parameters set at node creation: */ - bool need_timer; /* TRUE if we need timer data */ - bool need_bufusage; /* TRUE if we need buffer usage data */ + bool need_timer; /* true if we need timer data */ + bool need_bufusage; /* true if we need buffer usage data */ /* Info about current plan cycle: */ - bool running; /* TRUE if we've completed first tuple */ + bool running; /* true if we've completed first tuple */ instr_time starttime; /* Start time of current iteration of node */ instr_time counter; /* Accumulated runtime for this node */ double firsttuple; /* Time for first tuple of this cycle */ diff --git a/src/include/executor/tuptable.h b/src/include/executor/tuptable.h index 55f4cce4ee1..db2a42af5e9 100644 --- a/src/include/executor/tuptable.h +++ b/src/include/executor/tuptable.h @@ -68,7 +68,7 @@ * A TupleTableSlot can also be "empty", holding no valid data. This is * the only valid state for a freshly-created slot that has not yet had a * tuple descriptor assigned to it. In this state, tts_isempty must be - * TRUE, tts_shouldFree FALSE, tts_tuple NULL, tts_buffer InvalidBuffer, + * true, tts_shouldFree false, tts_tuple NULL, tts_buffer InvalidBuffer, * and tts_nvalid zero. * * The tupleDescriptor is simply referenced, not copied, by the TupleTableSlot diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index d209ec012c5..e05bc04f525 100644 --- a/src/include/nodes/execnodes.h +++ b/src/include/nodes/execnodes.h @@ -768,8 +768,8 @@ typedef struct SubPlanState ProjectionInfo *projRight; /* for projecting subselect output */ TupleHashTable hashtable; /* hash table for no-nulls subselect rows */ TupleHashTable hashnulls; /* hash table for rows with null(s) */ - bool havehashrows; /* TRUE if hashtable is not empty */ - bool havenullrows; /* TRUE if hashnulls is not empty */ + bool havehashrows; /* true if hashtable is not empty */ + bool havenullrows; /* true if hashnulls is not empty */ MemoryContext hashtablecxt; /* memory context containing hash tables */ MemoryContext hashtempcxt; /* temp memory context for hash tables */ ExprContext *innerecontext; /* econtext for computing inner tuples */ diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 06a2b81fb5b..a240c271db7 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -198,7 +198,7 @@ typedef struct Query * Similarly, if "typmods" is NIL then the actual typmod is expected to * be prespecified in typemod, otherwise typemod is unused. * - * If pct_type is TRUE, then names is actually a field name and we look up + * If pct_type is true, then names is actually a field name and we look up * the type of that field. Otherwise (the normal case), names is a type * name possibly qualified with schema and database name. */ @@ -888,8 +888,8 @@ typedef struct PartitionCmd * them from the joinaliasvars list, because that would affect the attnums * of Vars referencing the rest of the list.) * - * inh is TRUE for relation references that should be expanded to include - * inheritance children, if the rel has any. This *must* be FALSE for + * inh is true for relation references that should be expanded to include + * inheritance children, if the rel has any. This *must* be false for * RTEs other than RTE_RELATION entries. * * inFromCl marks those range variables that are listed in the FROM clause. @@ -1147,7 +1147,7 @@ typedef struct WithCheckOption * or InvalidOid if not available. * nulls_first means about what you'd expect. If sortop is InvalidOid * then nulls_first is meaningless and should be set to false. - * hashable is TRUE if eqop is hashable (note this condition also depends + * hashable is true if eqop is hashable (note this condition also depends * on the datatype of the input expression). * * In an ORDER BY item, all fields must be valid. (The eqop isn't essential @@ -2680,7 +2680,7 @@ typedef struct FetchStmt FetchDirection direction; /* see above */ long howMany; /* number of rows, or position argument */ char *portalname; /* name of portal (cursor) */ - bool ismove; /* TRUE if MOVE */ + bool ismove; /* true if MOVE */ } FetchStmt; /* ---------------------- diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index c2929ac387f..074ae0a8651 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -302,7 +302,7 @@ typedef struct Aggref List *aggorder; /* ORDER BY (list of SortGroupClause) */ List *aggdistinct; /* DISTINCT (list of SortGroupClause) */ Expr *aggfilter; /* FILTER expression, if any */ - bool aggstar; /* TRUE if argument list was really '*' */ + bool aggstar; /* true if argument list was really '*' */ bool aggvariadic; /* true if variadic arguments have been * combined into an array last argument */ char aggkind; /* aggregate kind (see pg_aggregate.h) */ @@ -359,7 +359,7 @@ typedef struct WindowFunc List *args; /* arguments to the window function */ Expr *aggfilter; /* FILTER expression, if any */ Index winref; /* index of associated WindowClause */ - bool winstar; /* TRUE if argument list was really '*' */ + bool winstar; /* true if argument list was really '*' */ bool winagg; /* is function a simple aggregate? */ int location; /* token location, or -1 if unknown */ } WindowFunc; @@ -695,9 +695,9 @@ typedef struct SubPlan Oid firstColCollation; /* Collation of first column of subplan * result */ /* Information about execution strategy: */ - bool useHashTable; /* TRUE to store subselect output in a hash + bool useHashTable; /* true to store subselect output in a hash * table (implies we are doing "IN") */ - bool unknownEqFalse; /* TRUE if it's okay to return FALSE when the + bool unknownEqFalse; /* true if it's okay to return FALSE when the * spec result is UNKNOWN; this allows much * simpler handling of null values */ bool parallel_safe; /* is the subplan parallel-safe? */ diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index e085cefb7ba..05fc9a3f485 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -1423,14 +1423,14 @@ typedef JoinPath NestPath; * mergejoin. If it is not NIL then it is a PathKeys list describing * the ordering that must be created by an explicit Sort node. * - * skip_mark_restore is TRUE if the executor need not do mark/restore calls. + * skip_mark_restore is true if the executor need not do mark/restore calls. * Mark/restore overhead is usually required, but can be skipped if we know * that the executor need find only one match per outer tuple, and that the * mergeclauses are sufficient to identify a match. In such cases the * executor can immediately advance the outer relation after processing a * match, and therefoere it need never back up the inner relation. * - * materialize_inner is TRUE if a Material node should be placed atop the + * materialize_inner is true if a Material node should be placed atop the * inner input. This may appear with or without an inner Sort step. */ @@ -1834,15 +1834,15 @@ typedef struct RestrictInfo Expr *clause; /* the represented clause of WHERE or JOIN */ - bool is_pushed_down; /* TRUE if clause was pushed down in level */ + bool is_pushed_down; /* true if clause was pushed down in level */ - bool outerjoin_delayed; /* TRUE if delayed by lower outer join */ + bool outerjoin_delayed; /* true if delayed by lower outer join */ bool can_join; /* see comment above */ bool pseudoconstant; /* see comment above */ - bool leakproof; /* TRUE if known to contain no leaked Vars */ + bool leakproof; /* true if known to contain no leaked Vars */ Index security_level; /* see comment above */ @@ -1973,7 +1973,7 @@ typedef struct PlaceHolderVar * syntactically below this special join. (These are needed to help compute * min_lefthand and min_righthand for higher joins.) * - * delay_upper_joins is set TRUE if we detect a pushed-down clause that has + * delay_upper_joins is set true if we detect a pushed-down clause that has * to be evaluated after this join is formed (because it references the RHS). * Any outer joins that have such a clause and this join in their RHS cannot * commute with this join, because that would leave noplace to check the diff --git a/src/include/parser/parse_node.h b/src/include/parser/parse_node.h index 68930c1f4ad..f0e210ad8d8 100644 --- a/src/include/parser/parse_node.h +++ b/src/include/parser/parse_node.h @@ -111,7 +111,7 @@ typedef Node *(*CoerceParamHook) (ParseState *pstate, Param *param, * namespace for table and column lookup. (The RTEs listed here may be just * a subset of the whole rtable. See ParseNamespaceItem comments below.) * - * p_lateral_active: TRUE if we are currently parsing a LATERAL subexpression + * p_lateral_active: true if we are currently parsing a LATERAL subexpression * of this parse level. This makes p_lateral_only namespace items visible, * whereas they are not visible when p_lateral_active is FALSE. * diff --git a/src/include/storage/s_lock.h b/src/include/storage/s_lock.h index bbf505e246f..99e109853f0 100644 --- a/src/include/storage/s_lock.h +++ b/src/include/storage/s_lock.h @@ -22,7 +22,7 @@ * Unlock a previously acquired lock. * * bool S_LOCK_FREE(slock_t *lock) - * Tests if the lock is free. Returns TRUE if free, FALSE if locked. + * Tests if the lock is free. Returns true if free, false if locked. * This does *not* change the state of the lock. * * void SPIN_DELAY(void) diff --git a/src/include/storage/spin.h b/src/include/storage/spin.h index 66698645c2d..16413856ca8 100644 --- a/src/include/storage/spin.h +++ b/src/include/storage/spin.h @@ -19,7 +19,7 @@ * Unlock a previously acquired lock. * * bool SpinLockFree(slock_t *lock) - * Tests if the lock is free. Returns TRUE if free, FALSE if locked. + * Tests if the lock is free. Returns true if free, false if locked. * This does *not* change the state of the lock. * * Callers must beware that the macro argument may be evaluated multiple diff --git a/src/include/tsearch/ts_utils.h b/src/include/tsearch/ts_utils.h index 33123530268..782548c0af0 100644 --- a/src/include/tsearch/ts_utils.h +++ b/src/include/tsearch/ts_utils.h @@ -146,7 +146,7 @@ typedef struct ExecPhraseData * val: lexeme to test for presence of * data: to be filled with lexeme positions; NULL if position data not needed * - * Return TRUE if lexeme is present in data, else FALSE. If data is not + * Return true if lexeme is present in data, else false. If data is not * NULL, it should be filled with lexeme positions, but function can leave * it as zeroes if position data is not available. */ @@ -167,7 +167,7 @@ typedef bool (*TSExecuteCallback) (void *arg, QueryOperand *val, #define TS_EXEC_CALC_NOT (0x01) /* * If TS_EXEC_PHRASE_NO_POS is set, allow OP_PHRASE to be executed lossily - * in the absence of position information: a TRUE result indicates that the + * in the absence of position information: a true result indicates that the * phrase might be present. Without this flag, OP_PHRASE always returns * false if lexeme position information is not available. */ diff --git a/src/interfaces/ecpg/ecpglib/misc.c b/src/interfaces/ecpg/ecpglib/misc.c index 2084d7fe606..a0257c8957d 100644 --- a/src/interfaces/ecpg/ecpglib/misc.c +++ b/src/interfaces/ecpg/ecpglib/misc.c @@ -225,13 +225,13 @@ ECPGtrans(int lineno, const char *connection_name, const char *transaction) { res = PQexec(con->connection, "begin transaction"); if (!ecpg_check_PQresult(res, lineno, con->connection, ECPG_COMPAT_PGSQL)) - return FALSE; + return false; PQclear(res); } res = PQexec(con->connection, transaction); if (!ecpg_check_PQresult(res, lineno, con->connection, ECPG_COMPAT_PGSQL)) - return FALSE; + return false; PQclear(res); } diff --git a/src/interfaces/ecpg/pgtypeslib/datetime.c b/src/interfaces/ecpg/pgtypeslib/datetime.c index 33c9011a71f..c2f78f5a56c 100644 --- a/src/interfaces/ecpg/pgtypeslib/datetime.c +++ b/src/interfaces/ecpg/pgtypeslib/datetime.c @@ -59,7 +59,7 @@ PGTYPESdate_from_asc(char *str, char **endptr) char *realptr; char **ptr = (endptr != NULL) ? endptr : &realptr; - bool EuroDates = FALSE; + bool EuroDates = false; errno = 0; if (strlen(str) > MAXDATELEN) @@ -105,7 +105,7 @@ PGTYPESdate_to_asc(date dDate) *tm = &tt; char buf[MAXDATELEN + 1]; int DateStyle = 1; - bool EuroDates = FALSE; + bool EuroDates = false; j2date(dDate + date2j(2000, 1, 1), &(tm->tm_year), &(tm->tm_mon), &(tm->tm_mday)); EncodeDateOnly(tm, DateStyle, buf, EuroDates); diff --git a/src/interfaces/ecpg/pgtypeslib/dt_common.c b/src/interfaces/ecpg/pgtypeslib/dt_common.c index be72fce8c5d..994389f4a16 100644 --- a/src/interfaces/ecpg/pgtypeslib/dt_common.c +++ b/src/interfaces/ecpg/pgtypeslib/dt_common.c @@ -1144,7 +1144,7 @@ DecodeNumberField(int len, char *str, int fmask, tm->tm_mon = atoi(str + 2); *(str + 2) = '\0'; tm->tm_year = atoi(str + 0); - *is2digits = TRUE; + *is2digits = true; return DTK_DATE; } @@ -1156,7 +1156,7 @@ DecodeNumberField(int len, char *str, int fmask, *(str + 2) = '\0'; tm->tm_mon = 1; tm->tm_year = atoi(str + 0); - *is2digits = TRUE; + *is2digits = true; return DTK_DATE; } @@ -1314,8 +1314,8 @@ DecodeDate(char *str, int fmask, int *tmask, struct tm *tm, bool EuroDates) int nf = 0; int i, len; - bool bc = FALSE; - bool is2digits = FALSE; + bool bc = false; + bool is2digits = false; int type, val, dmask = 0; @@ -1792,9 +1792,9 @@ DecodeDateTime(char **field, int *ftype, int nf, int i; int val; int mer = HR24; - bool haveTextMonth = FALSE; - bool is2digits = FALSE; - bool bc = FALSE; + bool haveTextMonth = false; + bool is2digits = false; + bool bc = false; int t = 0; int *tzp = &t; @@ -2200,7 +2200,7 @@ DecodeDateTime(char **field, int *ftype, int nf, tm->tm_mday = tm->tm_mon; tmask = DTK_M(DAY); } - haveTextMonth = TRUE; + haveTextMonth = true; tm->tm_mon = val; break; diff --git a/src/interfaces/ecpg/pgtypeslib/interval.c b/src/interfaces/ecpg/pgtypeslib/interval.c index 4a7227e926c..41976a188af 100644 --- a/src/interfaces/ecpg/pgtypeslib/interval.c +++ b/src/interfaces/ecpg/pgtypeslib/interval.c @@ -338,7 +338,7 @@ DecodeInterval(char **field, int *ftype, int nf, /* int range, */ { int IntervalStyle = INTSTYLE_POSTGRES_VERBOSE; int range = INTERVAL_FULL_RANGE; - bool is_before = FALSE; + bool is_before = false; char *cp; int fmask = 0, tmask, @@ -583,7 +583,7 @@ DecodeInterval(char **field, int *ftype, int nf, /* int range, */ break; case AGO: - is_before = TRUE; + is_before = true; type = val; break; @@ -705,7 +705,7 @@ AddVerboseIntPart(char *cp, int value, const char *units, else if (*is_before) value = -value; sprintf(cp, " %d %s%s", value, units, (value == 1) ? "" : "s"); - *is_zero = FALSE; + *is_zero = false; return cp + strlen(cp); } @@ -728,7 +728,7 @@ AddPostgresIntPart(char *cp, int value, const char *units, * tad bizarre but it's how it worked before... */ *is_before = (value < 0); - *is_zero = FALSE; + *is_zero = false; return cp + strlen(cp); } @@ -779,8 +779,8 @@ EncodeInterval(struct /* pg_ */ tm *tm, fsec_t fsec, int style, char *str) int hour = tm->tm_hour; int min = tm->tm_min; int sec = tm->tm_sec; - bool is_before = FALSE; - bool is_zero = TRUE; + bool is_before = false; + bool is_zero = true; /* * The sign of year and month are guaranteed to match, since they are @@ -926,7 +926,7 @@ EncodeInterval(struct /* pg_ */ tm *tm, fsec_t fsec, int style, char *str) if (sec < 0 || (sec == 0 && fsec < 0)) { if (is_zero) - is_before = TRUE; + is_before = true; else if (!is_before) *cp++ = '-'; } @@ -936,7 +936,7 @@ EncodeInterval(struct /* pg_ */ tm *tm, fsec_t fsec, int style, char *str) cp += strlen(cp); sprintf(cp, " sec%s", (abs(sec) != 1 || fsec != 0) ? "s" : ""); - is_zero = FALSE; + is_zero = false; } /* identically zero? then put in a unitless zero... */ if (is_zero) diff --git a/src/interfaces/ecpg/pgtypeslib/numeric.c b/src/interfaces/ecpg/pgtypeslib/numeric.c index a8619168ff8..6643242ab19 100644 --- a/src/interfaces/ecpg/pgtypeslib/numeric.c +++ b/src/interfaces/ecpg/pgtypeslib/numeric.c @@ -162,7 +162,7 @@ PGTYPESdecimal_new(void) static int set_var_from_str(char *str, char **ptr, numeric *dest) { - bool have_dp = FALSE; + bool have_dp = false; int i = 0; errno = 0; @@ -214,7 +214,7 @@ set_var_from_str(char *str, char **ptr, numeric *dest) if (*(*ptr) == '.') { - have_dp = TRUE; + have_dp = true; (*ptr)++; } @@ -241,7 +241,7 @@ set_var_from_str(char *str, char **ptr, numeric *dest) errno = PGTYPES_NUM_BAD_NUMERIC; return -1; } - have_dp = TRUE; + have_dp = true; (*ptr)++; } else diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l index e35843ba4ed..da4fc673d95 100644 --- a/src/interfaces/ecpg/preproc/pgc.l +++ b/src/interfaces/ecpg/preproc/pgc.l @@ -989,12 +989,12 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+ return S_ANYTHING; } } -<C,xskip>{exec_sql}{ifdef}{space}* { ifcond = TRUE; BEGIN(xcond); } +<C,xskip>{exec_sql}{ifdef}{space}* { ifcond = true; BEGIN(xcond); } <C,xskip>{informix_special}{ifdef}{space}* { /* are we simulating Informix? */ if (INFORMIX_MODE) { - ifcond = TRUE; + ifcond = true; BEGIN(xcond); } else @@ -1003,12 +1003,12 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+ return S_ANYTHING; } } -<C,xskip>{exec_sql}{ifndef}{space}* { ifcond = FALSE; BEGIN(xcond); } +<C,xskip>{exec_sql}{ifndef}{space}* { ifcond = false; BEGIN(xcond); } <C,xskip>{informix_special}{ifndef}{space}* { /* are we simulating Informix? */ if (INFORMIX_MODE) { - ifcond = FALSE; + ifcond = false; BEGIN(xcond); } else @@ -1026,7 +1026,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+ else preproc_tos--; - ifcond = TRUE; BEGIN(xcond); + ifcond = true; BEGIN(xcond); } <C,xskip>{informix_special}{elif}{space}* { /* are we simulating Informix? */ @@ -1039,7 +1039,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+ else preproc_tos--; - ifcond = TRUE; + ifcond = true; BEGIN(xcond); } else @@ -1054,7 +1054,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+ mmfatal(PARSE_ERROR, "more than one EXEC SQL ELSE"); else { - stacked_if_value[preproc_tos].else_branch = TRUE; + stacked_if_value[preproc_tos].else_branch = true; stacked_if_value[preproc_tos].condition = (stacked_if_value[preproc_tos-1].condition && !stacked_if_value[preproc_tos].condition); @@ -1073,7 +1073,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+ mmfatal(PARSE_ERROR, "more than one EXEC SQL ELSE"); else { - stacked_if_value[preproc_tos].else_branch = TRUE; + stacked_if_value[preproc_tos].else_branch = true; stacked_if_value[preproc_tos].condition = (stacked_if_value[preproc_tos-1].condition && !stacked_if_value[preproc_tos].condition); @@ -1147,7 +1147,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+ defptr = defptr->next); preproc_tos++; - stacked_if_value[preproc_tos].else_branch = FALSE; + stacked_if_value[preproc_tos].else_branch = false; stacked_if_value[preproc_tos].condition = (defptr ? ifcond : !ifcond) && stacked_if_value[preproc_tos-1].condition; } @@ -1265,9 +1265,9 @@ lex_init(void) preproc_tos = 0; yylineno = 1; - ifcond = TRUE; + ifcond = true; stacked_if_value[preproc_tos].condition = ifcond; - stacked_if_value[preproc_tos].else_branch = FALSE; + stacked_if_value[preproc_tos].else_branch = false; /* initialize literal buffer to a reasonable but expansible size */ if (literalbuf == NULL) @@ -1412,7 +1412,7 @@ parse_include(void) } /* - * ecpg_isspace() --- return TRUE if flex scanner considers char whitespace + * ecpg_isspace() --- return true if flex scanner considers char whitespace */ static bool ecpg_isspace(char ch) diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 6bcf60a712c..ada219032ec 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -3586,7 +3586,7 @@ closePGconn(PGconn *conn) * Don't call PQsetnonblocking() because it will fail if it's unable to * flush the connection. */ - conn->nonblocking = FALSE; + conn->nonblocking = false; /* * Close the connection, reset all transient state, flush I/O buffers. @@ -3781,8 +3781,8 @@ PQfreeCancel(PGcancel *cancel) * PQcancel and PQrequestCancel: attempt to request cancellation of the * current operation. * - * The return value is TRUE if the cancel request was successfully - * dispatched, FALSE if not (in which case an error message is available). + * The return value is true if the cancel request was successfully + * dispatched, false if not (in which case an error message is available). * Note: successful dispatch is no guarantee that there will be any effect at * the backend. The application must read the operation result as usual. * @@ -3871,7 +3871,7 @@ retry5: /* All done */ closesocket(tmpsock); SOCK_ERRNO_SET(save_errno); - return TRUE; + return true; cancel_errReturn: @@ -3889,13 +3889,13 @@ cancel_errReturn: if (tmpsock != PGINVALID_SOCKET) closesocket(tmpsock); SOCK_ERRNO_SET(save_errno); - return FALSE; + return false; } /* * PQcancel: request query cancel * - * Returns TRUE if able to send the cancel request, FALSE if not. + * Returns true if able to send the cancel request, false if not. * * On failure, an error message is stored in *errbuf, which must be of size * errbufsize (recommended size is 256 bytes). *errbuf is not changed on @@ -3907,7 +3907,7 @@ PQcancel(PGcancel *cancel, char *errbuf, int errbufsize) if (!cancel) { strlcpy(errbuf, "PQcancel() -- no cancel object supplied", errbufsize); - return FALSE; + return false; } return internal_cancel(&cancel->raddr, cancel->be_pid, cancel->be_key, @@ -3917,7 +3917,7 @@ PQcancel(PGcancel *cancel, char *errbuf, int errbufsize) /* * PQrequestCancel: old, not thread-safe function for requesting query cancel * - * Returns TRUE if able to send the cancel request, FALSE if not. + * Returns true if able to send the cancel request, false if not. * * On failure, the error message is saved in conn->errorMessage; this means * that this can't be used when there might be other active operations on @@ -3933,7 +3933,7 @@ PQrequestCancel(PGconn *conn) /* Check we have an open connection */ if (!conn) - return FALSE; + return false; if (conn->sock == PGINVALID_SOCKET) { @@ -3942,7 +3942,7 @@ PQrequestCancel(PGconn *conn) conn->errorMessage.maxlen); conn->errorMessage.len = strlen(conn->errorMessage.data); - return FALSE; + return false; } r = internal_cancel(&conn->raddr, conn->be_pid, conn->be_key, @@ -4781,7 +4781,7 @@ conninfo_init(PQExpBuffer errorMessage) * Returns a malloc'd PQconninfoOption array, if parsing is successful. * Otherwise, NULL is returned and an error message is left in errorMessage. * - * If use_defaults is TRUE, default values are filled in (from a service file, + * If use_defaults is true, default values are filled in (from a service file, * environment variables, etc). */ static PQconninfoOption * @@ -5004,7 +5004,7 @@ conninfo_parse(const char *conninfo, PQExpBuffer errorMessage, * If not successful, NULL is returned and an error message is * left in errorMessage. * Defaults are supplied (from a service file, environment variables, etc) - * for unspecified options, but only if use_defaults is TRUE. + * for unspecified options, but only if use_defaults is true. * * If expand_dbname is non-zero, and the value passed for the first occurrence * of "dbname" keyword is a connection string (as indicated by @@ -5175,7 +5175,7 @@ conninfo_array_parse(const char *const *keywords, const char *const *values, * * Defaults are obtained from a service file, environment variables, etc. * - * Returns TRUE if successful, otherwise FALSE; errorMessage, if supplied, + * Returns true if successful, otherwise false; errorMessage, if supplied, * is filled in upon failure. Note that failure to locate a default value * is not an error condition here --- we just leave the option's value as * NULL. @@ -5826,7 +5826,7 @@ conninfo_getval(PQconninfoOption *connOptions, * * If not successful, returns NULL and fills errorMessage accordingly. * However, if the reason of failure is an invalid keyword being passed and - * ignoreMissing is TRUE, errorMessage will be left untouched. + * ignoreMissing is true, errorMessage will be left untouched. */ static PQconninfoOption * conninfo_storeval(PQconninfoOption *connOptions, diff --git a/src/interfaces/libpq/fe-exec.c b/src/interfaces/libpq/fe-exec.c index c24bce62dde..66530870d44 100644 --- a/src/interfaces/libpq/fe-exec.c +++ b/src/interfaces/libpq/fe-exec.c @@ -231,17 +231,17 @@ PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs) /* If attrs already exist, they cannot be overwritten. */ if (!res || res->numAttributes > 0) - return FALSE; + return false; /* ignore no-op request */ if (numAttributes <= 0 || !attDescs) - return TRUE; + return true; res->attDescs = (PGresAttDesc *) PQresultAlloc(res, numAttributes * sizeof(PGresAttDesc)); if (!res->attDescs) - return FALSE; + return false; res->numAttributes = numAttributes; memcpy(res->attDescs, attDescs, numAttributes * sizeof(PGresAttDesc)); @@ -256,13 +256,13 @@ PQsetResultAttrs(PGresult *res, int numAttributes, PGresAttDesc *attDescs) res->attDescs[i].name = res->null_field; if (!res->attDescs[i].name) - return FALSE; + return false; if (res->attDescs[i].format == 0) res->binary = 0; } - return TRUE; + return true; } /* @@ -368,7 +368,7 @@ PQcopyResult(const PGresult *src, int flags) PQclear(dest); return NULL; } - dest->events[i].resultInitialized = TRUE; + dest->events[i].resultInitialized = true; } } @@ -398,7 +398,7 @@ dupEvents(PGEvent *events, int count) newEvents[i].proc = events[i].proc; newEvents[i].passThrough = events[i].passThrough; newEvents[i].data = NULL; - newEvents[i].resultInitialized = FALSE; + newEvents[i].resultInitialized = false; newEvents[i].name = strdup(events[i].name); if (!newEvents[i].name) { @@ -428,7 +428,7 @@ PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len) /* Note that this check also protects us against null "res" */ if (!check_field_number(res, field_num)) - return FALSE; + return false; /* Invalid tup_num, must be <= ntups */ if (tup_num < 0 || tup_num > res->ntups) @@ -436,7 +436,7 @@ PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len) pqInternalNotice(&res->noticeHooks, "row number %d is out of range 0..%d", tup_num, res->ntups); - return FALSE; + return false; } /* need to allocate a new tuple? */ @@ -447,7 +447,7 @@ PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len) tup = (PGresAttValue *) pqResultAlloc(res, res->numAttributes * sizeof(PGresAttValue), - TRUE); + true); if (!tup) goto fail; @@ -479,7 +479,7 @@ PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len) } else { - attval->value = (char *) pqResultAlloc(res, len + 1, TRUE); + attval->value = (char *) pqResultAlloc(res, len + 1, true); if (!attval->value) goto fail; attval->len = len; @@ -487,7 +487,7 @@ PQsetvalue(PGresult *res, int tup_num, int field_num, char *value, int len) attval->value[len] = '\0'; } - return TRUE; + return true; /* * Report failure via pqInternalNotice. If preceding code didn't provide @@ -498,7 +498,7 @@ fail: errmsg = libpq_gettext("out of memory"); pqInternalNotice(&res->noticeHooks, "%s", errmsg); - return FALSE; + return false; } /* @@ -510,7 +510,7 @@ fail: void * PQresultAlloc(PGresult *res, size_t nBytes) { - return pqResultAlloc(res, nBytes, TRUE); + return pqResultAlloc(res, nBytes, true); } /* @@ -622,7 +622,7 @@ pqResultAlloc(PGresult *res, size_t nBytes, bool isBinary) char * pqResultStrdup(PGresult *res, const char *str) { - char *space = (char *) pqResultAlloc(res, strlen(str) + 1, FALSE); + char *space = (char *) pqResultAlloc(res, strlen(str) + 1, false); if (space) strcpy(space, str); @@ -852,7 +852,7 @@ pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...) * Result text is always just the primary message + newline. If we can't * allocate it, don't bother invoking the receiver. */ - res->errMsg = (char *) pqResultAlloc(res, strlen(msgBuf) + 2, FALSE); + res->errMsg = (char *) pqResultAlloc(res, strlen(msgBuf) + 2, false); if (res->errMsg) { sprintf(res->errMsg, "%s\n", msgBuf); @@ -868,7 +868,7 @@ pqInternalNotice(const PGNoticeHooks *hooks, const char *fmt,...) /* * pqAddTuple * add a row pointer to the PGresult structure, growing it if necessary - * Returns TRUE if OK, FALSE if an error prevented adding the row + * Returns true if OK, false if an error prevented adding the row * * On error, *errmsgp can be set to an error string to be returned. * If it is left NULL, the error is presumed to be "out of memory". @@ -903,7 +903,7 @@ pqAddTuple(PGresult *res, PGresAttValue *tup, const char **errmsgp) else { *errmsgp = libpq_gettext("PGresult cannot support more than INT_MAX tuples"); - return FALSE; + return false; } /* @@ -915,7 +915,7 @@ pqAddTuple(PGresult *res, PGresAttValue *tup, const char **errmsgp) if (newSize > SIZE_MAX / sizeof(PGresAttValue *)) { *errmsgp = libpq_gettext("size_t overflow"); - return FALSE; + return false; } #endif @@ -926,13 +926,13 @@ pqAddTuple(PGresult *res, PGresAttValue *tup, const char **errmsgp) newTuples = (PGresAttValue **) realloc(res->tuples, newSize * sizeof(PGresAttValue *)); if (!newTuples) - return FALSE; /* malloc or realloc failed */ + return false; /* malloc or realloc failed */ res->tupArrSize = newSize; res->tuples = newTuples; } res->tuples[res->ntups] = tup; res->ntups++; - return TRUE; + return true; } /* @@ -947,7 +947,7 @@ pqSaveMessageField(PGresult *res, char code, const char *value) pqResultAlloc(res, offsetof(PGMessageField, contents) + strlen(value) + 1, - TRUE); + true); if (!pfield) return; /* out of memory? */ pfield->code = code; @@ -1111,7 +1111,7 @@ pqRowProcessor(PGconn *conn, const char **errmsgp) * memory for gettext() to do anything. */ tup = (PGresAttValue *) - pqResultAlloc(res, nfields * sizeof(PGresAttValue), TRUE); + pqResultAlloc(res, nfields * sizeof(PGresAttValue), true); if (tup == NULL) goto fail; @@ -1725,14 +1725,14 @@ parseInput(PGconn *conn) /* * PQisBusy - * Return TRUE if PQgetResult would block waiting for input. + * Return true if PQgetResult would block waiting for input. */ int PQisBusy(PGconn *conn) { if (!conn) - return FALSE; + return false; /* Parse any available data, if our state permits. */ parseInput(conn); @@ -1771,7 +1771,7 @@ PQgetResult(PGconn *conn) */ while ((flushResult = pqFlush(conn)) > 0) { - if (pqWait(FALSE, TRUE, conn)) + if (pqWait(false, true, conn)) { flushResult = -1; break; @@ -1780,7 +1780,7 @@ PQgetResult(PGconn *conn) /* Wait for some more data, and load it. */ if (flushResult || - pqWait(TRUE, FALSE, conn) || + pqWait(true, false, conn) || pqReadData(conn) < 0) { /* @@ -1844,7 +1844,7 @@ PQgetResult(PGconn *conn) res->resultStatus = PGRES_FATAL_ERROR; break; } - res->events[i].resultInitialized = TRUE; + res->events[i].resultInitialized = true; } } @@ -2746,22 +2746,22 @@ PQbinaryTuples(const PGresult *res) /* * Helper routines to range-check field numbers and tuple numbers. - * Return TRUE if OK, FALSE if not + * Return true if OK, false if not */ static int check_field_number(const PGresult *res, int field_num) { if (!res) - return FALSE; /* no way to display error message... */ + return false; /* no way to display error message... */ if (field_num < 0 || field_num >= res->numAttributes) { pqInternalNotice(&res->noticeHooks, "column number %d is out of range 0..%d", field_num, res->numAttributes - 1); - return FALSE; + return false; } - return TRUE; + return true; } static int @@ -2769,38 +2769,38 @@ check_tuple_field_number(const PGresult *res, int tup_num, int field_num) { if (!res) - return FALSE; /* no way to display error message... */ + return false; /* no way to display error message... */ if (tup_num < 0 || tup_num >= res->ntups) { pqInternalNotice(&res->noticeHooks, "row number %d is out of range 0..%d", tup_num, res->ntups - 1); - return FALSE; + return false; } if (field_num < 0 || field_num >= res->numAttributes) { pqInternalNotice(&res->noticeHooks, "column number %d is out of range 0..%d", field_num, res->numAttributes - 1); - return FALSE; + return false; } - return TRUE; + return true; } static int check_param_number(const PGresult *res, int param_num) { if (!res) - return FALSE; /* no way to display error message... */ + return false; /* no way to display error message... */ if (param_num < 0 || param_num >= res->numParameters) { pqInternalNotice(&res->noticeHooks, "parameter number %d is out of range 0..%d", param_num, res->numParameters - 1); - return FALSE; + return false; } - return TRUE; + return true; } /* @@ -3177,8 +3177,8 @@ PQparamtype(const PGresult *res, int param_num) /* PQsetnonblocking: - * sets the PGconn's database connection non-blocking if the arg is TRUE - * or makes it blocking if the arg is FALSE, this will not protect + * sets the PGconn's database connection non-blocking if the arg is true + * or makes it blocking if the arg is false, this will not protect * you from PQexec(), you'll only be safe when using the non-blocking API. * Needs to be called only on a connected database connection. */ @@ -3190,7 +3190,7 @@ PQsetnonblocking(PGconn *conn, int arg) if (!conn || conn->status == CONNECTION_BAD) return -1; - barg = (arg ? TRUE : FALSE); + barg = (arg ? true : false); /* early out if the socket is already in the state requested */ if (barg == conn->nonblocking) @@ -3213,7 +3213,7 @@ PQsetnonblocking(PGconn *conn, int arg) /* * return the blocking status of the database connection - * TRUE == nonblocking, FALSE == blocking + * true == nonblocking, false == blocking */ int PQisnonblocking(const PGconn *conn) diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index 41b1749d074..f8851066157 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -934,7 +934,7 @@ pqSendSome(PGconn *conn, int len) break; } - if (pqWait(TRUE, TRUE, conn)) + if (pqWait(true, true, conn)) { result = -1; break; diff --git a/src/interfaces/libpq/fe-protocol2.c b/src/interfaces/libpq/fe-protocol2.c index 1320d18a996..5335a914407 100644 --- a/src/interfaces/libpq/fe-protocol2.c +++ b/src/interfaces/libpq/fe-protocol2.c @@ -583,7 +583,7 @@ pqParseInput2(PGconn *conn) if (conn->result != NULL) { /* Read another tuple of a normal query response */ - if (getAnotherTuple(conn, FALSE)) + if (getAnotherTuple(conn, false)) return; /* getAnotherTuple() moves inStart itself */ continue; @@ -601,7 +601,7 @@ pqParseInput2(PGconn *conn) if (conn->result != NULL) { /* Read another tuple of a normal query response */ - if (getAnotherTuple(conn, TRUE)) + if (getAnotherTuple(conn, true)) return; /* getAnotherTuple() moves inStart itself */ continue; @@ -679,7 +679,7 @@ getRowDescriptions(PGconn *conn) if (nfields > 0) { result->attDescs = (PGresAttDesc *) - pqResultAlloc(result, nfields * sizeof(PGresAttDesc), TRUE); + pqResultAlloc(result, nfields * sizeof(PGresAttDesc), true); if (!result->attDescs) { errmsg = NULL; /* means "out of memory", see below */ @@ -1218,7 +1218,7 @@ nodata: if (async) return 0; /* Need to load more data */ - if (pqWait(TRUE, FALSE, conn) || + if (pqWait(true, false, conn) || pqReadData(conn) < 0) return -2; } @@ -1263,7 +1263,7 @@ pqGetline2(PGconn *conn, char *s, int maxlen) else { /* need to load more data */ - if (pqWait(TRUE, FALSE, conn) || + if (pqWait(true, false, conn) || pqReadData(conn) < 0) { result = EOF; @@ -1484,7 +1484,7 @@ pqFunctionCall2(PGconn *conn, Oid fnid, if (needInput) { /* Wait for some data to arrive (or for the channel to close) */ - if (pqWait(TRUE, FALSE, conn) || + if (pqWait(true, false, conn) || pqReadData(conn) < 0) break; } diff --git a/src/interfaces/libpq/fe-protocol3.c b/src/interfaces/libpq/fe-protocol3.c index 21fb8f2f213..0c5099caac1 100644 --- a/src/interfaces/libpq/fe-protocol3.c +++ b/src/interfaces/libpq/fe-protocol3.c @@ -510,7 +510,7 @@ getRowDescriptions(PGconn *conn, int msgLength) if (nfields > 0) { result->attDescs = (PGresAttDesc *) - pqResultAlloc(result, nfields * sizeof(PGresAttDesc), TRUE); + pqResultAlloc(result, nfields * sizeof(PGresAttDesc), true); if (!result->attDescs) { errmsg = NULL; /* means "out of memory", see below */ @@ -668,7 +668,7 @@ getParamDescriptions(PGconn *conn, int msgLength) if (nparams > 0) { result->paramDescs = (PGresParamDesc *) - pqResultAlloc(result, nparams * sizeof(PGresParamDesc), TRUE); + pqResultAlloc(result, nparams * sizeof(PGresParamDesc), true); if (!result->paramDescs) goto advance_and_error; MemSet(result->paramDescs, 0, nparams * sizeof(PGresParamDesc)); @@ -1466,7 +1466,7 @@ getCopyStart(PGconn *conn, ExecStatusType copytype) if (nfields > 0) { result->attDescs = (PGresAttDesc *) - pqResultAlloc(result, nfields * sizeof(PGresAttDesc), TRUE); + pqResultAlloc(result, nfields * sizeof(PGresAttDesc), true); if (!result->attDescs) goto failure; MemSet(result->attDescs, 0, nfields * sizeof(PGresAttDesc)); @@ -1657,7 +1657,7 @@ pqGetCopyData3(PGconn *conn, char **buffer, int async) if (async) return 0; /* Need to load more data */ - if (pqWait(TRUE, FALSE, conn) || + if (pqWait(true, false, conn) || pqReadData(conn) < 0) return -2; continue; @@ -1715,7 +1715,7 @@ pqGetline3(PGconn *conn, char *s, int maxlen) while ((status = PQgetlineAsync(conn, s, maxlen - 1)) == 0) { /* need to load more data */ - if (pqWait(TRUE, FALSE, conn) || + if (pqWait(true, false, conn) || pqReadData(conn) < 0) { *s = '\0'; @@ -1968,7 +1968,7 @@ pqFunctionCall3(PGconn *conn, Oid fnid, if (needInput) { /* Wait for some data to arrive (or for the channel to close) */ - if (pqWait(TRUE, FALSE, conn) || + if (pqWait(true, false, conn) || pqReadData(conn) < 0) break; } diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c index 7c2d0cb4e6c..c122c631060 100644 --- a/src/interfaces/libpq/fe-secure.c +++ b/src/interfaces/libpq/fe-secure.c @@ -465,10 +465,10 @@ pq_block_sigpipe(sigset_t *osigset, bool *sigpipe_pending) * As long as it doesn't queue multiple events, we're OK because the caller * can't tell the difference. * - * The caller should say got_epipe = FALSE if it is certain that it + * The caller should say got_epipe = false if it is certain that it * didn't get an EPIPE error; in that case we'll skip the clear operation * and things are definitely OK, queuing or no. If it got one or might have - * gotten one, pass got_epipe = TRUE. + * gotten one, pass got_epipe = true. * * We do not want this to change errno, since if it did that could lose * the error code from a preceding send(). We essentially assume that if diff --git a/src/interfaces/libpq/libpq-events.c b/src/interfaces/libpq/libpq-events.c index e533017a032..883e2af8f41 100644 --- a/src/interfaces/libpq/libpq-events.c +++ b/src/interfaces/libpq/libpq-events.c @@ -44,12 +44,12 @@ PQregisterEventProc(PGconn *conn, PGEventProc proc, PGEventRegister regevt; if (!proc || !conn || !name || !*name) - return FALSE; /* bad arguments */ + return false; /* bad arguments */ for (i = 0; i < conn->nEvents; i++) { if (conn->events[i].proc == proc) - return FALSE; /* already registered */ + return false; /* already registered */ } if (conn->nEvents >= conn->eventArraySize) @@ -64,7 +64,7 @@ PQregisterEventProc(PGconn *conn, PGEventProc proc, e = (PGEvent *) malloc(newSize * sizeof(PGEvent)); if (!e) - return FALSE; + return false; conn->eventArraySize = newSize; conn->events = e; @@ -73,10 +73,10 @@ PQregisterEventProc(PGconn *conn, PGEventProc proc, conn->events[conn->nEvents].proc = proc; conn->events[conn->nEvents].name = strdup(name); if (!conn->events[conn->nEvents].name) - return FALSE; + return false; conn->events[conn->nEvents].passThrough = passThrough; conn->events[conn->nEvents].data = NULL; - conn->events[conn->nEvents].resultInitialized = FALSE; + conn->events[conn->nEvents].resultInitialized = false; conn->nEvents++; regevt.conn = conn; @@ -84,10 +84,10 @@ PQregisterEventProc(PGconn *conn, PGEventProc proc, { conn->nEvents--; free(conn->events[conn->nEvents].name); - return FALSE; + return false; } - return TRUE; + return true; } /* @@ -100,18 +100,18 @@ PQsetInstanceData(PGconn *conn, PGEventProc proc, void *data) int i; if (!conn || !proc) - return FALSE; + return false; for (i = 0; i < conn->nEvents; i++) { if (conn->events[i].proc == proc) { conn->events[i].data = data; - return TRUE; + return true; } } - return FALSE; + return false; } /* @@ -144,18 +144,18 @@ PQresultSetInstanceData(PGresult *result, PGEventProc proc, void *data) int i; if (!result || !proc) - return FALSE; + return false; for (i = 0; i < result->nEvents; i++) { if (result->events[i].proc == proc) { result->events[i].data = data; - return TRUE; + return true; } } - return FALSE; + return false; } /* @@ -187,7 +187,7 @@ PQfireResultCreateEvents(PGconn *conn, PGresult *res) int i; if (!res) - return FALSE; + return false; for (i = 0; i < res->nEvents; i++) { @@ -199,11 +199,11 @@ PQfireResultCreateEvents(PGconn *conn, PGresult *res) evt.result = res; if (!res->events[i].proc(PGEVT_RESULTCREATE, &evt, res->events[i].passThrough)) - return FALSE; + return false; - res->events[i].resultInitialized = TRUE; + res->events[i].resultInitialized = true; } } - return TRUE; + return true; } diff --git a/src/pl/plpgsql/src/pl_comp.c b/src/pl/plpgsql/src/pl_comp.c index 9931ee038fe..d0afa592423 100644 --- a/src/pl/plpgsql/src/pl_comp.c +++ b/src/pl/plpgsql/src/pl_comp.c @@ -869,7 +869,7 @@ plpgsql_compile_inline(char *proc_source) /* * Remember if function is STABLE/IMMUTABLE. XXX would it be better to - * set this TRUE inside a read-only transaction? Not clear. + * set this true inside a read-only transaction? Not clear. */ function->fn_readonly = false; @@ -1350,8 +1350,8 @@ make_datum_param(PLpgSQL_expr *expr, int dno, int location) * yytxt is the original token text; we need this to check for quoting, * so that later checks for unreserved keywords work properly. * - * If recognized as a variable, fill in *wdatum and return TRUE; - * if not recognized, fill in *word and return FALSE. + * If recognized as a variable, fill in *wdatum and return true; + * if not recognized, fill in *word and return false. * (Note: those two pointers actually point to members of the same union, * but for notational reasons we pass them separately.) * ---------- diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index e605ec829e3..7a6dd154601 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -5491,12 +5491,12 @@ loop_exit: * a Datum by directly calling ExecEvalExpr(). * * If successful, store results into *result, *isNull, *rettype, *rettypmod - * and return TRUE. If the expression cannot be handled by simple evaluation, - * return FALSE. + * and return true. If the expression cannot be handled by simple evaluation, + * return false. * * Because we only store one execution tree for a simple expression, we * can't handle recursion cases. So, if we see the tree is already busy - * with an evaluation in the current xact, we just return FALSE and let the + * with an evaluation in the current xact, we just return false and let the * caller run the expression the hard way. (Other alternatives such as * creating a new tree for a recursive call either introduce memory leaks, * or add enough bookkeeping to be doubtful wins anyway.) Another case that @@ -6309,7 +6309,7 @@ exec_cast_value(PLpgSQL_execstate *estate, * or NULL if the cast is a mere no-op relabeling. If there's work to be * done, the cast_exprstate field contains an expression evaluation tree * based on a CaseTestExpr input, and the cast_in_use field should be set - * TRUE while executing it. + * true while executing it. * ---------- */ static plpgsql_CastHashEntry * diff --git a/src/pl/plpgsql/src/pl_funcs.c b/src/pl/plpgsql/src/pl_funcs.c index cd44a8e9a3a..23f54e1c21b 100644 --- a/src/pl/plpgsql/src/pl_funcs.c +++ b/src/pl/plpgsql/src/pl_funcs.c @@ -113,7 +113,7 @@ plpgsql_ns_additem(PLpgSQL_nsitem_type itemtype, int itemno, const char *name) * * Note that this only searches for variables, not labels. * - * If localmode is TRUE, only the topmost block level is searched. + * If localmode is true, only the topmost block level is searched. * * name1 must be non-NULL. Pass NULL for name2 and/or name3 if parsing a name * with fewer than three components. |