aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/adt/arrayfuncs.c6
-rw-r--r--src/backend/utils/adt/datetime.c50
-rw-r--r--src/backend/utils/adt/formatting.c272
-rw-r--r--src/backend/utils/adt/geo_ops.c12
-rw-r--r--src/backend/utils/adt/misc.c2
-rw-r--r--src/backend/utils/adt/network_gist.c6
-rw-r--r--src/backend/utils/adt/numeric.c10
-rw-r--r--src/backend/utils/adt/regexp.c8
-rw-r--r--src/backend/utils/adt/regproc.c2
-rw-r--r--src/backend/utils/adt/ri_triggers.c8
-rw-r--r--src/backend/utils/adt/ruleutils.c18
-rw-r--r--src/backend/utils/adt/selfuncs.c24
-rw-r--r--src/backend/utils/adt/tsginidx.c2
-rw-r--r--src/backend/utils/adt/tsgistidx.c6
-rw-r--r--src/backend/utils/adt/tsquery_gist.c4
-rw-r--r--src/backend/utils/adt/varlena.c4
-rw-r--r--src/backend/utils/adt/xml.c2
-rw-r--r--src/backend/utils/cache/lsyscache.c14
-rw-r--r--src/backend/utils/cache/plancache.c2
-rw-r--r--src/backend/utils/cache/relcache.c6
-rw-r--r--src/backend/utils/cache/relmapper.c6
-rw-r--r--src/backend/utils/error/elog.c4
-rw-r--r--src/backend/utils/fmgr/funcapi.c6
-rw-r--r--src/backend/utils/hash/dynahash.c8
-rw-r--r--src/backend/utils/init/miscinit.c4
-rw-r--r--src/backend/utils/misc/guc.c18
-rw-r--r--src/backend/utils/misc/tzparser.c6
-rw-r--r--src/backend/utils/mmgr/portalmem.c4
-rw-r--r--src/backend/utils/sort/tuplesort.c16
-rw-r--r--src/backend/utils/sort/tuplestore.c12
-rw-r--r--src/backend/utils/time/combocid.c4
-rw-r--r--src/backend/utils/time/tqual.c2
32 files changed, 274 insertions, 274 deletions
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