aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/adt/acl.c4
-rw-r--r--src/backend/utils/adt/array_selfuncs.c2
-rw-r--r--src/backend/utils/adt/arrayfuncs.c28
-rw-r--r--src/backend/utils/adt/ascii.c6
-rw-r--r--src/backend/utils/adt/cash.c6
-rw-r--r--src/backend/utils/adt/date.c4
-rw-r--r--src/backend/utils/adt/datetime.c40
-rw-r--r--src/backend/utils/adt/float.c10
-rw-r--r--src/backend/utils/adt/formatting.c54
-rw-r--r--src/backend/utils/adt/geo_ops.c26
-rw-r--r--src/backend/utils/adt/int8.c2
-rw-r--r--src/backend/utils/adt/json.c2
-rw-r--r--src/backend/utils/adt/jsonfuncs.c24
-rw-r--r--src/backend/utils/adt/like_match.c2
-rw-r--r--src/backend/utils/adt/nabstime.c6
-rw-r--r--src/backend/utils/adt/name.c9
-rw-r--r--src/backend/utils/adt/numeric.c14
-rw-r--r--src/backend/utils/adt/pg_locale.c34
-rw-r--r--src/backend/utils/adt/rangetypes_gist.c2
-rw-r--r--src/backend/utils/adt/rangetypes_selfuncs.c2
-rw-r--r--src/backend/utils/adt/rangetypes_typanalyze.c2
-rw-r--r--src/backend/utils/adt/ri_triggers.c39
-rw-r--r--src/backend/utils/adt/ruleutils.c32
-rw-r--r--src/backend/utils/adt/selfuncs.c17
-rw-r--r--src/backend/utils/adt/tsquery.c10
-rw-r--r--src/backend/utils/adt/tsrank.c4
-rw-r--r--src/backend/utils/adt/tsvector_op.c2
-rw-r--r--src/backend/utils/adt/varbit.c6
-rw-r--r--src/backend/utils/adt/varlena.c40
-rw-r--r--src/backend/utils/adt/xml.c44
-rw-r--r--src/backend/utils/cache/attoptcache.c3
-rw-r--r--src/backend/utils/cache/catcache.c2
-rw-r--r--src/backend/utils/cache/inval.c2
-rw-r--r--src/backend/utils/cache/lsyscache.c2
-rw-r--r--src/backend/utils/cache/plancache.c4
-rw-r--r--src/backend/utils/cache/relcache.c20
-rw-r--r--src/backend/utils/cache/relfilenodemap.c6
-rw-r--r--src/backend/utils/cache/relmapper.c4
-rw-r--r--src/backend/utils/cache/syscache.c8
-rw-r--r--src/backend/utils/cache/typcache.c4
-rw-r--r--src/backend/utils/error/elog.c20
-rw-r--r--src/backend/utils/fmgr/dfmgr.c4
-rw-r--r--src/backend/utils/fmgr/fmgr.c8
-rw-r--r--src/backend/utils/fmgr/funcapi.c6
-rw-r--r--src/backend/utils/hash/dynahash.c6
-rw-r--r--src/backend/utils/init/globals.c8
-rw-r--r--src/backend/utils/init/miscinit.c4
-rw-r--r--src/backend/utils/init/postinit.c2
-rw-r--r--src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c2
-rw-r--r--src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c8
-rw-r--r--src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c30
-rw-r--r--src/backend/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c4
-rw-r--r--src/backend/utils/mb/encnames.c2
-rw-r--r--src/backend/utils/mb/wchar.c92
-rw-r--r--src/backend/utils/misc/backend_random.c2
-rw-r--r--src/backend/utils/misc/guc.c18
-rw-r--r--src/backend/utils/misc/ps_status.c24
-rw-r--r--src/backend/utils/misc/sampling.c8
-rw-r--r--src/backend/utils/mmgr/aset.c14
-rw-r--r--src/backend/utils/mmgr/dsa.c4
-rw-r--r--src/backend/utils/mmgr/memdebug.c2
-rw-r--r--src/backend/utils/mmgr/slab.c2
-rw-r--r--src/backend/utils/resowner/resowner.c2
-rw-r--r--src/backend/utils/sort/logtape.c2
-rw-r--r--src/backend/utils/time/snapmgr.c7
-rw-r--r--src/backend/utils/time/tqual.c14
66 files changed, 407 insertions, 416 deletions
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 35bdfc9a461..c4899cb3bc8 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -793,7 +793,7 @@ acldefault(GrantObjectType objtype, Oid ownerId)
break;
default:
elog(ERROR, "unrecognized objtype: %d", (int) objtype);
- world_default = ACL_NO_RIGHTS; /* keep compiler quiet */
+ world_default = ACL_NO_RIGHTS; /* keep compiler quiet */
owner_default = ACL_NO_RIGHTS;
break;
}
@@ -4713,7 +4713,7 @@ roles_has_privs_of(Oid roleid)
/*
* Now safe to assign to state variable
*/
- cached_privs_role = InvalidOid; /* just paranoia */
+ cached_privs_role = InvalidOid; /* just paranoia */
list_free(cached_privs_roles);
cached_privs_roles = new_cached_privs_roles;
cached_privs_role = roleid;
diff --git a/src/backend/utils/adt/array_selfuncs.c b/src/backend/utils/adt/array_selfuncs.c
index 3ae6018c67e..7be5e6c6777 100644
--- a/src/backend/utils/adt/array_selfuncs.c
+++ b/src/backend/utils/adt/array_selfuncs.c
@@ -788,7 +788,7 @@ mcelem_array_contained_selec(Datum *mcelem, int nmcelem,
else
{
if (cmp == 0)
- match = true; /* mcelem is found */
+ match = true; /* mcelem is found */
break;
}
}
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index 1d202dba120..e1ebe576817 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -171,8 +171,8 @@ Datum
array_in(PG_FUNCTION_ARGS)
{
char *string = PG_GETARG_CSTRING(0); /* external form */
- Oid element_type = PG_GETARG_OID(1); /* type of an array
- * element */
+ Oid element_type = PG_GETARG_OID(1); /* type of an array
+ * element */
int32 typmod = PG_GETARG_INT32(2); /* typmod for array elements */
int typlen;
bool typbyval;
@@ -1130,9 +1130,9 @@ array_out(PG_FUNCTION_ARGS)
/* count data plus backslashes; detect chars needing quotes */
if (values[i][0] == '\0')
- needquote = true; /* force quotes for empty string */
+ needquote = true; /* force quotes for empty string */
else if (pg_strcasecmp(values[i], "NULL") == 0)
- needquote = true; /* force quotes for literal NULL */
+ needquote = true; /* force quotes for literal NULL */
else
needquote = false;
@@ -2318,14 +2318,14 @@ array_set_element(Datum arraydatum,
dim[0] += addedbefore;
lb[0] = indx[0];
if (addedbefore > 1)
- newhasnulls = true; /* will insert nulls */
+ newhasnulls = true; /* will insert nulls */
}
if (indx[0] >= (dim[0] + lb[0]))
{
addedafter = indx[0] - (dim[0] + lb[0]) + 1;
dim[0] += addedafter;
if (addedafter > 1)
- newhasnulls = true; /* will insert nulls */
+ newhasnulls = true; /* will insert nulls */
}
}
else
@@ -2575,7 +2575,7 @@ array_set_element_expanded(Datum arraydatum,
lb[0] = indx[0];
dimschanged = true;
if (addedbefore > 1)
- newhasnulls = true; /* will insert nulls */
+ newhasnulls = true; /* will insert nulls */
}
if (indx[0] >= (dim[0] + lb[0]))
{
@@ -2583,7 +2583,7 @@ array_set_element_expanded(Datum arraydatum,
dim[0] += addedafter;
dimschanged = true;
if (addedafter > 1)
- newhasnulls = true; /* will insert nulls */
+ newhasnulls = true; /* will insert nulls */
}
}
else
@@ -2871,7 +2871,7 @@ array_set_slice(Datum arraydatum,
if (lowerIndx[0] < lb[0])
{
if (upperIndx[0] < lb[0] - 1)
- newhasnulls = true; /* will insert nulls */
+ newhasnulls = true; /* will insert nulls */
addedbefore = lb[0] - lowerIndx[0];
dim[0] += addedbefore;
lb[0] = lowerIndx[0];
@@ -2879,7 +2879,7 @@ array_set_slice(Datum arraydatum,
if (upperIndx[0] >= (dim[0] + lb[0]))
{
if (lowerIndx[0] > (dim[0] + lb[0]))
- newhasnulls = true; /* will insert nulls */
+ newhasnulls = true; /* will insert nulls */
addedafter = upperIndx[0] - (dim[0] + lb[0]) + 1;
dim[0] += addedafter;
}
@@ -2956,7 +2956,7 @@ array_set_slice(Datum arraydatum,
ndim, dim, lb,
lowerIndx, upperIndx,
elmlen, elmbyval, elmalign);
- lenbefore = lenafter = 0; /* keep compiler quiet */
+ lenbefore = lenafter = 0; /* keep compiler quiet */
itemsbefore = itemsafter = nolditems = 0;
}
else
@@ -4963,8 +4963,7 @@ initArrayResult(Oid element_type, MemoryContext rcontext, bool subcontext)
MemoryContextAlloc(arr_context, sizeof(ArrayBuildState));
astate->mcontext = arr_context;
astate->private_cxt = subcontext;
- astate->alen = (subcontext ? 64 : 8); /* arbitrary starting array
- * size */
+ astate->alen = (subcontext ? 64 : 8); /* arbitrary starting array size */
astate->dvalues = (Datum *)
MemoryContextAlloc(arr_context, astate->alen * sizeof(Datum));
astate->dnulls = (bool *)
@@ -5140,8 +5139,7 @@ initArrayResultArr(Oid array_type, Oid element_type, MemoryContext rcontext,
bool subcontext)
{
ArrayBuildStateArr *astate;
- MemoryContext arr_context = rcontext; /* by default use the parent
- * ctx */
+ MemoryContext arr_context = rcontext; /* by default use the parent ctx */
/* Lookup element type, unless element_type already provided */
if (!OidIsValid(element_type))
diff --git a/src/backend/utils/adt/ascii.c b/src/backend/utils/adt/ascii.c
index e219d4b4954..362272277f2 100644
--- a/src/backend/utils/adt/ascii.c
+++ b/src/backend/utils/adt/ascii.c
@@ -102,9 +102,9 @@ pg_to_ascii(unsigned char *src, unsigned char *src_end, unsigned char *dest, int
static text *
encode_to_ascii(text *data, int enc)
{
- pg_to_ascii((unsigned char *) VARDATA(data), /* src */
- (unsigned char *) (data) + VARSIZE(data), /* src end */
- (unsigned char *) VARDATA(data), /* dest */
+ pg_to_ascii((unsigned char *) VARDATA(data), /* src */
+ (unsigned char *) (data) + VARSIZE(data), /* src end */
+ (unsigned char *) VARDATA(data), /* dest */
enc); /* encoding */
return data;
diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c
index 677037c246b..7bbc634bd2b 100644
--- a/src/backend/utils/adt/cash.c
+++ b/src/backend/utils/adt/cash.c
@@ -971,10 +971,10 @@ cash_words(PG_FUNCTION_ARGS)
val = (uint64) value;
m0 = val % INT64CONST(100); /* cents */
- m1 = (val / INT64CONST(100)) % 1000; /* hundreds */
- m2 = (val / INT64CONST(100000)) % 1000; /* thousands */
+ m1 = (val / INT64CONST(100)) % 1000; /* hundreds */
+ m2 = (val / INT64CONST(100000)) % 1000; /* thousands */
m3 = (val / INT64CONST(100000000)) % 1000; /* millions */
- m4 = (val / INT64CONST(100000000000)) % 1000; /* billions */
+ m4 = (val / INT64CONST(100000000000)) % 1000; /* billions */
m5 = (val / INT64CONST(100000000000000)) % 1000; /* trillions */
m6 = (val / INT64CONST(100000000000000000)) % 1000; /* quadrillions */
diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c
index 3095047f0b4..2b261cd5bd5 100644
--- a/src/backend/utils/adt/date.c
+++ b/src/backend/utils/adt/date.c
@@ -527,7 +527,7 @@ date_pli(PG_FUNCTION_ARGS)
DateADT result;
if (DATE_NOT_FINITE(dateVal))
- PG_RETURN_DATEADT(dateVal); /* can't change infinity */
+ PG_RETURN_DATEADT(dateVal); /* can't change infinity */
result = dateVal + days;
@@ -551,7 +551,7 @@ date_mii(PG_FUNCTION_ARGS)
DateADT result;
if (DATE_NOT_FINITE(dateVal))
- PG_RETURN_DATEADT(dateVal); /* can't change infinity */
+ PG_RETURN_DATEADT(dateVal); /* can't change infinity */
result = dateVal - days;
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 107b8fdad97..73c4e41213e 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -91,7 +91,7 @@ static const datetkn datetktbl[] = {
/* token, type, value */
{EARLY, RESERV, DTK_EARLY}, /* "-infinity" reserved for "early time" */
{DA_D, ADBC, AD}, /* "ad" for years > 0 */
- {"allballs", RESERV, DTK_ZULU}, /* 00:00:00 */
+ {"allballs", RESERV, DTK_ZULU}, /* 00:00:00 */
{"am", AMPM, AM},
{"apr", MONTH, 4},
{"april", MONTH, 4},
@@ -113,8 +113,8 @@ static const datetkn datetktbl[] = {
{"friday", DOW, 5},
{"h", UNITS, DTK_HOUR}, /* "hour" */
{LATE, RESERV, DTK_LATE}, /* "infinity" reserved for "late time" */
- {INVALID, RESERV, DTK_INVALID}, /* "invalid" reserved for bad time */
- {"isodow", UNITS, DTK_ISODOW}, /* ISO day of week, Sunday == 7 */
+ {INVALID, RESERV, DTK_INVALID}, /* "invalid" reserved for bad time */
+ {"isodow", UNITS, DTK_ISODOW}, /* ISO day of week, Sunday == 7 */
{"isoyear", UNITS, DTK_ISOYEAR}, /* year in terms of the ISO week date */
{"j", UNITS, DTK_JULIAN},
{"jan", MONTH, 1},
@@ -176,33 +176,33 @@ static const datetkn deltatktbl[] = {
{"@", IGNORE_DTF, 0}, /* postgres relative prefix */
{DAGO, AGO, 0}, /* "ago" indicates negative time offset */
{"c", UNITS, DTK_CENTURY}, /* "century" relative */
- {"cent", UNITS, DTK_CENTURY}, /* "century" relative */
+ {"cent", UNITS, DTK_CENTURY}, /* "century" relative */
{"centuries", UNITS, DTK_CENTURY}, /* "centuries" relative */
- {DCENTURY, UNITS, DTK_CENTURY}, /* "century" relative */
+ {DCENTURY, UNITS, DTK_CENTURY}, /* "century" relative */
{"d", UNITS, DTK_DAY}, /* "day" relative */
{DDAY, UNITS, DTK_DAY}, /* "day" relative */
{"days", UNITS, DTK_DAY}, /* "days" relative */
{"dec", UNITS, DTK_DECADE}, /* "decade" relative */
- {DDECADE, UNITS, DTK_DECADE}, /* "decade" relative */
- {"decades", UNITS, DTK_DECADE}, /* "decades" relative */
+ {DDECADE, UNITS, DTK_DECADE}, /* "decade" relative */
+ {"decades", UNITS, DTK_DECADE}, /* "decades" relative */
{"decs", UNITS, DTK_DECADE}, /* "decades" relative */
{"h", UNITS, DTK_HOUR}, /* "hour" relative */
{DHOUR, UNITS, DTK_HOUR}, /* "hour" relative */
{"hours", UNITS, DTK_HOUR}, /* "hours" relative */
{"hr", UNITS, DTK_HOUR}, /* "hour" relative */
{"hrs", UNITS, DTK_HOUR}, /* "hours" relative */
- {INVALID, RESERV, DTK_INVALID}, /* reserved for invalid time */
+ {INVALID, RESERV, DTK_INVALID}, /* reserved for invalid time */
{"m", UNITS, DTK_MINUTE}, /* "minute" relative */
- {"microsecon", UNITS, DTK_MICROSEC}, /* "microsecond" relative */
- {"mil", UNITS, DTK_MILLENNIUM}, /* "millennium" relative */
- {"millennia", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */
- {DMILLENNIUM, UNITS, DTK_MILLENNIUM}, /* "millennium" relative */
- {"millisecon", UNITS, DTK_MILLISEC}, /* relative */
+ {"microsecon", UNITS, DTK_MICROSEC}, /* "microsecond" relative */
+ {"mil", UNITS, DTK_MILLENNIUM}, /* "millennium" relative */
+ {"millennia", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */
+ {DMILLENNIUM, UNITS, DTK_MILLENNIUM}, /* "millennium" relative */
+ {"millisecon", UNITS, DTK_MILLISEC}, /* relative */
{"mils", UNITS, DTK_MILLENNIUM}, /* "millennia" relative */
{"min", UNITS, DTK_MINUTE}, /* "minute" relative */
{"mins", UNITS, DTK_MINUTE}, /* "minutes" relative */
- {DMINUTE, UNITS, DTK_MINUTE}, /* "minute" relative */
- {"minutes", UNITS, DTK_MINUTE}, /* "minutes" relative */
+ {DMINUTE, UNITS, DTK_MINUTE}, /* "minute" relative */
+ {"minutes", UNITS, DTK_MINUTE}, /* "minutes" relative */
{"mon", UNITS, DTK_MONTH}, /* "months" relative */
{"mons", UNITS, DTK_MONTH}, /* "months" relative */
{DMONTH, UNITS, DTK_MONTH}, /* "month" relative */
@@ -213,7 +213,7 @@ static const datetkn deltatktbl[] = {
{"mseconds", UNITS, DTK_MILLISEC},
{"msecs", UNITS, DTK_MILLISEC},
{"qtr", UNITS, DTK_QUARTER}, /* "quarter" relative */
- {DQUARTER, UNITS, DTK_QUARTER}, /* "quarter" relative */
+ {DQUARTER, UNITS, DTK_QUARTER}, /* "quarter" relative */
{"s", UNITS, DTK_SECOND},
{"sec", UNITS, DTK_SECOND},
{DSECOND, UNITS, DTK_SECOND},
@@ -221,13 +221,13 @@ static const datetkn deltatktbl[] = {
{"secs", UNITS, DTK_SECOND},
{DTIMEZONE, UNITS, DTK_TZ}, /* "timezone" time offset */
{"timezone_h", UNITS, DTK_TZ_HOUR}, /* timezone hour units */
- {"timezone_m", UNITS, DTK_TZ_MINUTE}, /* timezone minutes units */
+ {"timezone_m", UNITS, DTK_TZ_MINUTE}, /* timezone minutes units */
{"undefined", RESERV, DTK_INVALID}, /* pre-v6.1 invalid time */
{"us", UNITS, DTK_MICROSEC}, /* "microsecond" relative */
- {"usec", UNITS, DTK_MICROSEC}, /* "microsecond" relative */
+ {"usec", UNITS, DTK_MICROSEC}, /* "microsecond" relative */
{DMICROSEC, UNITS, DTK_MICROSEC}, /* "microsecond" relative */
{"useconds", UNITS, DTK_MICROSEC}, /* "microseconds" relative */
- {"usecs", UNITS, DTK_MICROSEC}, /* "microseconds" relative */
+ {"usecs", UNITS, DTK_MICROSEC}, /* "microseconds" relative */
{"w", UNITS, DTK_WEEK}, /* "week" relative */
{DWEEK, UNITS, DTK_WEEK}, /* "week" relative */
{"weeks", UNITS, DTK_WEEK}, /* "weeks" relative */
@@ -2752,7 +2752,7 @@ DecodeNumber(int flen, char *str, bool haveTextMonth, int fmask,
if (flen >= 3 && *is2digits)
{
/* Guess that first numeric field is day was wrong */
- *tmask = DTK_M(DAY); /* YEAR is already set */
+ *tmask = DTK_M(DAY); /* YEAR is already set */
tm->tm_mday = tm->tm_year;
tm->tm_year = val;
*is2digits = FALSE;
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index 894f026a41b..30746ef908c 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -65,7 +65,7 @@ do { \
/* Configurable GUC parameter */
-int extra_float_digits = 0; /* Added to DBL_DIG or FLT_DIG */
+int extra_float_digits = 0; /* Added to DBL_DIG or FLT_DIG */
/* Cached constants for degree-based trig functions */
static bool degree_consts_set = false;
@@ -105,7 +105,7 @@ static void init_degree_constants(void);
*/
#define cbrt my_cbrt
static double cbrt(double x);
-#endif /* HAVE_CBRT */
+#endif /* HAVE_CBRT */
/*
@@ -329,7 +329,7 @@ float4in(PG_FUNCTION_ARGS)
if (endptr != num && endptr[-1] == '\0')
endptr--;
}
-#endif /* HAVE_BUGGY_SOLARIS_STRTOD */
+#endif /* HAVE_BUGGY_SOLARIS_STRTOD */
/* skip trailing whitespace */
while (*endptr != '\0' && isspace((unsigned char) *endptr))
@@ -555,7 +555,7 @@ float8in_internal(char *num, char **endptr_p,
if (endptr != num && endptr[-1] == '\0')
endptr--;
}
-#endif /* HAVE_BUGGY_SOLARIS_STRTOD */
+#endif /* HAVE_BUGGY_SOLARIS_STRTOD */
/* skip trailing whitespace */
while (*endptr != '\0' && isspace((unsigned char) *endptr))
@@ -3608,4 +3608,4 @@ cbrt(double x)
return isneg ? -tmpres : tmpres;
}
-#endif /* !HAVE_CBRT */
+#endif /* !HAVE_CBRT */
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index ba7e4fc934f..807ce589da8 100644
--- a/src/backend/utils/adt/formatting.c
+++ b/src/backend/utils/adt/formatting.c
@@ -114,8 +114,8 @@
* Maximal length of one node
* ----------
*/
-#define DCH_MAX_ITEM_SIZ 12 /* max localized day name */
-#define NUM_MAX_ITEM_SIZ 8 /* roman number (RN has 15 chars) */
+#define DCH_MAX_ITEM_SIZ 12 /* max localized day name */
+#define NUM_MAX_ITEM_SIZ 8 /* roman number (RN has 15 chars) */
/* ----------
* More is in float.c
@@ -724,7 +724,7 @@ static const KeyWord DCH_keywords[] = {
{"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 */
+ {"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},
@@ -732,11 +732,11 @@ static const KeyWord DCH_keywords[] = {
{"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 */
+ {"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 */
+ {"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},
@@ -744,22 +744,22 @@ static const KeyWord DCH_keywords[] = {
{"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 */
+ {"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 */
+ {"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 */
+ {"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 */
@@ -773,17 +773,17 @@ static const KeyWord DCH_keywords[] = {
{"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 */
+ {"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 */
+ {"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 */
+ {"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},
@@ -791,7 +791,7 @@ static const KeyWord DCH_keywords[] = {
{"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 */
+ {"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},
@@ -802,8 +802,8 @@ static const KeyWord DCH_keywords[] = {
{"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 */
+ {"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 */
@@ -1377,7 +1377,7 @@ dump_node(FormatNode *node, int max)
elog(DEBUG_elog_output, "%d:\t unknown NODE!", a);
}
}
-#endif /* DEBUG */
+#endif /* DEBUG */
/*****************************************************************************
* Private utils
@@ -1491,7 +1491,7 @@ u_strToTitle_default_BI(UChar *dest, int32_t destCapacity,
NULL, locale, pErrorCode);
}
-#endif /* USE_ICU */
+#endif /* USE_ICU */
/*
* If the system provides the needed functions for wide-character manipulation
@@ -1602,7 +1602,7 @@ str_tolower(const char *buff, size_t nbytes, Oid collid)
wchar2char(result, workspace, result_size, mylocale);
pfree(workspace);
}
-#endif /* USE_WIDE_UPPER_LOWER */
+#endif /* USE_WIDE_UPPER_LOWER */
else
{
char *p;
@@ -1725,7 +1725,7 @@ str_toupper(const char *buff, size_t nbytes, Oid collid)
wchar2char(result, workspace, result_size, mylocale);
pfree(workspace);
}
-#endif /* USE_WIDE_UPPER_LOWER */
+#endif /* USE_WIDE_UPPER_LOWER */
else
{
char *p;
@@ -1861,7 +1861,7 @@ str_initcap(const char *buff, size_t nbytes, Oid collid)
wchar2char(result, workspace, result_size, mylocale);
pfree(workspace);
}
-#endif /* USE_WIDE_UPPER_LOWER */
+#endif /* USE_WIDE_UPPER_LOWER */
else
{
char *p;
@@ -2066,7 +2066,7 @@ dump_index(const KeyWord *k, const int *index)
elog(DEBUG_elog_output, "\n\t\tUsed positions: %d,\n\t\tFree positions: %d",
count, free_i);
}
-#endif /* DEBUG */
+#endif /* DEBUG */
/* ----------
* Return TRUE if next format picture is not digit value
@@ -4309,12 +4309,12 @@ NUM_numpart_from_char(NUMProc *Np, int id, int input_len)
if (*Np->inout_p == '-' || (IS_BRACKET(Np->Num) &&
*Np->inout_p == '<'))
{
- *Np->number = '-'; /* set - */
+ *Np->number = '-'; /* set - */
Np->inout_p++;
}
else if (*Np->inout_p == '+')
{
- *Np->number = '+'; /* set + */
+ *Np->number = '+'; /* set + */
Np->inout_p++;
}
}
@@ -4512,7 +4512,7 @@ NUM_numpart_to_char(NUMProc *Np, int id)
{
if (!IS_FILLMODE(Np->Num))
{
- *Np->inout_p = ' '; /* Write + */
+ *Np->inout_p = ' '; /* Write + */
++Np->inout_p;
}
Np->sign_wrote = TRUE;
@@ -4539,7 +4539,7 @@ NUM_numpart_to_char(NUMProc *Np, int id)
*/
if (!IS_FILLMODE(Np->Num))
{
- *Np->inout_p = ' '; /* Write ' ' */
+ *Np->inout_p = ' '; /* Write ' ' */
++Np->inout_p;
}
}
@@ -4608,7 +4608,7 @@ NUM_numpart_to_char(NUMProc *Np, int id)
}
else
{
- *Np->inout_p = *Np->number_p; /* Write DIGIT */
+ *Np->inout_p = *Np->number_p; /* Write DIGIT */
++Np->inout_p;
Np->num_in = TRUE;
}
@@ -4847,7 +4847,7 @@ NUM_processor(FormatNode *node, NUMDesc *Num, char *inout,
if (Np->is_to_char)
{
NUM_numpart_to_char(Np, n->key->id);
- continue; /* for() */
+ continue; /* for() */
}
else
{
diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index 40de01b7bc9..97210e8db3f 100644
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -1598,7 +1598,7 @@ path_inter(PG_FUNCTION_ARGS)
{
if (!p1->closed)
continue;
- iprev = p1->npts - 1; /* include the closure segment */
+ iprev = p1->npts - 1; /* include the closure segment */
}
for (j = 0; j < p2->npts; j++)
@@ -1652,7 +1652,7 @@ path_distance(PG_FUNCTION_ARGS)
{
if (!p1->closed)
continue;
- iprev = p1->npts - 1; /* include the closure segment */
+ iprev = p1->npts - 1; /* include the closure segment */
}
for (j = 0; j < p2->npts; j++)
@@ -1710,7 +1710,7 @@ path_length(PG_FUNCTION_ARGS)
{
if (!path->closed)
continue;
- iprev = path->npts - 1; /* include the closure segment */
+ iprev = path->npts - 1; /* include the closure segment */
}
result += point_dt(&path->p[iprev], &path->p[i]);
@@ -2457,7 +2457,7 @@ dist_ppath(PG_FUNCTION_ARGS)
{
if (!path->closed)
continue;
- iprev = path->npts - 1; /* include the closure segment */
+ iprev = path->npts - 1; /* include the closure segment */
}
statlseg_construct(&lseg, &path->p[iprev], &path->p[i]);
@@ -2776,7 +2776,7 @@ close_ps(PG_FUNCTION_ARGS)
xh = lseg->p[0].x < lseg->p[1].x;
yh = lseg->p[0].y < lseg->p[1].y;
- if (FPeq(lseg->p[0].x, lseg->p[1].x)) /* vertical? */
+ if (FPeq(lseg->p[0].x, lseg->p[1].x)) /* vertical? */
{
#ifdef GEODEBUG
printf("close_ps- segment is vertical\n");
@@ -2822,24 +2822,24 @@ close_ps(PG_FUNCTION_ARGS)
*/
invm = -1.0 / point_sl(&(lseg->p[0]), &(lseg->p[1]));
- tmp = line_construct_pm(&lseg->p[!yh], invm); /* lower edge of the
- * "band" */
+ tmp = line_construct_pm(&lseg->p[!yh], invm); /* lower edge of the
+ * "band" */
if (pt->y < (tmp->A * pt->x + tmp->C))
{ /* we are below the lower edge */
- result = point_copy(&lseg->p[!yh]); /* below the lseg, take lower
- * end pt */
+ result = point_copy(&lseg->p[!yh]); /* below the lseg, take lower end
+ * pt */
#ifdef GEODEBUG
printf("close_ps below: tmp A %f B %f C %f\n",
tmp->A, tmp->B, tmp->C);
#endif
PG_RETURN_POINT_P(result);
}
- tmp = line_construct_pm(&lseg->p[yh], invm); /* upper edge of the
- * "band" */
+ tmp = line_construct_pm(&lseg->p[yh], invm); /* upper edge of the
+ * "band" */
if (pt->y > (tmp->A * pt->x + tmp->C))
{ /* we are below the lower edge */
- result = point_copy(&lseg->p[yh]); /* above the lseg, take higher
- * end pt */
+ result = point_copy(&lseg->p[yh]); /* above the lseg, take higher end
+ * pt */
#ifdef GEODEBUG
printf("close_ps above: tmp A %f B %f C %f\n",
tmp->A, tmp->B, tmp->C);
diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c
index 0c6a412f2aa..e8354dee44b 100644
--- a/src/backend/utils/adt/int8.c
+++ b/src/backend/utils/adt/int8.c
@@ -104,7 +104,7 @@ scanint8(const char *str, bool errorOK, int64 *result)
{
int64 newtmp = tmp * 10 + (*ptr++ - '0');
- if ((newtmp / 10) != tmp) /* overflow? */
+ if ((newtmp / 10) != tmp) /* overflow? */
{
if (errorOK)
return false;
diff --git a/src/backend/utils/adt/json.c b/src/backend/utils/adt/json.c
index 0f99b613f56..8b822b27366 100644
--- a/src/backend/utils/adt/json.c
+++ b/src/backend/utils/adt/json.c
@@ -347,7 +347,7 @@ pg_parse_json(JsonLexContext *lex, JsonSemAction *sem)
parse_array(lex, sem);
break;
default:
- parse_scalar(lex, sem); /* json can be a bare scalar */
+ parse_scalar(lex, sem); /* json can be a bare scalar */
}
lex_expect(JSON_PARSE_END, lex, JSON_TOKEN_END);
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c
index 01df06ebfdb..aa0dc165f02 100644
--- a/src/backend/utils/adt/jsonfuncs.c
+++ b/src/backend/utils/adt/jsonfuncs.c
@@ -57,8 +57,8 @@ typedef struct OkeysState
typedef struct IterateJsonStringValuesState
{
JsonLexContext *lex;
- JsonIterateStringValuesAction action; /* an action that will be
- * applied to each json value */
+ JsonIterateStringValuesAction action; /* an action that will be applied
+ * to each json value */
void *action_state; /* any necessary context for iteration */
} IterateJsonStringValuesState;
@@ -67,8 +67,8 @@ typedef struct TransformJsonStringValuesState
{
JsonLexContext *lex;
StringInfo strval; /* resulting json */
- JsonTransformStringValuesAction action; /* an action that will be
- * applied to each json value */
+ JsonTransformStringValuesAction action; /* an action that will be applied
+ * to each json value */
void *action_state; /* any necessary context for transformation */
} TransformJsonStringValuesState;
@@ -136,7 +136,7 @@ typedef struct JHashState
/* hashtable element */
typedef struct JsonHashEntry
{
- char fname[NAMEDATALEN]; /* hash key (MUST BE FIRST) */
+ char fname[NAMEDATALEN]; /* hash key (MUST BE FIRST) */
char *val;
JsonTokenType type;
} JsonHashEntry;
@@ -2479,7 +2479,7 @@ populate_array_element_end(void *_state, bool isnull)
else if (state->element_scalar)
{
jsv.val.json.str = state->element_scalar;
- jsv.val.json.len = -1; /* null-terminated */
+ jsv.val.json.len = -1; /* null-terminated */
}
else
{
@@ -2545,9 +2545,9 @@ populate_array_json(PopulateArrayContext *ctx, char *json, int len)
* elements and accumulate result using given ArrayBuildState.
*/
static void
-populate_array_dim_jsonb(PopulateArrayContext *ctx, /* context */
- JsonbValue *jbv, /* jsonb sub-array */
- int ndim) /* current dimension */
+populate_array_dim_jsonb(PopulateArrayContext *ctx, /* context */
+ JsonbValue *jbv, /* jsonb sub-array */
+ int ndim) /* current dimension */
{
JsonbContainer *jbc = jbv->val.binary.data;
JsonbIterator *it;
@@ -2812,7 +2812,7 @@ populate_scalar(ScalarIOData *io, Oid typid, int32 typmod, JsValue *jsv)
str = JsonbToCString(NULL, &jsonb->root, VARSIZE(jsonb));
}
- else if (jbv->type == jbvString) /* quotes are stripped */
+ else if (jbv->type == jbvString) /* quotes are stripped */
str = pnstrdup(jbv->val.string.val, jbv->val.string.len);
else if (jbv->type == jbvBool)
str = pstrdup(jbv->val.boolean ? "true" : "false");
@@ -3977,8 +3977,8 @@ addJsonbToParseState(JsonbParseState **jbps, Jsonb *jb)
if (JB_ROOT_IS_SCALAR(jb))
{
- (void) JsonbIteratorNext(&it, &v, false); /* skip array header */
- (void) JsonbIteratorNext(&it, &v, false); /* fetch scalar value */
+ (void) JsonbIteratorNext(&it, &v, false); /* skip array header */
+ (void) JsonbIteratorNext(&it, &v, false); /* fetch scalar value */
switch (o->type)
{
diff --git a/src/backend/utils/adt/like_match.c b/src/backend/utils/adt/like_match.c
index 634953ae672..087a720625b 100644
--- a/src/backend/utils/adt/like_match.c
+++ b/src/backend/utils/adt/like_match.c
@@ -337,7 +337,7 @@ do_like_escape(text *pat, text *esc)
return result;
}
-#endif /* do_like_escape */
+#endif /* do_like_escape */
#ifdef CHAREQ
#undef CHAREQ
diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c
index 38dc1266e04..e3a858c7c7b 100644
--- a/src/backend/utils/adt/nabstime.c
+++ b/src/backend/utils/adt/nabstime.c
@@ -772,7 +772,7 @@ tintervalrecv(PG_FUNCTION_ARGS)
if (tinterval->data[0] == INVALID_ABSTIME ||
tinterval->data[1] == INVALID_ABSTIME)
- status = T_INTERVAL_INVAL; /* undefined */
+ status = T_INTERVAL_INVAL; /* undefined */
else
status = T_INTERVAL_VALID;
@@ -919,7 +919,7 @@ timepl(PG_FUNCTION_ARGS)
if (AbsoluteTimeIsReal(t1) &&
RelativeTimeIsValid(t2) &&
((t2 > 0 && t1 < NOEND_ABSTIME - t2) ||
- (t2 <= 0 && t1 > NOSTART_ABSTIME - t2))) /* prevent overflow */
+ (t2 <= 0 && t1 > NOSTART_ABSTIME - t2))) /* prevent overflow */
PG_RETURN_ABSOLUTETIME(t1 + t2);
PG_RETURN_ABSOLUTETIME(INVALID_ABSTIME);
@@ -1538,7 +1538,7 @@ bogus:
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
errmsg("invalid input syntax for type %s: \"%s\"",
"tinterval", i_string)));
- *i_start = *i_end = INVALID_ABSTIME; /* keep compiler quiet */
+ *i_start = *i_end = INVALID_ABSTIME; /* keep compiler quiet */
}
diff --git a/src/backend/utils/adt/name.c b/src/backend/utils/adt/name.c
index e41ee478eca..974e6e84011 100644
--- a/src/backend/utils/adt/name.c
+++ b/src/backend/utils/adt/name.c
@@ -200,8 +200,7 @@ namecpy(Name n1, Name n2)
int
namecat(Name n1, Name n2)
{
- return namestrcat(n1, NameStr(*n2)); /* n2 can't be any longer than
- * n1 */
+ return namestrcat(n1, NameStr(*n2)); /* n2 can't be any longer than n1 */
}
#endif
@@ -317,9 +316,9 @@ current_schemas(PG_FUNCTION_ARGS)
array = construct_array(names, i,
NAMEOID,
- NAMEDATALEN, /* sizeof(Name) */
- false, /* Name is not by-val */
- 'c'); /* alignment of Name */
+ NAMEDATALEN, /* sizeof(Name) */
+ false, /* Name is not by-val */
+ 'c'); /* alignment of Name */
PG_RETURN_POINTER(array);
}
diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c
index 6cce0f292c3..1a182a0725c 100644
--- a/src/backend/utils/adt/numeric.c
+++ b/src/backend/utils/adt/numeric.c
@@ -1933,7 +1933,7 @@ numeric_abbrev_convert_var(NumericVar *var, NumericSortSupport *nss)
return NumericAbbrevGetDatum(result);
}
-#endif /* NUMERIC_ABBREV_BITS == 64 */
+#endif /* NUMERIC_ABBREV_BITS == 64 */
#if NUMERIC_ABBREV_BITS == 32
@@ -2010,7 +2010,7 @@ numeric_abbrev_convert_var(NumericVar *var, NumericSortSupport *nss)
return NumericAbbrevGetDatum(result);
}
-#endif /* NUMERIC_ABBREV_BITS == 32 */
+#endif /* NUMERIC_ABBREV_BITS == 32 */
/*
* Ordinary (non-sortsupport) comparisons follow.
@@ -4704,7 +4704,7 @@ numeric_stddev_internal(NumericAggState *state,
rscale = vsumX.dscale * 2;
mul_var(&vsumX, &vsumX, &vsumX, rscale); /* vsumX = sumX * sumX */
- mul_var(&vN, &vsumX2, &vsumX2, rscale); /* vsumX2 = N * sumX2 */
+ mul_var(&vN, &vsumX2, &vsumX2, rscale); /* vsumX2 = N * sumX2 */
sub_var(&vsumX2, &vsumX, &vsumX2); /* N * sumX2 - sumX * sumX */
if (cmp_var(&vsumX2, &const_zero) <= 0)
@@ -4715,11 +4715,11 @@ numeric_stddev_internal(NumericAggState *state,
else
{
if (sample)
- mul_var(&vN, &vNminus1, &vNminus1, 0); /* N * (N - 1) */
+ mul_var(&vN, &vNminus1, &vNminus1, 0); /* N * (N - 1) */
else
mul_var(&vN, &vN, &vNminus1, 0); /* N * N */
rscale = select_div_scale(&vsumX2, &vNminus1);
- div_var(&vsumX2, &vNminus1, &vsumX, rscale, true); /* variance */
+ div_var(&vsumX2, &vNminus1, &vsumX, rscale, true); /* variance */
if (!variance)
sqrt_var(&vsumX, &vsumX, rscale); /* stddev */
@@ -5369,7 +5369,7 @@ dump_var(const char *str, NumericVar *var)
printf("\n");
}
-#endif /* NUMERIC_DEBUG */
+#endif /* NUMERIC_DEBUG */
/* ----------------------------------------------------------------------
@@ -8081,7 +8081,7 @@ power_var(NumericVar *base, NumericVar *exp, NumericVar *result)
if (cmp_var(base, &const_zero) == 0)
{
set_var_from_var(&const_zero, result);
- result->dscale = NUMERIC_MIN_SIG_DIGITS; /* no need to round */
+ result->dscale = NUMERIC_MIN_SIG_DIGITS; /* no need to round */
return;
}
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c
index a2855984d51..7554fbb22c3 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -129,7 +129,7 @@ static HTAB *collation_cache = NULL;
#if defined(WIN32) && defined(LC_MESSAGES)
-static char *IsoLocaleName(const char *); /* MSVC specific */
+static char *IsoLocaleName(const char *); /* MSVC specific */
#endif
@@ -174,7 +174,7 @@ pg_perm_setlocale(int category, const char *locale)
else
#endif
result = setlocale(category, locale);
-#endif /* WIN32 */
+#endif /* WIN32 */
if (result == NULL)
return result; /* fall out immediately on failure */
@@ -219,9 +219,9 @@ pg_perm_setlocale(int category, const char *locale)
result = IsoLocaleName(locale);
if (result == NULL)
result = (char *) locale;
-#endif /* WIN32 */
+#endif /* WIN32 */
break;
-#endif /* LC_MESSAGES */
+#endif /* LC_MESSAGES */
case LC_MONETARY:
envvar = "LC_MONETARY";
envbuf = lc_monetary_envbuf;
@@ -752,7 +752,7 @@ strftime_win32(char *dst, size_t dstlen,
/* redefine strftime() */
#define strftime(a,b,c,d) strftime_win32(a,b,c,d)
-#endif /* WIN32 */
+#endif /* WIN32 */
/* Subroutine for cache_locale_time(). */
static void
@@ -972,9 +972,9 @@ IsoLocaleName(const char *winlocname)
return NULL;
#else
return NULL; /* Not supported on this version of msvc/mingw */
-#endif /* _MSC_VER >= 1400 */
+#endif /* _MSC_VER >= 1400 */
}
-#endif /* WIN32 && LC_MESSAGES */
+#endif /* WIN32 && LC_MESSAGES */
/*
@@ -1242,7 +1242,7 @@ report_newlocale_failure(const char *localename)
errdetail("The operating system could not find any locale data for the locale name \"%s\".",
localename) : 0)));
}
-#endif /* HAVE_LOCALE_T */
+#endif /* HAVE_LOCALE_T */
/*
@@ -1346,7 +1346,7 @@ pg_newlocale_from_collation(Oid collid)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("collation provider LIBC is not supported on this platform")));
-#endif /* not HAVE_LOCALE_T */
+#endif /* not HAVE_LOCALE_T */
}
else if (collform->collprovider == COLLPROVIDER_ICU)
{
@@ -1369,7 +1369,7 @@ pg_newlocale_from_collation(Oid collid)
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("ICU is not supported in this build"), \
errhint("You need to rebuild PostgreSQL using --with-icu.")));
-#endif /* not USE_ICU */
+#endif /* not USE_ICU */
}
collversion = SysCacheGetAttr(COLLOID, tp, Anum_pg_collation_collversion,
@@ -1569,7 +1569,7 @@ wchar2char(char *to, const wchar_t *from, size_t tolen, pg_locale_t locale)
}
}
else
-#endif /* WIN32 */
+#endif /* WIN32 */
if (locale == (pg_locale_t) 0)
{
/* Use wcstombs directly for the default locale */
@@ -1588,12 +1588,12 @@ wchar2char(char *to, const wchar_t *from, size_t tolen, pg_locale_t locale)
result = wcstombs(to, from, tolen);
uselocale(save_locale);
-#endif /* HAVE_WCSTOMBS_L */
+#endif /* HAVE_WCSTOMBS_L */
#else /* !HAVE_LOCALE_T */
/* Can't have locale != 0 without HAVE_LOCALE_T */
elog(ERROR, "wcstombs_l is not available");
result = 0; /* keep compiler quiet */
-#endif /* HAVE_LOCALE_T */
+#endif /* HAVE_LOCALE_T */
}
return result;
@@ -1642,7 +1642,7 @@ char2wchar(wchar_t *to, size_t tolen, const char *from, size_t fromlen,
}
}
else
-#endif /* WIN32 */
+#endif /* WIN32 */
{
/* mbstowcs requires ending '\0' */
char *str = pnstrdup(from, fromlen);
@@ -1665,12 +1665,12 @@ char2wchar(wchar_t *to, size_t tolen, const char *from, size_t fromlen,
result = mbstowcs(to, str, tolen);
uselocale(save_locale);
-#endif /* HAVE_MBSTOWCS_L */
+#endif /* HAVE_MBSTOWCS_L */
#else /* !HAVE_LOCALE_T */
/* Can't have locale != 0 without HAVE_LOCALE_T */
elog(ERROR, "mbstowcs_l is not available");
result = 0; /* keep compiler quiet */
-#endif /* HAVE_LOCALE_T */
+#endif /* HAVE_LOCALE_T */
}
pfree(str);
@@ -1697,4 +1697,4 @@ char2wchar(wchar_t *to, size_t tolen, const char *from, size_t fromlen,
return result;
}
-#endif /* USE_WIDE_UPPER_LOWER */
+#endif /* USE_WIDE_UPPER_LOWER */
diff --git a/src/backend/utils/adt/rangetypes_gist.c b/src/backend/utils/adt/rangetypes_gist.c
index f81b16c236c..a1f4f4d3722 100644
--- a/src/backend/utils/adt/rangetypes_gist.c
+++ b/src/backend/utils/adt/rangetypes_gist.c
@@ -70,7 +70,7 @@ typedef enum
typedef struct
{
TypeCacheEntry *typcache; /* typcache for range type */
- bool has_subtype_diff; /* does it have subtype_diff? */
+ bool has_subtype_diff; /* does it have subtype_diff? */
int entries_count; /* total number of entries being split */
/* Information about currently selected split follows */
diff --git a/src/backend/utils/adt/rangetypes_selfuncs.c b/src/backend/utils/adt/rangetypes_selfuncs.c
index c4c549658d2..e803f72924a 100644
--- a/src/backend/utils/adt/rangetypes_selfuncs.c
+++ b/src/backend/utils/adt/rangetypes_selfuncs.c
@@ -251,7 +251,7 @@ calc_rangesel(TypeCacheEntry *typcache, VariableStatData *vardata,
ATTSTATSSLOT_NUMBERS))
{
if (sslot.nnumbers != 1)
- elog(ERROR, "invalid empty fraction statistic"); /* shouldn't happen */
+ elog(ERROR, "invalid empty fraction statistic"); /* shouldn't happen */
empty_frac = sslot.numbers[0];
free_attstatsslot(&sslot);
}
diff --git a/src/backend/utils/adt/rangetypes_typanalyze.c b/src/backend/utils/adt/rangetypes_typanalyze.c
index a8d585ce7ac..879540fc1ae 100644
--- a/src/backend/utils/adt/rangetypes_typanalyze.c
+++ b/src/backend/utils/adt/rangetypes_typanalyze.c
@@ -347,7 +347,7 @@ compute_range_stats(VacAttrStats *stats, AnalyzeAttrFetchFunc fetchfunc,
stats->stats_valid = true;
stats->stanullfrac = 1.0;
stats->stawidth = 0; /* "unknown" */
- stats->stadistinct = 0.0; /* "unknown" */
+ stats->stadistinct = 0.0; /* "unknown" */
}
/*
diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c
index 37139f9647b..1c02f143ba0 100644
--- a/src/backend/utils/adt/ri_triggers.c
+++ b/src/backend/utils/adt/ri_triggers.c
@@ -119,14 +119,11 @@ typedef struct RI_ConstraintInfo
char confdeltype; /* foreign key's ON DELETE action */
char confmatchtype; /* foreign key's match type */
int nkeys; /* number of key columns */
- int16 pk_attnums[RI_MAX_NUMKEYS]; /* attnums of referenced cols */
- int16 fk_attnums[RI_MAX_NUMKEYS]; /* attnums of referencing cols */
- Oid pf_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (PK =
- * FK) */
- Oid pp_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (PK =
- * PK) */
- Oid ff_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (FK =
- * FK) */
+ int16 pk_attnums[RI_MAX_NUMKEYS]; /* attnums of referenced cols */
+ int16 fk_attnums[RI_MAX_NUMKEYS]; /* attnums of referencing cols */
+ Oid pf_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (PK = FK) */
+ Oid pp_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (PK = PK) */
+ Oid ff_eq_oprs[RI_MAX_NUMKEYS]; /* equality operators (FK = FK) */
dlist_node valid_link; /* Link in list of valid entries */
} RI_ConstraintInfo;
@@ -579,7 +576,7 @@ ri_Check_Pk_Match(Relation pk_rel, Relation fk_rel,
result = ri_PerformCheck(riinfo, &qkey, qplan,
fk_rel, pk_rel,
old_row, NULL,
- true, /* treat like update */
+ true, /* treat like update */
SPI_OK_SELECT);
if (SPI_finish() != SPI_OK_FINISH)
@@ -771,7 +768,7 @@ ri_restrict_del(TriggerData *trigdata, bool is_no_action)
ri_PerformCheck(riinfo, &qkey, qplan,
fk_rel, pk_rel,
old_row, NULL,
- true, /* must detect new rows */
+ true, /* must detect new rows */
SPI_OK_SELECT);
if (SPI_finish() != SPI_OK_FINISH)
@@ -994,7 +991,7 @@ ri_restrict_upd(TriggerData *trigdata, bool is_no_action)
ri_PerformCheck(riinfo, &qkey, qplan,
fk_rel, pk_rel,
old_row, NULL,
- true, /* must detect new rows */
+ true, /* must detect new rows */
SPI_OK_SELECT);
if (SPI_finish() != SPI_OK_FINISH)
@@ -1150,7 +1147,7 @@ RI_FKey_cascade_del(PG_FUNCTION_ARGS)
ri_PerformCheck(riinfo, &qkey, qplan,
fk_rel, pk_rel,
old_row, NULL,
- true, /* must detect new rows */
+ true, /* must detect new rows */
SPI_OK_DELETE);
if (SPI_finish() != SPI_OK_FINISH)
@@ -1331,7 +1328,7 @@ RI_FKey_cascade_upd(PG_FUNCTION_ARGS)
ri_PerformCheck(riinfo, &qkey, qplan,
fk_rel, pk_rel,
old_row, new_row,
- true, /* must detect new rows */
+ true, /* must detect new rows */
SPI_OK_UPDATE);
if (SPI_finish() != SPI_OK_FINISH)
@@ -1496,7 +1493,7 @@ RI_FKey_setnull_del(PG_FUNCTION_ARGS)
ri_PerformCheck(riinfo, &qkey, qplan,
fk_rel, pk_rel,
old_row, NULL,
- true, /* must detect new rows */
+ true, /* must detect new rows */
SPI_OK_UPDATE);
if (SPI_finish() != SPI_OK_FINISH)
@@ -1672,7 +1669,7 @@ RI_FKey_setnull_upd(PG_FUNCTION_ARGS)
ri_PerformCheck(riinfo, &qkey, qplan,
fk_rel, pk_rel,
old_row, NULL,
- true, /* must detect new rows */
+ true, /* must detect new rows */
SPI_OK_UPDATE);
if (SPI_finish() != SPI_OK_FINISH)
@@ -1838,7 +1835,7 @@ RI_FKey_setdefault_del(PG_FUNCTION_ARGS)
ri_PerformCheck(riinfo, &qkey, qplan,
fk_rel, pk_rel,
old_row, NULL,
- true, /* must detect new rows */
+ true, /* must detect new rows */
SPI_OK_UPDATE);
if (SPI_finish() != SPI_OK_FINISH)
@@ -2029,7 +2026,7 @@ RI_FKey_setdefault_upd(PG_FUNCTION_ARGS)
ri_PerformCheck(riinfo, &qkey, qplan,
fk_rel, pk_rel,
old_row, NULL,
- true, /* must detect new rows */
+ true, /* must detect new rows */
SPI_OK_UPDATE);
if (SPI_finish() != SPI_OK_FINISH)
@@ -3111,7 +3108,7 @@ ri_PerformCheck(const RI_ConstraintInfo *riinfo,
*/
if (IsolationUsesXactSnapshot() && detectNewRows)
{
- CommandCounterIncrement(); /* be sure all my own work is visible */
+ CommandCounterIncrement(); /* be sure all my own work is visible */
test_snapshot = GetLatestSnapshot();
crosscheck_snapshot = GetTransactionSnapshot();
}
@@ -3584,11 +3581,11 @@ ri_AttributesEqual(Oid eq_opr, Oid typeid,
{
oldvalue = FunctionCall3(&entry->cast_func_finfo,
oldvalue,
- Int32GetDatum(-1), /* typmod */
+ Int32GetDatum(-1), /* typmod */
BoolGetDatum(false)); /* implicit coercion */
newvalue = FunctionCall3(&entry->cast_func_finfo,
newvalue,
- Int32GetDatum(-1), /* typmod */
+ Int32GetDatum(-1), /* typmod */
BoolGetDatum(false)); /* implicit coercion */
}
@@ -3663,7 +3660,7 @@ ri_HashCompareOp(Oid eq_opr, Oid typeid)
op_input_types(eq_opr, &lefttype, &righttype);
Assert(lefttype == righttype);
if (typeid == lefttype)
- castfunc = InvalidOid; /* simplest case */
+ castfunc = InvalidOid; /* simplest case */
else
{
pathtype = find_coercion_pathway(lefttype, typeid,
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 5f3f7968d55..b8ad47a20c8 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -83,7 +83,7 @@
#define PRETTYINDENT_JOIN 4
#define PRETTYINDENT_VAR 4
-#define PRETTYINDENT_LIMIT 40 /* wrap limit */
+#define PRETTYINDENT_LIMIT 40 /* wrap limit */
/* Pretty flags */
#define PRETTYFLAG_PAREN 1
@@ -113,8 +113,8 @@ typedef struct
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 */
- ParseExprKind special_exprkind; /* set only for exprkinds needing
- * special handling */
+ ParseExprKind special_exprkind; /* set only for exprkinds needing special
+ * handling */
} deparse_context;
/*
@@ -280,7 +280,7 @@ typedef struct
*/
typedef struct
{
- char name[NAMEDATALEN]; /* Hash key --- must be first */
+ char name[NAMEDATALEN]; /* Hash key --- must be first */
int counter; /* Largest addition used so far for name */
} NameHashEntry;
@@ -2566,7 +2566,7 @@ pg_get_functiondef(PG_FUNCTION_ARGS)
if (!isnull)
{
simple_quote_literal(&buf, TextDatumGetCString(tmp));
- appendStringInfoString(&buf, ", "); /* assume prosrc isn't null */
+ appendStringInfoString(&buf, ", "); /* assume prosrc isn't null */
}
tmp = SysCacheGetAttr(PROCOID, proctup, Anum_pg_proc_prosrc, &isnull);
@@ -7376,14 +7376,14 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags)
}
case T_BoolExpr: /* lower precedence */
case T_ArrayRef: /* other separators */
- case T_ArrayExpr: /* other separators */
+ case T_ArrayExpr: /* other separators */
case T_RowExpr: /* other separators */
case T_CoalesceExpr: /* own parentheses */
- case T_MinMaxExpr: /* own parentheses */
+ case T_MinMaxExpr: /* own parentheses */
case T_XmlExpr: /* own parentheses */
- case T_NullIfExpr: /* other separators */
+ case T_NullIfExpr: /* other separators */
case T_Aggref: /* own parentheses */
- case T_WindowFunc: /* own parentheses */
+ case T_WindowFunc: /* own parentheses */
case T_CaseExpr: /* other separators */
return true;
default:
@@ -7426,14 +7426,14 @@ isSimpleNode(Node *node, Node *parentNode, int prettyFlags)
return true; /* own parentheses */
}
case T_ArrayRef: /* other separators */
- case T_ArrayExpr: /* other separators */
+ case T_ArrayExpr: /* other separators */
case T_RowExpr: /* other separators */
case T_CoalesceExpr: /* own parentheses */
- case T_MinMaxExpr: /* own parentheses */
+ case T_MinMaxExpr: /* own parentheses */
case T_XmlExpr: /* own parentheses */
- case T_NullIfExpr: /* other separators */
+ case T_NullIfExpr: /* other separators */
case T_Aggref: /* own parentheses */
- case T_WindowFunc: /* own parentheses */
+ case T_WindowFunc: /* own parentheses */
case T_CaseExpr: /* other separators */
return true;
default:
@@ -9219,7 +9219,7 @@ get_const_expr(Const *constval, deparse_context *context, int showtype)
else
{
appendStringInfo(buf, "'%s'", extval);
- needlabel = true; /* we must attach a cast */
+ needlabel = true; /* we must attach a cast */
}
break;
@@ -9238,7 +9238,7 @@ get_const_expr(Const *constval, deparse_context *context, int showtype)
else
{
appendStringInfo(buf, "'%s'", extval);
- needlabel = true; /* we must attach a cast */
+ needlabel = true; /* we must attach a cast */
}
break;
@@ -9432,7 +9432,7 @@ get_sublink_expr(SubLink *sublink, deparse_context *context)
break;
case ANY_SUBLINK:
- if (strcmp(opname, "=") == 0) /* Represent = ANY as IN */
+ if (strcmp(opname, "=") == 0) /* Represent = ANY as IN */
appendStringInfoString(buf, " IN ");
else
appendStringInfo(buf, " %s ANY ", opname);
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 33788a2b364..63a25db5d39 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -811,7 +811,7 @@ ineq_histogram_selectivity(PlannerInfo *root,
*/
double histfrac;
int lobound = 0; /* first possible slot to search */
- int hibound = sslot.nvalues; /* last+1 slot to search */
+ int hibound = sslot.nvalues; /* last+1 slot to search */
bool have_end = false;
/*
@@ -1805,7 +1805,7 @@ scalararraysel(PlannerInfo *root,
/* get nominal (after relabeling) element type of rightop */
nominal_element_type = get_base_element_type(exprType(rightop));
if (!OidIsValid(nominal_element_type))
- return (Selectivity) 0.5; /* probably shouldn't happen */
+ return (Selectivity) 0.5; /* probably shouldn't happen */
/* get nominal collation, too, for generating constants */
nominal_element_collation = exprCollation(rightop);
@@ -4510,10 +4510,10 @@ get_join_variables(PlannerInfo *root, List *args, SpecialJoinInfo *sjinfo,
if (vardata1->rel &&
bms_is_subset(vardata1->rel->relids, sjinfo->syn_righthand))
- *join_is_reversed = true; /* var1 is on RHS */
+ *join_is_reversed = true; /* var1 is on RHS */
else if (vardata2->rel &&
bms_is_subset(vardata2->rel->relids, sjinfo->syn_lefthand))
- *join_is_reversed = true; /* var2 is on LHS */
+ *join_is_reversed = true; /* var2 is on LHS */
else
*join_is_reversed = false;
}
@@ -5331,7 +5331,7 @@ get_actual_variable_range(PlannerInfo *root, VariableStatData *vardata,
ScanKeyEntryInitialize(&scankeys[0],
SK_ISNULL | SK_SEARCHNOTNULL,
1, /* index col to scan */
- InvalidStrategy, /* no strategy */
+ InvalidStrategy, /* no strategy */
InvalidOid, /* no strategy subtype */
InvalidOid, /* no collation */
InvalidOid, /* no reg proc for this */
@@ -5725,7 +5725,7 @@ pattern_fixed_prefix(Const *patt, Pattern_Type ptype, Oid collation,
break;
default:
elog(ERROR, "unrecognized ptype: %d", (int) ptype);
- result = Pattern_Prefix_None; /* keep compiler quiet */
+ result = Pattern_Prefix_None; /* keep compiler quiet */
break;
}
return result;
@@ -5931,8 +5931,7 @@ regex_selectivity_sub(const char *patt, int pattlen, bool case_insensitive)
negclass = true;
pos++;
}
- if (patt[pos] == ']') /* ']' at start of class is not
- * special */
+ if (patt[pos] == ']') /* ']' at start of class is not special */
pos++;
while (pos < pattlen && patt[pos] != ']')
pos++;
@@ -6430,7 +6429,7 @@ orderby_operands_eval_cost(PlannerInfo *root, IndexPath *path)
{
elog(ERROR, "unsupported indexorderby type: %d",
(int) nodeTag(clause));
- other_operand = NULL; /* keep compiler quiet */
+ other_operand = NULL; /* keep compiler quiet */
}
cost_qual_eval_node(&index_qual_cost, other_operand, root);
diff --git a/src/backend/utils/adt/tsquery.c b/src/backend/utils/adt/tsquery.c
index 41e1ecd70f2..53e36afbe8e 100644
--- a/src/backend/utils/adt/tsquery.c
+++ b/src/backend/utils/adt/tsquery.c
@@ -234,8 +234,8 @@ gettoken_query(TSQueryParserState state,
case WAITOPERAND:
if (t_iseq(state->buf, '!'))
{
- (state->buf)++; /* can safely ++, t_iseq guarantee
- * that pg_mblen()==1 */
+ (state->buf)++; /* can safely ++, t_iseq guarantee that
+ * pg_mblen()==1 */
*operator = OP_NOT;
state->state = WAITOPERAND;
return PT_OPR;
@@ -542,7 +542,7 @@ findoprnd_recurse(QueryItem *ptr, uint32 *pos, int nnodes, bool *needcleanup)
if (ptr[*pos].qoperator.oper == OP_NOT)
{
- ptr[*pos].qoperator.left = 1; /* fixed offset */
+ ptr[*pos].qoperator.left = 1; /* fixed offset */
(*pos)++;
/* process the only argument */
@@ -551,7 +551,7 @@ findoprnd_recurse(QueryItem *ptr, uint32 *pos, int nnodes, bool *needcleanup)
else
{
QueryOperator *curitem = &ptr[*pos].qoperator;
- int tmp = *pos; /* save current position */
+ int tmp = *pos; /* save current position */
Assert(curitem->oper == OP_AND ||
curitem->oper == OP_OR ||
@@ -1056,7 +1056,7 @@ tsqueryrecv(PG_FUNCTION_ARGS)
*/
operands[i] = val;
- datalen += val_len + 1; /* + 1 for the '\0' terminator */
+ datalen += val_len + 1; /* + 1 for the '\0' terminator */
}
else if (item->type == QI_OPR)
{
diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c
index a41eb1fa9c4..4577bcc0b8b 100644
--- a/src/backend/utils/adt/tsrank.c
+++ b/src/backend/utils/adt/tsrank.c
@@ -908,8 +908,8 @@ calc_rank_cd(const float4 *arrdata, TSVector txt, TSQuery query, int method)
Wdoc += Cpos / ((double) (1 + nNoise));
CurExtPos = ((double) (ext.q + ext.p)) / 2.0;
- if (NExtent > 0 && CurExtPos > PrevExtPos /* prevent division by
- * zero in a case of
+ if (NExtent > 0 && CurExtPos > PrevExtPos /* prevent division by
+ * zero in a case of
* multiple lexize */ )
SumDist += 1.0 / (CurExtPos - PrevExtPos);
diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c
index 89aa0f1b32b..66c5255f8b4 100644
--- a/src/backend/utils/adt/tsvector_op.c
+++ b/src/backend/utils/adt/tsvector_op.c
@@ -2466,7 +2466,7 @@ tsvector_update_trigger(PG_FUNCTION_ARGS, bool config_column)
Oid cfgId;
/* Check call context */
- if (!CALLED_AS_TRIGGER(fcinfo)) /* internal error */
+ if (!CALLED_AS_TRIGGER(fcinfo)) /* internal error */
elog(ERROR, "tsvector_update_trigger: not fired by trigger manager");
trigdata = (TriggerData *) fcinfo->context;
diff --git a/src/backend/utils/adt/varbit.c b/src/backend/utils/adt/varbit.c
index e947785d818..41238dd763f 100644
--- a/src/backend/utils/adt/varbit.c
+++ b/src/backend/utils/adt/varbit.c
@@ -1131,8 +1131,8 @@ bitoverlay(PG_FUNCTION_ARGS)
{
VarBit *t1 = PG_GETARG_VARBIT_P(0);
VarBit *t2 = PG_GETARG_VARBIT_P(1);
- int sp = PG_GETARG_INT32(2); /* substring start position */
- int sl = PG_GETARG_INT32(3); /* substring length */
+ int sp = PG_GETARG_INT32(2); /* substring start position */
+ int sl = PG_GETARG_INT32(3); /* substring length */
PG_RETURN_VARBIT_P(bit_overlay(t1, t2, sp, sl));
}
@@ -1142,7 +1142,7 @@ bitoverlay_no_len(PG_FUNCTION_ARGS)
{
VarBit *t1 = PG_GETARG_VARBIT_P(0);
VarBit *t2 = PG_GETARG_VARBIT_P(1);
- int sp = PG_GETARG_INT32(2); /* substring start position */
+ int sp = PG_GETARG_INT32(2); /* substring start position */
int sl;
sl = VARBITLEN(t2); /* defaults to length(t2) */
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index cb1fd4d9cef..be53f7d60d2 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -268,7 +268,7 @@ byteain(PG_FUNCTION_ARGS)
bc = (len - 2) / 2 + VARHDRSZ; /* maximum possible length */
result = palloc(bc);
bc = hex_decode(inputText + 2, len - 2, VARDATA(result));
- SET_VARSIZE(result, bc + VARHDRSZ); /* actual length */
+ SET_VARSIZE(result, bc + VARHDRSZ); /* actual length */
PG_RETURN_BYTEA_P(result);
}
@@ -823,8 +823,8 @@ text_substring(Datum str, int32 start, int32 length, bool length_not_specified)
{
S1 = Max(S, 1);
- if (length_not_specified) /* special case - get length to end of
- * string */
+ if (length_not_specified) /* special case - get length to end of
+ * string */
L1 = -1;
else
{
@@ -888,8 +888,8 @@ text_substring(Datum str, int32 start, int32 length, bool length_not_specified)
*/
slice_start = 0;
- if (length_not_specified) /* special case - get length to end of
- * string */
+ if (length_not_specified) /* special case - get length to end of
+ * string */
slice_size = L1 = -1;
else
{
@@ -1012,8 +1012,8 @@ textoverlay(PG_FUNCTION_ARGS)
{
text *t1 = PG_GETARG_TEXT_PP(0);
text *t2 = PG_GETARG_TEXT_PP(1);
- int sp = PG_GETARG_INT32(2); /* substring start position */
- int sl = PG_GETARG_INT32(3); /* substring length */
+ int sp = PG_GETARG_INT32(2); /* substring start position */
+ int sl = PG_GETARG_INT32(3); /* substring length */
PG_RETURN_TEXT_P(text_overlay(t1, t2, sp, sl));
}
@@ -1023,10 +1023,10 @@ textoverlay_no_len(PG_FUNCTION_ARGS)
{
text *t1 = PG_GETARG_TEXT_PP(0);
text *t2 = PG_GETARG_TEXT_PP(1);
- int sp = PG_GETARG_INT32(2); /* substring start position */
+ int sp = PG_GETARG_INT32(2); /* substring start position */
int sl;
- sl = text_length(PointerGetDatum(t2)); /* defaults to length(t2) */
+ sl = text_length(PointerGetDatum(t2)); /* defaults to length(t2) */
PG_RETURN_TEXT_P(text_overlay(t1, t2, sp, sl));
}
@@ -1520,7 +1520,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid)
return result;
}
-#endif /* WIN32 */
+#endif /* WIN32 */
if (len1 >= TEXTBUFLEN)
a1p = (char *) palloc(len1 + 1);
@@ -1573,7 +1573,7 @@ varstr_cmp(char *arg1, int len1, char *arg2, int len2, Oid collid)
#else /* not USE_ICU */
/* shouldn't happen */
elog(ERROR, "unsupported collprovider: %c", mylocale->provider);
-#endif /* not USE_ICU */
+#endif /* not USE_ICU */
}
else
{
@@ -2159,7 +2159,7 @@ varstrfastcmp_locale(Datum x, Datum y, SortSupport ssup)
#else /* not USE_ICU */
/* shouldn't happen */
elog(ERROR, "unsupported collprovider: %c", sss->locale->provider);
-#endif /* not USE_ICU */
+#endif /* not USE_ICU */
}
else
{
@@ -2899,8 +2899,8 @@ byteaoverlay(PG_FUNCTION_ARGS)
{
bytea *t1 = PG_GETARG_BYTEA_PP(0);
bytea *t2 = PG_GETARG_BYTEA_PP(1);
- int sp = PG_GETARG_INT32(2); /* substring start position */
- int sl = PG_GETARG_INT32(3); /* substring length */
+ int sp = PG_GETARG_INT32(2); /* substring start position */
+ int sl = PG_GETARG_INT32(3); /* substring length */
PG_RETURN_BYTEA_P(bytea_overlay(t1, t2, sp, sl));
}
@@ -2910,7 +2910,7 @@ byteaoverlay_no_len(PG_FUNCTION_ARGS)
{
bytea *t1 = PG_GETARG_BYTEA_PP(0);
bytea *t2 = PG_GETARG_BYTEA_PP(1);
- int sp = PG_GETARG_INT32(2); /* substring start position */
+ int sp = PG_GETARG_INT32(2); /* substring start position */
int sl;
sl = VARSIZE_ANY_EXHDR(t2); /* defaults to length(t2) */
@@ -3273,7 +3273,7 @@ SplitIdentifierString(char *rawstring, char separator,
{
endp = strchr(nextp + 1, '"');
if (endp == NULL)
- return false; /* mismatched quotes */
+ return false; /* mismatched quotes */
if (endp[1] != '"')
break; /* found end of quoted name */
/* Collapse adjacent quotes into one quote, and look again */
@@ -3400,7 +3400,7 @@ SplitDirectoriesString(char *rawstring, char separator,
{
endp = strchr(nextp + 1, '"');
if (endp == NULL)
- return false; /* mismatched quotes */
+ return false; /* mismatched quotes */
if (endp[1] != '"')
break; /* found end of quoted name */
/* Collapse adjacent quotes into one quote, and look again */
@@ -3932,7 +3932,7 @@ replace_text_regexp(text *src_text, void *regexp,
data,
data_len,
search_start,
- NULL, /* no details */
+ NULL, /* no details */
REGEXP_REPLACE_BACKREF_CNT,
pmatch,
0);
@@ -4251,7 +4251,7 @@ text_to_array_internal(PG_FUNCTION_ARGS)
/* start_ptr points to the start_posn'th character of inputstring */
start_ptr = VARDATA_ANY(inputstring);
- for (fldnum = 1;; fldnum++) /* field number is 1 based */
+ for (fldnum = 1;; fldnum++) /* field number is 1 based */
{
CHECK_FOR_INTERRUPTS();
@@ -4695,7 +4695,7 @@ string_agg_transfn(PG_FUNCTION_ARGS)
else if (!PG_ARGISNULL(2))
appendStringInfoText(state, PG_GETARG_TEXT_PP(2)); /* delimiter */
- appendStringInfoText(state, PG_GETARG_TEXT_PP(1)); /* value */
+ appendStringInfoText(state, PG_GETARG_TEXT_PP(1)); /* value */
}
/*
diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
index cdcd45419a4..0ed679eea69 100644
--- a/src/backend/utils/adt/xml.c
+++ b/src/backend/utils/adt/xml.c
@@ -65,7 +65,7 @@
#if LIBXML_VERSION >= 20704
#define HAVE_XMLSTRUCTUREDERRORCONTEXT 1
#endif
-#endif /* USE_LIBXML */
+#endif /* USE_LIBXML */
#include "access/htup_details.h"
#include "catalog/namespace.h"
@@ -133,7 +133,7 @@ static void *xml_palloc(size_t size);
static void *xml_repalloc(void *ptr, size_t size);
static void xml_pfree(void *ptr);
static char *xml_pstrdup(const char *string);
-#endif /* USE_LIBXMLCONTEXT */
+#endif /* USE_LIBXMLCONTEXT */
static xmlChar *xml_text2xmlChar(text *in);
static int parse_xml_decl(const xmlChar *str, size_t *lenp,
@@ -147,7 +147,7 @@ static int xml_xpathobjtoxmlarray(xmlXPathObjectPtr xpathobj,
ArrayBuildState *astate,
PgXmlErrorContext *xmlerrcxt);
static xmlChar *pg_xmlCharStrndup(char *str, size_t len);
-#endif /* USE_LIBXML */
+#endif /* USE_LIBXML */
static void xmldata_root_element_start(StringInfo result, const char *eltname,
const char *xmlschema, const char *targetns,
@@ -924,7 +924,7 @@ xml_is_document(xmltype *arg)
#else /* not USE_LIBXML */
NO_XML_SUPPORT();
return false;
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
@@ -1405,7 +1405,7 @@ xml_parse(text *data, XmlOptionType xmloption_arg, bool preserve_whitespace,
volatile xmlParserCtxtPtr ctxt = NULL;
volatile xmlDocPtr doc = NULL;
- len = VARSIZE_ANY_EXHDR(data); /* will be useful later */
+ len = VARSIZE_ANY_EXHDR(data); /* will be useful later */
string = xml_text2xmlChar(data);
utf8string = pg_do_encoding_conversion(string,
@@ -1555,7 +1555,7 @@ xml_pstrdup(const char *string)
{
return MemoryContextStrdup(LibxmlContext, string);
}
-#endif /* USE_LIBXMLCONTEXT */
+#endif /* USE_LIBXMLCONTEXT */
/*
@@ -1887,7 +1887,7 @@ is_valid_xml_namechar(pg_wchar c)
|| xmlIsCombiningQ(c)
|| xmlIsExtenderQ(c));
}
-#endif /* USE_LIBXML */
+#endif /* USE_LIBXML */
/*
@@ -1942,7 +1942,7 @@ map_sql_identifier_to_xml_name(char *ident, bool fully_escaped,
#else /* not USE_LIBXML */
NO_XML_SUPPORT();
return NULL;
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
@@ -2201,7 +2201,7 @@ map_sql_value_to_xml_value(Datum value, Oid type, bool xml_escape_strings)
return result;
}
-#endif /* USE_LIBXML */
+#endif /* USE_LIBXML */
}
@@ -3942,7 +3942,7 @@ xpath_internal(text *xpath_expr_text, xmltype *data, ArrayType *namespaces,
if (xmlXPathRegisterNs(xpathctx,
(xmlChar *) ns_name,
(xmlChar *) ns_uri) != 0)
- ereport(ERROR, /* is this an internal error??? */
+ ereport(ERROR, /* is this an internal error??? */
(errmsg("could not register XML namespace with name \"%s\" and URI \"%s\"",
ns_name, ns_uri)));
}
@@ -4000,7 +4000,7 @@ xpath_internal(text *xpath_expr_text, xmltype *data, ArrayType *namespaces,
pg_xml_done(xmlerrcxt, false);
}
-#endif /* USE_LIBXML */
+#endif /* USE_LIBXML */
/*
* Evaluate XPath expression and return array of XML values.
@@ -4115,7 +4115,7 @@ xml_is_well_formed(PG_FUNCTION_ARGS)
#else
NO_XML_SUPPORT();
return 0;
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
Datum
@@ -4128,7 +4128,7 @@ xml_is_well_formed_document(PG_FUNCTION_ARGS)
#else
NO_XML_SUPPORT();
return 0;
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
Datum
@@ -4141,7 +4141,7 @@ xml_is_well_formed_content(PG_FUNCTION_ARGS)
#else
NO_XML_SUPPORT();
return 0;
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
/*
@@ -4221,7 +4221,7 @@ XmlTableInitOpaque(TableFuncScanState *state, int natts)
state->opaque = xtCxt;
#else
NO_XML_SUPPORT();
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
/*
@@ -4281,7 +4281,7 @@ XmlTableSetDocument(TableFuncScanState *state, Datum value)
xtCxt->xpathcxt = xpathcxt;
#else
NO_XML_SUPPORT();
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
/*
@@ -4307,7 +4307,7 @@ XmlTableSetNamespace(TableFuncScanState *state, char *name, char *uri)
"could not set XML namespace");
#else
NO_XML_SUPPORT();
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
/*
@@ -4336,7 +4336,7 @@ XmlTableSetRowFilter(TableFuncScanState *state, char *path)
"invalid XPath expression");
#else
NO_XML_SUPPORT();
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
/*
@@ -4367,7 +4367,7 @@ XmlTableSetColumnFilter(TableFuncScanState *state, char *path, int colnum)
"invalid XPath expression");
#else
NO_XML_SUPPORT();
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
/*
@@ -4415,7 +4415,7 @@ XmlTableFetchRow(TableFuncScanState *state)
#else
NO_XML_SUPPORT();
return false;
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
/*
@@ -4585,7 +4585,7 @@ XmlTableGetValue(TableFuncScanState *state, int colnum,
#else
NO_XML_SUPPORT();
return 0;
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
/*
@@ -4631,5 +4631,5 @@ XmlTableDestroyOpaque(TableFuncScanState *state)
#else
NO_XML_SUPPORT();
-#endif /* not USE_LIBXML */
+#endif /* not USE_LIBXML */
}
diff --git a/src/backend/utils/cache/attoptcache.c b/src/backend/utils/cache/attoptcache.c
index 4b30e6bc624..da8b42ddb8d 100644
--- a/src/backend/utils/cache/attoptcache.c
+++ b/src/backend/utils/cache/attoptcache.c
@@ -111,8 +111,7 @@ get_attribute_options(Oid attrelid, int attnum)
/* Find existing cache entry, if any. */
if (!AttoptCacheHash)
InitializeAttoptCache();
- memset(&key, 0, sizeof(key)); /* make sure any padding bits are
- * unset */
+ memset(&key, 0, sizeof(key)); /* make sure any padding bits are unset */
key.attrelid = attrelid;
key.attnum = attnum;
attopt =
diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c
index 74bfd56169a..e7e8e3b54c5 100644
--- a/src/backend/utils/cache/catcache.c
+++ b/src/backend/utils/cache/catcache.c
@@ -339,7 +339,7 @@ CatCachePrintStats(int code, Datum arg)
cc_lsearches,
cc_lhits);
}
-#endif /* CATCACHE_STATS */
+#endif /* CATCACHE_STATS */
/*
diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c
index 055705136a9..5652c3abe07 100644
--- a/src/backend/utils/cache/inval.c
+++ b/src/backend/utils/cache/inval.c
@@ -121,7 +121,7 @@
*/
typedef struct InvalidationChunk
{
- struct InvalidationChunk *next; /* list link */
+ struct InvalidationChunk *next; /* list link */
int nitems; /* # items currently stored in chunk */
int maxitems; /* size of allocated array in this chunk */
SharedInvalidationMessage msgs[FLEXIBLE_ARRAY_MEMBER];
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index 4def73ddfbe..82763f8013d 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -2770,7 +2770,7 @@ get_typmodout(Oid typid)
else
return InvalidOid;
}
-#endif /* NOT_USED */
+#endif /* NOT_USED */
/*
* get_typcollation
diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cache/plancache.c
index 4b5f8107ef0..dfe5592a25a 100644
--- a/src/backend/utils/cache/plancache.c
+++ b/src/backend/utils/cache/plancache.c
@@ -157,7 +157,7 @@ CreateCachedPlan(RawStmt *raw_parse_tree,
MemoryContext source_context;
MemoryContext oldcxt;
- Assert(query_string != NULL); /* required as of 8.4 */
+ Assert(query_string != NULL); /* required as of 8.4 */
/*
* Make a dedicated memory context for the CachedPlanSource and its
@@ -238,7 +238,7 @@ CreateOneShotCachedPlan(RawStmt *raw_parse_tree,
{
CachedPlanSource *plansource;
- Assert(query_string != NULL); /* required as of 8.4 */
+ Assert(query_string != NULL); /* required as of 8.4 */
/*
* Create and fill the CachedPlanSource struct within the caller's memory
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index c2e8361f2f4..93bcac1e776 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -1371,7 +1371,7 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
/*
* initialize the relation lock manager information
*/
- RelationInitLockInfo(relation); /* see lmgr.c */
+ RelationInitLockInfo(relation); /* see lmgr.c */
/*
* initialize physical addressing information for the relation
@@ -2011,7 +2011,7 @@ formrdesc(const char *relationName, Oid relationReltype,
/*
* initialize the relation lock manager information
*/
- RelationInitLockInfo(relation); /* see lmgr.c */
+ RelationInitLockInfo(relation); /* see lmgr.c */
/*
* initialize physical addressing information for the relation
@@ -2423,7 +2423,7 @@ RelationClearRelation(Relation relation, bool rebuild)
if (relation->rd_rel->relkind == RELKIND_INDEX)
{
- relation->rd_isvalid = false; /* needs to be revalidated */
+ relation->rd_isvalid = false; /* needs to be revalidated */
if (relation->rd_refcnt > 1 && IsTransactionState())
RelationReloadIndexInfo(relation);
}
@@ -3657,7 +3657,7 @@ RelationCacheInitializePhase3(void)
formrdesc("pg_type", TypeRelation_Rowtype_Id, false,
true, Natts_pg_type, Desc_pg_type);
-#define NUM_CRITICAL_LOCAL_RELS 4 /* fix if you change list above */
+#define NUM_CRITICAL_LOCAL_RELS 4 /* fix if you change list above */
}
MemoryContextSwitchTo(oldcxt);
@@ -3960,7 +3960,7 @@ BuildHardcodedDescriptor(int natts, const FormData_pg_attribute *attrs,
oldcxt = MemoryContextSwitchTo(CacheMemoryContext);
result = CreateTemplateTupleDesc(natts, hasoids);
- result->tdtypeid = RECORDOID; /* not right, but we don't care */
+ result->tdtypeid = RECORDOID; /* not right, but we don't care */
result->tdtypmod = -1;
for (i = 0; i < natts; i++)
@@ -4239,7 +4239,7 @@ RelationGetFKeyList(Relation relation)
elog(ERROR, "null conkey for rel %s",
RelationGetRelationName(relation));
- arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */
+ arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */
nelem = ARR_DIMS(arr)[0];
if (ARR_NDIM(arr) != 1 ||
nelem < 1 ||
@@ -4258,7 +4258,7 @@ RelationGetFKeyList(Relation relation)
elog(ERROR, "null confkey for rel %s",
RelationGetRelationName(relation));
- arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */
+ arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */
nelem = ARR_DIMS(arr)[0];
if (ARR_NDIM(arr) != 1 ||
nelem != info->nkeys ||
@@ -4275,7 +4275,7 @@ RelationGetFKeyList(Relation relation)
elog(ERROR, "null conpfeqop for rel %s",
RelationGetRelationName(relation));
- arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */
+ arr = DatumGetArrayTypeP(adatum); /* ensure not toasted */
nelem = ARR_DIMS(arr)[0];
if (ARR_NDIM(arr) != 1 ||
nelem != info->nkeys ||
@@ -5448,7 +5448,7 @@ load_relcache_init_file(bool shared)
rel->rd_att->tdrefcount = 1; /* mark as refcounted */
rel->rd_att->tdtypeid = relform->reltype;
- rel->rd_att->tdtypmod = -1; /* unnecessary, but... */
+ rel->rd_att->tdtypmod = -1; /* unnecessary, but... */
/* next read all the attribute tuple form data entries */
has_not_null = false;
@@ -5473,7 +5473,7 @@ load_relcache_init_file(bool shared)
if (fread(rel->rd_options, 1, len, fp) != len)
goto read_failed;
if (len != VARSIZE(rel->rd_options))
- goto read_failed; /* sanity check */
+ goto read_failed; /* sanity check */
}
else
{
diff --git a/src/backend/utils/cache/relfilenodemap.c b/src/backend/utils/cache/relfilenodemap.c
index 612f0f3a0d1..3e811e1c9b6 100644
--- a/src/backend/utils/cache/relfilenodemap.c
+++ b/src/backend/utils/cache/relfilenodemap.c
@@ -68,9 +68,9 @@ RelfilenodeMapInvalidateCallback(Datum arg, Oid relid)
* all entries, otherwise just remove the specific relation's entry.
* Always remove negative cache entries.
*/
- if (relid == InvalidOid || /* complete reset */
- entry->relid == InvalidOid || /* negative cache entry */
- entry->relid == relid) /* individual flushed relation */
+ if (relid == InvalidOid || /* complete reset */
+ entry->relid == InvalidOid || /* negative cache entry */
+ entry->relid == relid) /* individual flushed relation */
{
if (hash_search(RelfilenodeMapHash,
(void *) &entry->key,
diff --git a/src/backend/utils/cache/relmapper.c b/src/backend/utils/cache/relmapper.c
index 047c5b40e84..6836c601e0e 100644
--- a/src/backend/utils/cache/relmapper.c
+++ b/src/backend/utils/cache/relmapper.c
@@ -72,9 +72,9 @@
*/
#define RELMAPPER_FILENAME "pg_filenode.map"
-#define RELMAPPER_FILEMAGIC 0x592717 /* version ID value */
+#define RELMAPPER_FILEMAGIC 0x592717 /* version ID value */
-#define MAX_MAPPINGS 62 /* 62 * 8 + 16 = 512 */
+#define MAX_MAPPINGS 62 /* 62 * 8 + 16 = 512 */
typedef struct RelMapping
{
diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c
index e66bb03ea57..607fe9db79b 100644
--- a/src/backend/utils/cache/syscache.c
+++ b/src/backend/utils/cache/syscache.c
@@ -419,7 +419,7 @@ static const struct cachedesc cacheinfo[] = {
},
8
},
- {ForeignDataWrapperRelationId, /* FOREIGNDATAWRAPPERNAME */
+ {ForeignDataWrapperRelationId, /* FOREIGNDATAWRAPPERNAME */
ForeignDataWrapperNameIndexId,
1,
{
@@ -430,7 +430,7 @@ static const struct cachedesc cacheinfo[] = {
},
2
},
- {ForeignDataWrapperRelationId, /* FOREIGNDATAWRAPPEROID */
+ {ForeignDataWrapperRelationId, /* FOREIGNDATAWRAPPEROID */
ForeignDataWrapperOidIndexId,
1,
{
@@ -683,7 +683,7 @@ static const struct cachedesc cacheinfo[] = {
},
128
},
- {ReplicationOriginRelationId, /* REPLORIGIDENT */
+ {ReplicationOriginRelationId, /* REPLORIGIDENT */
ReplicationOriginIdentIndex,
1,
{
@@ -694,7 +694,7 @@ static const struct cachedesc cacheinfo[] = {
},
16
},
- {ReplicationOriginRelationId, /* REPLORIGNAME */
+ {ReplicationOriginRelationId, /* REPLORIGNAME */
ReplicationOriginNameIndex,
1,
{
diff --git a/src/backend/utils/cache/typcache.c b/src/backend/utils/cache/typcache.c
index 6ba199b40df..7ec31eb3e32 100644
--- a/src/backend/utils/cache/typcache.c
+++ b/src/backend/utils/cache/typcache.c
@@ -152,7 +152,7 @@ static HTAB *RecordCacheHash = NULL;
static TupleDesc *RecordCacheArray = NULL;
static int32 RecordCacheArrayLen = 0; /* allocated length of array */
-static int32 NextRecordTypmod = 0; /* number of entries used */
+static int32 NextRecordTypmod = 0; /* number of entries used */
static void load_typcache_tupdesc(TypeCacheEntry *typentry);
static void load_rangetype_info(TypeCacheEntry *typentry);
@@ -572,7 +572,7 @@ load_typcache_tupdesc(TypeCacheEntry *typentry)
{
Relation rel;
- if (!OidIsValid(typentry->typrelid)) /* should not happen */
+ if (!OidIsValid(typentry->typrelid)) /* should not happen */
elog(ERROR, "invalid typrelid for composite type %u",
typentry->type_id);
rel = relation_open(typentry->typrelid, AccessShareLock);
diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c
index cad75c80d8f..234c8e3aa96 100644
--- a/src/backend/utils/error/elog.c
+++ b/src/backend/utils/error/elog.c
@@ -102,7 +102,7 @@ emit_log_hook_type emit_log_hook = NULL;
/* GUC parameters */
int Log_error_verbosity = PGERROR_VERBOSE;
-char *Log_line_prefix = NULL; /* format for extra log line info */
+char *Log_line_prefix = NULL; /* format for extra log line info */
int Log_destination = LOG_DESTINATION_STDERR;
char *Log_destination_string = NULL;
bool syslog_sequence_numbers = true;
@@ -356,7 +356,7 @@ errstart(int elevel, const char *filename, int lineno,
* because it suggests an infinite loop of errors during error
* recovery.
*/
- errordata_stack_depth = -1; /* make room on stack */
+ errordata_stack_depth = -1; /* make room on stack */
ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded")));
}
@@ -1317,7 +1317,7 @@ elog_start(const char *filename, int lineno, const char *funcname)
* else failure to convert it to client encoding could cause further
* recursion.
*/
- errordata_stack_depth = -1; /* make room on stack */
+ errordata_stack_depth = -1; /* make room on stack */
ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded")));
}
@@ -1684,7 +1684,7 @@ ReThrowError(ErrorData *edata)
* because it suggests an infinite loop of errors during error
* recovery.
*/
- errordata_stack_depth = -1; /* make room on stack */
+ errordata_stack_depth = -1; /* make room on stack */
ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded")));
}
@@ -1810,7 +1810,7 @@ GetErrorContextStack(void)
* because it suggests an infinite loop of errors during error
* recovery.
*/
- errordata_stack_depth = -1; /* make room on stack */
+ errordata_stack_depth = -1; /* make room on stack */
ereport(PANIC, (errmsg_internal("ERRORDATA_STACK_SIZE exceeded")));
}
@@ -2047,7 +2047,7 @@ write_syslog(int level, const char *line)
syslog(level, "%s", line);
}
}
-#endif /* HAVE_SYSLOG */
+#endif /* HAVE_SYSLOG */
#ifdef WIN32
/*
@@ -2151,7 +2151,7 @@ write_eventlog(int level, const char *line, int len)
&line,
NULL);
}
-#endif /* WIN32 */
+#endif /* WIN32 */
static void
write_console(const char *line, int len)
@@ -2997,7 +2997,7 @@ send_message_to_server_log(ErrorData *edata)
write_syslog(syslog_level, buf.data);
}
-#endif /* HAVE_SYSLOG */
+#endif /* HAVE_SYSLOG */
#ifdef WIN32
/* Write to eventlog, if enabled */
@@ -3005,7 +3005,7 @@ send_message_to_server_log(ErrorData *edata)
{
write_eventlog(edata->elevel, buf.data, buf.len);
}
-#endif /* WIN32 */
+#endif /* WIN32 */
/* Write to stderr, if enabled */
if ((Log_destination & LOG_DESTINATION_STDERR) || whereToSendOutput == DestDebug)
@@ -3273,7 +3273,7 @@ send_message_to_frontend(ErrorData *edata)
err_sendstring(&msgbuf, edata->funcname);
}
- pq_sendbyte(&msgbuf, '\0'); /* terminator */
+ pq_sendbyte(&msgbuf, '\0'); /* terminator */
}
else
{
diff --git a/src/backend/utils/fmgr/dfmgr.c b/src/backend/utils/fmgr/dfmgr.c
index bfd1b118500..0783145a16e 100644
--- a/src/backend/utils/fmgr/dfmgr.c
+++ b/src/backend/utils/fmgr/dfmgr.c
@@ -48,7 +48,7 @@ typedef struct df_files
ino_t inode; /* Inode number of file */
#endif
void *handle; /* a handle for pg_dl* functions */
- char filename[FLEXIBLE_ARRAY_MEMBER]; /* Full pathname of file */
+ char filename[FLEXIBLE_ARRAY_MEMBER]; /* Full pathname of file */
} DynamicFileList;
static DynamicFileList *file_list = NULL;
@@ -448,7 +448,7 @@ internal_unload_library(const char *libname)
else
prv = file_scanner;
}
-#endif /* NOT_USED */
+#endif /* NOT_USED */
}
static bool
diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c
index 0382c158c54..fe268e7d44d 100644
--- a/src/backend/utils/fmgr/fmgr.c
+++ b/src/backend/utils/fmgr/fmgr.c
@@ -46,7 +46,7 @@ typedef struct
TransactionId fn_xmin; /* for checking up-to-dateness */
ItemPointerData fn_tid;
PGFunction user_fn; /* the function's address */
- const Pg_finfo_record *inforec; /* address of its info record */
+ const Pg_finfo_record *inforec; /* address of its info record */
} CFuncHashTabEntry;
static HTAB *CFuncHash = NULL;
@@ -172,7 +172,7 @@ fmgr_info_cxt_security(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt,
finfo->fn_nargs = fbp->nargs;
finfo->fn_strict = fbp->strict;
finfo->fn_retset = fbp->retset;
- finfo->fn_stats = TRACK_FUNC_ALL; /* ie, never track */
+ finfo->fn_stats = TRACK_FUNC_ALL; /* ie, never track */
finfo->fn_addr = fbp->func;
finfo->fn_oid = functionId;
return;
@@ -208,7 +208,7 @@ fmgr_info_cxt_security(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt,
FmgrHookIsNeeded(functionId)))
{
finfo->fn_addr = fmgr_security_definer;
- finfo->fn_stats = TRACK_FUNC_ALL; /* ie, never track */
+ finfo->fn_stats = TRACK_FUNC_ALL; /* ie, never track */
finfo->fn_oid = functionId;
ReleaseSysCache(procedureTuple);
return;
@@ -1795,7 +1795,7 @@ Int64GetDatum(int64 X)
*retval = X;
return PointerGetDatum(retval);
}
-#endif /* USE_FLOAT8_BYVAL */
+#endif /* USE_FLOAT8_BYVAL */
#ifndef USE_FLOAT4_BYVAL
diff --git a/src/backend/utils/fmgr/funcapi.c b/src/backend/utils/fmgr/funcapi.c
index af08f102fe5..6324220426b 100644
--- a/src/backend/utils/fmgr/funcapi.c
+++ b/src/backend/utils/fmgr/funcapi.c
@@ -814,7 +814,7 @@ get_func_arg_info(HeapTuple procTup,
* deconstruct_array() since the array data is just going to look like
* a C array of values.
*/
- arr = DatumGetArrayTypeP(proallargtypes); /* ensure not toasted */
+ arr = DatumGetArrayTypeP(proallargtypes); /* ensure not toasted */
numargs = ARR_DIMS(arr)[0];
if (ARR_NDIM(arr) != 1 ||
numargs < 0 ||
@@ -953,7 +953,7 @@ get_func_input_arg_names(Datum proargnames, Datum proargmodes,
* For proargmodes, we don't need to use deconstruct_array() since the
* array data is just going to look like a C array of values.
*/
- arr = DatumGetArrayTypeP(proargnames); /* ensure not toasted */
+ arr = DatumGetArrayTypeP(proargnames); /* ensure not toasted */
if (ARR_NDIM(arr) != 1 ||
ARR_HASNULL(arr) ||
ARR_ELEMTYPE(arr) != TEXTOID)
@@ -1200,7 +1200,7 @@ build_function_result_tupdesc_d(Datum proallargtypes,
ARR_ELEMTYPE(arr) != OIDOID)
elog(ERROR, "proallargtypes is not a 1-D Oid array");
argtypes = (Oid *) ARR_DATA_PTR(arr);
- arr = DatumGetArrayTypeP(proargmodes); /* ensure not toasted */
+ arr = DatumGetArrayTypeP(proargmodes); /* ensure not toasted */
if (ARR_NDIM(arr) != 1 ||
ARR_DIMS(arr)[0] != numargs ||
ARR_HASNULL(arr) ||
diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c
index 578b1daccf2..111d63df2b6 100644
--- a/src/backend/utils/hash/dynahash.c
+++ b/src/backend/utils/hash/dynahash.c
@@ -352,7 +352,7 @@ hash_create(const char *tabname, long nelem, HASHCTL *info, int flags)
hashp->hash = tag_hash;
}
else
- hashp->hash = string_hash; /* default hash function */
+ hashp->hash = string_hash; /* default hash function */
/*
* If you don't specify a match function, it defaults to string_compare if
@@ -1417,7 +1417,7 @@ hash_seq_search(HASH_SEQ_STATUS *status)
/* Begin scan of curBucket... */
status->curEntry = curElem->link;
- if (status->curEntry == NULL) /* end of this bucket */
+ if (status->curEntry == NULL) /* end of this bucket */
++curBucket;
status->curBucket = curBucket;
return (void *) ELEMENTKEY(curElem);
@@ -1740,7 +1740,7 @@ next_pow2_int(long num)
#define MAX_SEQ_SCANS 100
static HTAB *seq_scan_tables[MAX_SEQ_SCANS]; /* tables being scanned */
-static int seq_scan_level[MAX_SEQ_SCANS]; /* subtransaction nest level */
+static int seq_scan_level[MAX_SEQ_SCANS]; /* subtransaction nest level */
static int num_seq_scans = 0;
diff --git a/src/backend/utils/init/globals.c b/src/backend/utils/init/globals.c
index 8000b79e5aa..7c09498dc04 100644
--- a/src/backend/utils/init/globals.c
+++ b/src/backend/utils/init/globals.c
@@ -62,10 +62,10 @@ char *DataDir = NULL;
char OutputFileName[MAXPGPATH]; /* debugging output file */
char my_exec_path[MAXPGPATH]; /* full path to my executable */
-char pkglib_path[MAXPGPATH]; /* full path to lib directory */
+char pkglib_path[MAXPGPATH]; /* full path to lib directory */
#ifdef EXEC_BACKEND
-char postgres_exec_path[MAXPGPATH]; /* full path to backend */
+char postgres_exec_path[MAXPGPATH]; /* full path to backend */
/* note: currently this is not valid in backend processes */
#endif
@@ -126,7 +126,7 @@ int max_worker_processes = 8;
int max_parallel_workers = 8;
int MaxBackends = 0;
-int VacuumCostPageHit = 1; /* GUC parameters for vacuum */
+int VacuumCostPageHit = 1; /* GUC parameters for vacuum */
int VacuumCostPageMiss = 10;
int VacuumCostPageDirty = 20;
int VacuumCostLimit = 200;
@@ -136,5 +136,5 @@ int VacuumPageHit = 0;
int VacuumPageMiss = 0;
int VacuumPageDirty = 0;
-int VacuumCostBalance = 0; /* working state for vacuum */
+int VacuumCostBalance = 0; /* working state for vacuum */
bool VacuumCostActive = false;
diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c
index 64b3785d7bb..1c75e6357ec 100644
--- a/src/backend/utils/init/miscinit.c
+++ b/src/backend/utils/init/miscinit.c
@@ -1137,8 +1137,8 @@ TouchSocketLockFiles(void)
read(fd, buffer, sizeof(buffer));
close(fd);
}
-#endif /* HAVE_UTIMES */
-#endif /* HAVE_UTIME */
+#endif /* HAVE_UTIMES */
+#endif /* HAVE_UTIME */
}
}
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index b8b4a06350c..56b4a5b8c3e 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -275,7 +275,7 @@ PerformAuthentication(Port *port)
set_ps_display("startup", false);
- ClientAuthInProgress = false; /* client_min_messages is active now */
+ ClientAuthInProgress = false; /* client_min_messages is active now */
}
diff --git a/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c b/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c
index c55bcc978cf..83c2712eba7 100644
--- a/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c
+++ b/src/backend/utils/mb/conversion_procs/euc2004_sjis2004/euc2004_sjis2004.c
@@ -261,7 +261,7 @@ shift_jis_20042euc_jis_2004(const unsigned char *sjis, unsigned char *p, int len
/*
* JIS X 0213
*/
- if (c1 >= 0x81 && c1 <= 0x9f) /* plane 1 1ku-62ku */
+ if (c1 >= 0x81 && c1 <= 0x9f) /* plane 1 1ku-62ku */
{
ku = (c1 << 1) - 0x100;
ten = get_ten(c2, &kubun);
diff --git a/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c b/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c
index 09002a77d8a..1d9b10f8a7a 100644
--- a/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c
+++ b/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/big5.c
@@ -22,7 +22,7 @@ typedef struct
} codes_t;
/* map Big5 Level 1 to CNS 11643-1992 Plane 1 */
-static const codes_t big5Level1ToCnsPlane1[25] = { /* range */
+static const codes_t big5Level1ToCnsPlane1[25] = { /* range */
{0xA140, 0x2121},
{0xA1F6, 0x2258},
{0xA1F7, 0x2257},
@@ -51,7 +51,7 @@ static const codes_t big5Level1ToCnsPlane1[25] = { /* range */
};
/* map CNS 11643-1992 Plane 1 to Big5 Level 1 */
-static const codes_t cnsPlane1ToBig5Level1[26] = { /* range */
+static const codes_t cnsPlane1ToBig5Level1[26] = { /* range */
{0x2121, 0xA140},
{0x2257, 0xA1F7},
{0x2258, 0xA1F6},
@@ -81,7 +81,7 @@ static const codes_t cnsPlane1ToBig5Level1[26] = { /* range */
};
/* map Big5 Level 2 to CNS 11643-1992 Plane 2 */
-static const codes_t big5Level2ToCnsPlane2[48] = { /* range */
+static const codes_t big5Level2ToCnsPlane2[48] = { /* range */
{0xC940, 0x2121},
{0xc94a, 0x0000},
{0xC94B, 0x212B},
@@ -133,7 +133,7 @@ static const codes_t big5Level2ToCnsPlane2[48] = { /* range */
};
/* map CNS 11643-1992 Plane 2 to Big5 Level 2 */
-static const codes_t cnsPlane2ToBig5Level2[49] = { /* range */
+static const codes_t cnsPlane2ToBig5Level2[49] = { /* range */
{0x2121, 0xC940},
{0x212B, 0xC94B},
{0x214C, 0xC9BE},
diff --git a/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c b/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c
index ac0bc915ede..4e47cf66c50 100644
--- a/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c
+++ b/src/backend/utils/mb/conversion_procs/utf8_and_iso8859/utf8_and_iso8859.c
@@ -60,37 +60,37 @@ PG_FUNCTION_INFO_V1(utf8_to_iso8859);
typedef struct
{
pg_enc encoding;
- const pg_mb_radix_tree *map1; /* to UTF8 map name */
- const pg_mb_radix_tree *map2; /* from UTF8 map name */
+ const pg_mb_radix_tree *map1; /* to UTF8 map name */
+ const pg_mb_radix_tree *map2; /* from UTF8 map name */
} pg_conv_map;
static const pg_conv_map maps[] = {
{PG_LATIN2, &iso8859_2_to_unicode_tree,
- &iso8859_2_from_unicode_tree}, /* ISO-8859-2 Latin 2 */
+ &iso8859_2_from_unicode_tree}, /* ISO-8859-2 Latin 2 */
{PG_LATIN3, &iso8859_3_to_unicode_tree,
- &iso8859_3_from_unicode_tree}, /* ISO-8859-3 Latin 3 */
+ &iso8859_3_from_unicode_tree}, /* ISO-8859-3 Latin 3 */
{PG_LATIN4, &iso8859_4_to_unicode_tree,
- &iso8859_4_from_unicode_tree}, /* ISO-8859-4 Latin 4 */
+ &iso8859_4_from_unicode_tree}, /* ISO-8859-4 Latin 4 */
{PG_LATIN5, &iso8859_9_to_unicode_tree,
- &iso8859_9_from_unicode_tree}, /* ISO-8859-9 Latin 5 */
+ &iso8859_9_from_unicode_tree}, /* ISO-8859-9 Latin 5 */
{PG_LATIN6, &iso8859_10_to_unicode_tree,
- &iso8859_10_from_unicode_tree}, /* ISO-8859-10 Latin 6 */
+ &iso8859_10_from_unicode_tree}, /* ISO-8859-10 Latin 6 */
{PG_LATIN7, &iso8859_13_to_unicode_tree,
- &iso8859_13_from_unicode_tree}, /* ISO-8859-13 Latin 7 */
+ &iso8859_13_from_unicode_tree}, /* ISO-8859-13 Latin 7 */
{PG_LATIN8, &iso8859_14_to_unicode_tree,
- &iso8859_14_from_unicode_tree}, /* ISO-8859-14 Latin 8 */
+ &iso8859_14_from_unicode_tree}, /* ISO-8859-14 Latin 8 */
{PG_LATIN9, &iso8859_15_to_unicode_tree,
- &iso8859_15_from_unicode_tree}, /* ISO-8859-15 Latin 9 */
+ &iso8859_15_from_unicode_tree}, /* ISO-8859-15 Latin 9 */
{PG_LATIN10, &iso8859_16_to_unicode_tree,
- &iso8859_16_from_unicode_tree}, /* ISO-8859-16 Latin 10 */
+ &iso8859_16_from_unicode_tree}, /* ISO-8859-16 Latin 10 */
{PG_ISO_8859_5, &iso8859_5_to_unicode_tree,
- &iso8859_5_from_unicode_tree}, /* ISO-8859-5 */
+ &iso8859_5_from_unicode_tree}, /* ISO-8859-5 */
{PG_ISO_8859_6, &iso8859_6_to_unicode_tree,
- &iso8859_6_from_unicode_tree}, /* ISO-8859-6 */
+ &iso8859_6_from_unicode_tree}, /* ISO-8859-6 */
{PG_ISO_8859_7, &iso8859_7_to_unicode_tree,
- &iso8859_7_from_unicode_tree}, /* ISO-8859-7 */
+ &iso8859_7_from_unicode_tree}, /* ISO-8859-7 */
{PG_ISO_8859_8, &iso8859_8_to_unicode_tree,
- &iso8859_8_from_unicode_tree}, /* ISO-8859-8 */
+ &iso8859_8_from_unicode_tree}, /* ISO-8859-8 */
};
Datum
diff --git a/src/backend/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c b/src/backend/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c
index 971de32f6c2..cec458c9f41 100644
--- a/src/backend/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c
+++ b/src/backend/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c
@@ -56,8 +56,8 @@ PG_FUNCTION_INFO_V1(utf8_to_win);
typedef struct
{
pg_enc encoding;
- const pg_mb_radix_tree *map1; /* to UTF8 map name */
- const pg_mb_radix_tree *map2; /* from UTF8 map name */
+ const pg_mb_radix_tree *map1; /* to UTF8 map name */
+ const pg_mb_radix_tree *map2; /* from UTF8 map name */
} pg_conv_map;
static const pg_conv_map maps[] = {
diff --git a/src/backend/utils/mb/encnames.c b/src/backend/utils/mb/encnames.c
index f97505e55af..12b61cd3db9 100644
--- a/src/backend/utils/mb/encnames.c
+++ b/src/backend/utils/mb/encnames.c
@@ -476,7 +476,7 @@ get_encoding_name_for_icu(int encoding)
return icu_encoding_name;
}
-#endif /* not FRONTEND */
+#endif /* not FRONTEND */
/* ----------
diff --git a/src/backend/utils/mb/wchar.c b/src/backend/utils/mb/wchar.c
index 9334039f78c..b71b5e016a3 100644
--- a/src/backend/utils/mb/wchar.c
+++ b/src/backend/utils/mb/wchar.c
@@ -85,14 +85,14 @@ pg_euc2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
*to = (SS2 << 8) | *from++;
len -= 2;
}
- else if (*from == SS3 && len >= 3) /* JIS X 0212 KANJI */
+ else if (*from == SS3 && len >= 3) /* JIS X 0212 KANJI */
{
from++;
*to = (SS3 << 16) | (*from++ << 8);
*to |= *from++;
len -= 3;
}
- else if (IS_HIGHBIT_SET(*from) && len >= 2) /* JIS X 0208 KANJI */
+ else if (IS_HIGHBIT_SET(*from) && len >= 2) /* JIS X 0208 KANJI */
{
*to = *from++ << 8;
*to |= *from++;
@@ -212,14 +212,14 @@ pg_euccn2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
*to |= *from++;
len -= 3;
}
- else if (*from == SS3 && len >= 3) /* code set 3 (unused ?) */
+ else if (*from == SS3 && len >= 3) /* code set 3 (unused ?) */
{
from++;
*to = (SS3 << 16) | (*from++ << 8);
*to |= *from++;
len -= 3;
}
- else if (IS_HIGHBIT_SET(*from) && len >= 2) /* code set 1 */
+ else if (IS_HIGHBIT_SET(*from) && len >= 2) /* code set 1 */
{
*to = *from++ << 8;
*to |= *from++;
@@ -280,14 +280,14 @@ pg_euctw2wchar_with_len(const unsigned char *from, pg_wchar *to, int len)
*to |= *from++;
len -= 4;
}
- else if (*from == SS3 && len >= 3) /* code set 3 (unused?) */
+ else if (*from == SS3 && len >= 3) /* code set 3 (unused?) */
{
from++;
*to = (SS3 << 16) | (*from++ << 8);
*to |= *from++;
len -= 3;
}
- else if (IS_HIGHBIT_SET(*from) && len >= 2) /* code set 2 */
+ else if (IS_HIGHBIT_SET(*from) && len >= 2) /* code set 2 */
{
*to = *from++ << 8;
*to |= *from++;
@@ -984,7 +984,7 @@ pg_sjis_dsplen(const unsigned char *s)
else if (IS_HIGHBIT_SET(*s))
len = 2; /* kanji? */
else
- len = pg_ascii_dsplen(s); /* should be ASCII */
+ len = pg_ascii_dsplen(s); /* should be ASCII */
return len;
}
@@ -1011,7 +1011,7 @@ pg_big5_dsplen(const unsigned char *s)
if (IS_HIGHBIT_SET(*s))
len = 2; /* kanji? */
else
- len = pg_ascii_dsplen(s); /* should be ASCII */
+ len = pg_ascii_dsplen(s); /* should be ASCII */
return len;
}
@@ -1038,7 +1038,7 @@ pg_gbk_dsplen(const unsigned char *s)
if (IS_HIGHBIT_SET(*s))
len = 2; /* kanji? */
else
- len = pg_ascii_dsplen(s); /* should be ASCII */
+ len = pg_ascii_dsplen(s); /* should be ASCII */
return len;
}
@@ -1065,7 +1065,7 @@ pg_uhc_dsplen(const unsigned char *s)
if (IS_HIGHBIT_SET(*s))
len = 2; /* 2byte? */
else
- len = pg_ascii_dsplen(s); /* should be ASCII */
+ len = pg_ascii_dsplen(s); /* should be ASCII */
return len;
}
@@ -1095,7 +1095,7 @@ pg_gb18030_dsplen(const unsigned char *s)
if (IS_HIGHBIT_SET(*s))
len = 2;
else
- len = pg_ascii_dsplen(s); /* ASCII */
+ len = pg_ascii_dsplen(s); /* ASCII */
return len;
}
@@ -1157,7 +1157,7 @@ pg_eucjp_verifier(const unsigned char *s, int len)
break;
default:
- if (IS_HIGHBIT_SET(c1)) /* JIS X 0208? */
+ if (IS_HIGHBIT_SET(c1)) /* JIS X 0208? */
{
l = 2;
if (l > len)
@@ -1241,7 +1241,7 @@ pg_euctw_verifier(const unsigned char *s, int len)
return -1;
default:
- if (IS_HIGHBIT_SET(c1)) /* CNS 11643 Plane 1 */
+ if (IS_HIGHBIT_SET(c1)) /* CNS 11643 Plane 1 */
{
l = 2;
if (l > len)
@@ -1683,7 +1683,7 @@ pg_eucjp_increment(unsigned char *charptr, int length)
return false;
default:
- if (IS_HIGHBIT_SET(c1)) /* JIS X 0208? */
+ if (IS_HIGHBIT_SET(c1)) /* JIS X 0208? */
{
if (length != 2)
return false;
@@ -1717,7 +1717,7 @@ pg_eucjp_increment(unsigned char *charptr, int length)
return true;
}
-#endif /* !FRONTEND */
+#endif /* !FRONTEND */
/*
@@ -1734,40 +1734,40 @@ const pg_wchar_tbl pg_wchar_table[] = {
{pg_euctw2wchar_with_len, pg_wchar2euc_with_len, pg_euctw_mblen, pg_euctw_dsplen, pg_euctw_verifier, 4}, /* PG_EUC_TW */
{pg_eucjp2wchar_with_len, pg_wchar2euc_with_len, pg_eucjp_mblen, pg_eucjp_dsplen, pg_eucjp_verifier, 3}, /* PG_EUC_JIS_2004 */
{pg_utf2wchar_with_len, pg_wchar2utf_with_len, pg_utf_mblen, pg_utf_dsplen, pg_utf8_verifier, 4}, /* PG_UTF8 */
- {pg_mule2wchar_with_len, pg_wchar2mule_with_len, pg_mule_mblen, pg_mule_dsplen, pg_mule_verifier, 4}, /* PG_MULE_INTERNAL */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN1 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN2 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN3 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN4 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN5 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN6 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN7 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN8 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN9 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN10 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1256 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1258 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN866 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN874 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_KOI8R */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1251 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1252 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-5 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-6 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-7 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-8 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1250 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1253 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1254 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1255 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1257 */
- {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_KOI8U */
+ {pg_mule2wchar_with_len, pg_wchar2mule_with_len, pg_mule_mblen, pg_mule_dsplen, pg_mule_verifier, 4}, /* PG_MULE_INTERNAL */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN1 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN2 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN3 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN4 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN5 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN6 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN7 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN8 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN9 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_LATIN10 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1256 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1258 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN866 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN874 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_KOI8R */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1251 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1252 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-5 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-6 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-7 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* ISO-8859-8 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1250 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1253 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1254 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1255 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_WIN1257 */
+ {pg_latin12wchar_with_len, pg_wchar2single_with_len, pg_latin1_mblen, pg_latin1_dsplen, pg_latin1_verifier, 1}, /* PG_KOI8U */
{0, 0, pg_sjis_mblen, pg_sjis_dsplen, pg_sjis_verifier, 2}, /* PG_SJIS */
{0, 0, pg_big5_mblen, pg_big5_dsplen, pg_big5_verifier, 2}, /* PG_BIG5 */
{0, 0, pg_gbk_mblen, pg_gbk_dsplen, pg_gbk_verifier, 2}, /* PG_GBK */
{0, 0, pg_uhc_mblen, pg_uhc_dsplen, pg_uhc_verifier, 2}, /* PG_UHC */
- {0, 0, pg_gb18030_mblen, pg_gb18030_dsplen, pg_gb18030_verifier, 4}, /* PG_GB18030 */
- {0, 0, pg_johab_mblen, pg_johab_dsplen, pg_johab_verifier, 3}, /* PG_JOHAB */
+ {0, 0, pg_gb18030_mblen, pg_gb18030_dsplen, pg_gb18030_verifier, 4}, /* PG_GB18030 */
+ {0, 0, pg_johab_mblen, pg_johab_dsplen, pg_johab_verifier, 3}, /* PG_JOHAB */
{0, 0, pg_sjis_mblen, pg_sjis_dsplen, pg_sjis_verifier, 2} /* PG_SHIFT_JIS_2004 */
};
@@ -2051,4 +2051,4 @@ report_untranslatable_char(int src_encoding, int dest_encoding,
pg_enc2name_tbl[dest_encoding].name)));
}
-#endif /* !FRONTEND */
+#endif /* !FRONTEND */
diff --git a/src/backend/utils/misc/backend_random.c b/src/backend/utils/misc/backend_random.c
index 9a0b2ce9ebc..4f18656fdaf 100644
--- a/src/backend/utils/misc/backend_random.c
+++ b/src/backend/utils/misc/backend_random.c
@@ -155,4 +155,4 @@ pg_backend_random(char *dst, int len)
}
-#endif /* HAVE_STRONG_RANDOM */
+#endif /* HAVE_STRONG_RANDOM */
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index d9469e4181d..f96a556a5e2 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -438,8 +438,8 @@ bool Debug_pretty_print = true;
bool log_parser_stats = false;
bool log_planner_stats = false;
bool log_executor_stats = false;
-bool log_statement_stats = false; /* this is sort of all three
- * above together */
+bool log_statement_stats = false; /* this is sort of all three above
+ * together */
bool log_btree_build_stats = false;
char *event_source;
@@ -7040,7 +7040,7 @@ replace_auto_config_value(ConfigVariable **head_p, ConfigVariable **tail_p,
item->name = pstrdup(name);
item->value = pstrdup(value);
item->errmsg = NULL;
- item->filename = pstrdup(""); /* new item has no location */
+ item->filename = pstrdup(""); /* new item has no location */
item->sourceline = 0;
item->ignore = false;
item->applied = false;
@@ -8956,7 +8956,7 @@ read_nondefault_variables(void)
FreeFile(fp);
}
-#endif /* EXEC_BACKEND */
+#endif /* EXEC_BACKEND */
/*
* can_skip_gucvar:
@@ -10404,7 +10404,7 @@ check_effective_io_concurrency(int *newval, void **extra, GucSource source)
return false;
#else
return true;
-#endif /* USE_PREFETCH */
+#endif /* USE_PREFETCH */
}
static void
@@ -10412,7 +10412,7 @@ assign_effective_io_concurrency(int newval, void *extra)
{
#ifdef USE_PREFETCH
target_prefetch_pages = *((int *) extra);
-#endif /* USE_PREFETCH */
+#endif /* USE_PREFETCH */
}
static void
@@ -10424,13 +10424,13 @@ assign_pgstat_temp_directory(const char *newval, void *extra)
char *fname;
/* directory */
- dname = guc_malloc(ERROR, strlen(newval) + 1); /* runtime dir */
+ dname = guc_malloc(ERROR, strlen(newval) + 1); /* runtime dir */
sprintf(dname, "%s", newval);
/* global stats */
- tname = guc_malloc(ERROR, strlen(newval) + 12); /* /global.tmp */
+ tname = guc_malloc(ERROR, strlen(newval) + 12); /* /global.tmp */
sprintf(tname, "%s/global.tmp", newval);
- fname = guc_malloc(ERROR, strlen(newval) + 13); /* /global.stat */
+ fname = guc_malloc(ERROR, strlen(newval) + 13); /* /global.stat */
sprintf(fname, "%s/global.stat", newval);
if (pgstat_stat_directory)
diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c
index 4007a17800c..5742de0802a 100644
--- a/src/backend/utils/misc/ps_status.c
+++ b/src/backend/utils/misc/ps_status.c
@@ -93,11 +93,11 @@ static const size_t ps_buffer_size = PS_BUFFER_SIZE;
static char *ps_buffer; /* will point to argv area */
static size_t ps_buffer_size; /* space determined at run time */
static size_t last_status_len; /* use to minimize length of clobber */
-#endif /* PS_USE_CLOBBER_ARGV */
+#endif /* PS_USE_CLOBBER_ARGV */
static size_t ps_buffer_cur_len; /* nominal strlen(ps_buffer) */
-static size_t ps_buffer_fixed_size; /* size of the constant prefix */
+static size_t ps_buffer_fixed_size; /* size of the constant prefix */
/* save the original argv[] location here */
static int save_argc;
@@ -183,7 +183,7 @@ save_ps_display_args(int argc, char **argv)
new_environ[i] = NULL;
environ = new_environ;
}
-#endif /* PS_USE_CLOBBER_ARGV */
+#endif /* PS_USE_CLOBBER_ARGV */
#if defined(PS_USE_CHANGE_ARGV) || defined(PS_USE_CLOBBER_ARGV)
@@ -231,7 +231,7 @@ save_ps_display_args(int argc, char **argv)
argv = new_argv;
}
-#endif /* PS_USE_CHANGE_ARGV or PS_USE_CLOBBER_ARGV */
+#endif /* PS_USE_CHANGE_ARGV or PS_USE_CLOBBER_ARGV */
return argv;
}
@@ -270,7 +270,7 @@ init_ps_display(const char *username, const char *dbname,
#ifdef PS_USE_CHANGE_ARGV
save_argv[0] = ps_buffer;
save_argv[1] = NULL;
-#endif /* PS_USE_CHANGE_ARGV */
+#endif /* PS_USE_CHANGE_ARGV */
#ifdef PS_USE_CLOBBER_ARGV
{
@@ -280,7 +280,7 @@ init_ps_display(const char *username, const char *dbname,
for (i = 1; i < save_argc; i++)
save_argv[i] = ps_buffer + ps_buffer_size;
}
-#endif /* PS_USE_CLOBBER_ARGV */
+#endif /* PS_USE_CLOBBER_ARGV */
/*
* Make fixed prefix of ps display.
@@ -313,7 +313,7 @@ init_ps_display(const char *username, const char *dbname,
ps_buffer_cur_len = ps_buffer_fixed_size = strlen(ps_buffer);
set_ps_display(initial_str, true);
-#endif /* not PS_USE_NONE */
+#endif /* not PS_USE_NONE */
}
@@ -358,12 +358,12 @@ set_ps_display(const char *activity, bool force)
pst.pst_command = ps_buffer;
pstat(PSTAT_SETCMD, pst, ps_buffer_cur_len, 0, 0);
}
-#endif /* PS_USE_PSTAT */
+#endif /* PS_USE_PSTAT */
#ifdef PS_USE_PS_STRINGS
PS_STRINGS->ps_nargvstr = 1;
PS_STRINGS->ps_argvstr = ps_buffer;
-#endif /* PS_USE_PS_STRINGS */
+#endif /* PS_USE_PS_STRINGS */
#ifdef PS_USE_CLOBBER_ARGV
/* pad unused memory; need only clobber remainder of old status string */
@@ -371,7 +371,7 @@ set_ps_display(const char *activity, bool force)
MemSet(ps_buffer + ps_buffer_cur_len, PS_PADDING,
last_status_len - ps_buffer_cur_len);
last_status_len = ps_buffer_cur_len;
-#endif /* PS_USE_CLOBBER_ARGV */
+#endif /* PS_USE_CLOBBER_ARGV */
#ifdef PS_USE_WIN32
{
@@ -390,8 +390,8 @@ set_ps_display(const char *activity, bool force)
ident_handle = CreateEvent(NULL, TRUE, FALSE, name);
}
-#endif /* PS_USE_WIN32 */
-#endif /* not PS_USE_NONE */
+#endif /* PS_USE_WIN32 */
+#endif /* not PS_USE_NONE */
}
diff --git a/src/backend/utils/misc/sampling.c b/src/backend/utils/misc/sampling.c
index c36459ebadc..b618ed1d7e6 100644
--- a/src/backend/utils/misc/sampling.c
+++ b/src/backend/utils/misc/sampling.c
@@ -59,8 +59,8 @@ BlockSampler_HasMore(BlockSampler bs)
BlockNumber
BlockSampler_Next(BlockSampler bs)
{
- BlockNumber K = bs->N - bs->t; /* remaining blocks */
- int k = bs->n - bs->m; /* blocks still to sample */
+ BlockNumber K = bs->N - bs->t; /* remaining blocks */
+ int k = bs->n - bs->m; /* blocks still to sample */
double p; /* probability to skip block */
double V; /* random */
@@ -150,7 +150,7 @@ reservoir_get_next_S(ReservoirState rs, double t, int n)
double V,
quot;
- V = sampler_random_fract(rs->randstate); /* Generate V */
+ V = sampler_random_fract(rs->randstate); /* Generate V */
S = 0;
t += 1;
/* Note: "num" in Vitter's code is always equal to t - n */
@@ -211,7 +211,7 @@ reservoir_get_next_S(ReservoirState rs, double t, int n)
y *= numer / denom;
denom -= 1;
}
- W = exp(-log(sampler_random_fract(rs->randstate)) / n); /* Generate W in advance */
+ W = exp(-log(sampler_random_fract(rs->randstate)) / n); /* Generate W in advance */
if (exp(log(y) / n) <= (t + X) / t)
break;
}
diff --git a/src/backend/utils/mmgr/aset.c b/src/backend/utils/mmgr/aset.c
index 9d8f02a1799..51668d88fec 100644
--- a/src/backend/utils/mmgr/aset.c
+++ b/src/backend/utils/mmgr/aset.c
@@ -99,7 +99,7 @@
#define ALLOC_BLOCKHDRSZ MAXALIGN(sizeof(AllocBlockData))
#define ALLOC_CHUNKHDRSZ sizeof(struct AllocChunkData)
-typedef struct AllocBlockData *AllocBlock; /* forward reference */
+typedef struct AllocBlockData *AllocBlock; /* forward reference */
typedef struct AllocChunkData *AllocChunk;
/*
@@ -122,7 +122,7 @@ typedef struct AllocSetContext
MemoryContextData header; /* Standard memory-context fields */
/* Info about storage allocated in this context: */
AllocBlock blocks; /* head of list of blocks in this set */
- AllocChunk freelist[ALLOCSET_NUM_FREELISTS]; /* free chunk lists */
+ AllocChunk freelist[ALLOCSET_NUM_FREELISTS]; /* free chunk lists */
/* Allocation parameters for this context: */
Size initBlockSize; /* initial block size */
Size maxBlockSize; /* maximum block size */
@@ -170,7 +170,7 @@ typedef struct AllocChunkData
Size padding;
#endif
-#endif /* MEMORY_CONTEXT_CHECKING */
+#endif /* MEMORY_CONTEXT_CHECKING */
/* aset is the owning aset if allocated, or the freelist link if free */
void *aset;
@@ -721,7 +721,7 @@ AllocSetAlloc(MemoryContext context, Size size)
chunk->size = availchunk;
#ifdef MEMORY_CONTEXT_CHECKING
- chunk->requested_size = 0; /* mark it free */
+ chunk->requested_size = 0; /* mark it free */
#endif
chunk->aset = (void *) set->freelist[a_fidx];
set->freelist[a_fidx] = chunk;
@@ -1252,10 +1252,10 @@ AllocSetCheck(MemoryContext context)
Size chsize,
dsize;
- chsize = chunk->size; /* aligned chunk size */
+ chsize = chunk->size; /* aligned chunk size */
VALGRIND_MAKE_MEM_DEFINED(&chunk->requested_size,
sizeof(chunk->requested_size));
- dsize = chunk->requested_size; /* real data */
+ dsize = chunk->requested_size; /* real data */
if (dsize > 0) /* not on a free list */
VALGRIND_MAKE_MEM_NOACCESS(&chunk->requested_size,
sizeof(chunk->requested_size));
@@ -1305,4 +1305,4 @@ AllocSetCheck(MemoryContext context)
}
}
-#endif /* MEMORY_CONTEXT_CHECKING */
+#endif /* MEMORY_CONTEXT_CHECKING */
diff --git a/src/backend/utils/mmgr/dsa.c b/src/backend/utils/mmgr/dsa.c
index f09a9c0487d..7852fde300d 100644
--- a/src/backend/utils/mmgr/dsa.c
+++ b/src/backend/utils/mmgr/dsa.c
@@ -235,7 +235,7 @@ typedef struct
*/
static const uint16 dsa_size_classes[] = {
sizeof(dsa_area_span), 0, /* special size classes */
- 8, 16, 24, 32, 40, 48, 56, 64, /* 8 classes separated by 8 bytes */
+ 8, 16, 24, 32, 40, 48, 56, 64, /* 8 classes separated by 8 bytes */
80, 96, 112, 128, /* 4 classes separated by 16 bytes */
160, 192, 224, 256, /* 4 classes separated by 32 bytes */
320, 384, 448, 512, /* 4 classes separated by 64 bytes */
@@ -1304,7 +1304,7 @@ attach_internal(void *place, dsm_segment *segment, dsa_handle handle)
/* Set up the segment map for this process's mapping. */
segment_map = &area->segment_maps[0];
- segment_map->segment = segment; /* NULL for in-place */
+ segment_map->segment = segment; /* NULL for in-place */
segment_map->mapped_address = place;
segment_map->header = (dsa_segment_header *) segment_map->mapped_address;
segment_map->fpm = (FreePageManager *)
diff --git a/src/backend/utils/mmgr/memdebug.c b/src/backend/utils/mmgr/memdebug.c
index 243607732c0..f0a87d3f207 100644
--- a/src/backend/utils/mmgr/memdebug.c
+++ b/src/backend/utils/mmgr/memdebug.c
@@ -90,4 +90,4 @@ randomize_mem(char *ptr, size_t size)
save_ctr = ctr;
}
-#endif /* RANDOMIZE_ALLOCATED_MEMORY */
+#endif /* RANDOMIZE_ALLOCATED_MEMORY */
diff --git a/src/backend/utils/mmgr/slab.c b/src/backend/utils/mmgr/slab.c
index 2cf58059d03..35de6b6d82a 100644
--- a/src/backend/utils/mmgr/slab.c
+++ b/src/backend/utils/mmgr/slab.c
@@ -764,4 +764,4 @@ SlabCheck(MemoryContext context)
}
}
-#endif /* MEMORY_CONTEXT_CHECKING */
+#endif /* MEMORY_CONTEXT_CHECKING */
diff --git a/src/backend/utils/resowner/resowner.c b/src/backend/utils/resowner/resowner.c
index 8f324cd5804..4a4a2871488 100644
--- a/src/backend/utils/resowner/resowner.c
+++ b/src/backend/utils/resowner/resowner.c
@@ -127,7 +127,7 @@ typedef struct ResourceOwnerData
/* We can remember up to MAX_RESOWNER_LOCKS references to local locks. */
int nlocks; /* number of owned locks */
- LOCALLOCK *locks[MAX_RESOWNER_LOCKS]; /* list of owned locks */
+ LOCALLOCK *locks[MAX_RESOWNER_LOCKS]; /* list of owned locks */
} ResourceOwnerData;
diff --git a/src/backend/utils/sort/logtape.c b/src/backend/utils/sort/logtape.c
index 455735925e2..e1628f73795 100644
--- a/src/backend/utils/sort/logtape.c
+++ b/src/backend/utils/sort/logtape.c
@@ -161,7 +161,7 @@ struct LogicalTapeSet
* blocks that have been allocated for a tape, but have not been written
* to the underlying file yet.
*/
- long nBlocksAllocated; /* # of blocks allocated */
+ long nBlocksAllocated; /* # of blocks allocated */
long nBlocksWritten; /* # of blocks used in underlying file */
/*
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 420a34afe73..362f5896251 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -72,7 +72,7 @@
/*
* GUC parameters
*/
-int old_snapshot_threshold; /* number of minutes, -1 disables */
+int old_snapshot_threshold; /* number of minutes, -1 disables */
/*
* Structure for dealing with old_snapshot_threshold implementation.
@@ -84,9 +84,8 @@ typedef struct OldSnapshotControlData
* only allowed to move forward.
*/
slock_t mutex_current; /* protect current_timestamp */
- TimestampTz current_timestamp; /* latest snapshot timestamp */
- slock_t mutex_latest_xmin; /* protect latest_xmin and
- * next_map_update */
+ TimestampTz current_timestamp; /* latest snapshot timestamp */
+ slock_t mutex_latest_xmin; /* protect latest_xmin and next_map_update */
TransactionId latest_xmin; /* latest snapshot xmin */
TimestampTz next_map_update; /* latest snapshot valid up to */
slock_t mutex_threshold; /* protect threshold fields */
diff --git a/src/backend/utils/time/tqual.c b/src/backend/utils/time/tqual.c
index 519f3b68031..f9da9e17f52 100644
--- a/src/backend/utils/time/tqual.c
+++ b/src/backend/utils/time/tqual.c
@@ -512,7 +512,7 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid,
else if (TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetRawXmin(tuple)))
{
if (HeapTupleHeaderGetCmin(tuple) >= curcid)
- return HeapTupleInvisible; /* inserted after scan started */
+ return HeapTupleInvisible; /* inserted after scan started */
if (tuple->t_infomask & HEAP_XMAX_INVALID) /* xid invalid */
return HeapTupleMayBeUpdated;
@@ -571,8 +571,8 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid,
return HeapTupleSelfUpdated; /* updated after scan
* started */
else
- return HeapTupleInvisible; /* updated before scan
- * started */
+ return HeapTupleInvisible; /* updated before scan
+ * started */
}
}
@@ -587,7 +587,7 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid,
if (HeapTupleHeaderGetCmax(tuple) >= curcid)
return HeapTupleSelfUpdated; /* updated after scan started */
else
- return HeapTupleInvisible; /* updated before scan started */
+ return HeapTupleInvisible; /* updated before scan started */
}
else if (TransactionIdIsInProgress(HeapTupleHeaderGetRawXmin(tuple)))
return HeapTupleInvisible;
@@ -646,7 +646,7 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid,
if (HeapTupleHeaderGetCmax(tuple) >= curcid)
return HeapTupleSelfUpdated; /* updated after scan started */
else
- return HeapTupleInvisible; /* updated before scan started */
+ return HeapTupleInvisible; /* updated before scan started */
}
if (MultiXactIdIsRunning(HeapTupleHeaderGetRawXmax(tuple), false))
@@ -682,7 +682,7 @@ HeapTupleSatisfiesUpdate(HeapTuple htup, CommandId curcid,
if (HEAP_XMAX_IS_LOCKED_ONLY(tuple->t_infomask))
return HeapTupleBeingUpdated;
if (HeapTupleHeaderGetCmax(tuple) >= curcid)
- return HeapTupleSelfUpdated; /* updated after scan started */
+ return HeapTupleSelfUpdated; /* updated after scan started */
else
return HeapTupleInvisible; /* updated before scan started */
}
@@ -1038,7 +1038,7 @@ HeapTupleSatisfiesMVCC(HeapTuple htup, Snapshot snapshot,
else if (HeapTupleHeaderGetCmax(tuple) >= snapshot->curcid)
return true; /* updated after scan started */
else
- return false; /* updated before scan started */
+ return false; /* updated before scan started */
}
if (!TransactionIdIsCurrentTransactionId(HeapTupleHeaderGetRawXmax(tuple)))