From 2eb4a831e5fb5d8fc17e13aea56e04af3efe27b4 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 16 Aug 2017 00:22:32 -0400 Subject: 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 --- src/backend/access/gist/gistutil.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/backend/access/gist/gistutil.c') 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], -- cgit v1.2.3