diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2017-08-16 00:22:32 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2017-11-08 11:37:28 -0500 |
commit | 2eb4a831e5fb5d8fc17e13aea56e04af3efe27b4 (patch) | |
tree | b46993cceb7cd8b848e39a45c1bb8c73dc67b221 /src/backend/access/gist/gistsplit.c | |
parent | 4497f2f3b30fa5cd48898033c351bfcf01ce73e2 (diff) | |
download | postgresql-2eb4a831e5fb5d8fc17e13aea56e04af3efe27b4.tar.gz postgresql-2eb4a831e5fb5d8fc17e13aea56e04af3efe27b4.zip |
Change TRUE/FALSE to true/false
The lower case spellings are C and C++ standard and are used in most
parts of the PostgreSQL sources. The upper case spellings are only used
in some files/modules. So standardize on the standard spellings.
The APIs for ICU, Perl, and Windows define their own TRUE and FALSE, so
those are left as is when using those APIs.
In code comments, we use the lower-case spelling for the C concepts and
keep the upper-case spelling for the SQL concepts.
Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
Diffstat (limited to 'src/backend/access/gist/gistsplit.c')
-rw-r--r-- | src/backend/access/gist/gistsplit.c | 38 |
1 files changed, 19 insertions, 19 deletions
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; |