summaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
authorTom Lane2023-05-19 21:24:48 +0000
committerTom Lane2023-05-19 21:24:48 +0000
commit0245f8db36f375326c2bae0c3420d3c77714e72d (patch)
tree7ce91f23658a05ea24be4703fb06cdc6b56248f7 /src/backend/utils
parentdf6b19fbbc20d830de91d9bea68715a39635b568 (diff)
Pre-beta mechanical code beautification.
Run pgindent, pgperltidy, and reformat-dat-files. This set of diffs is a bit larger than typical. We've updated to pg_bsd_indent 2.1.2, which properly indents variable declarations that have multi-line initialization expressions (the continuation lines are now indented one tab stop). We've also updated to perltidy version 20230309 and changed some of its settings, which reduces its desire to add whitespace to lines to make assignments etc. line up. Going forward, that should make for fewer random-seeming changes to existing code. Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/Gen_dummy_probes.pl2
-rw-r--r--src/backend/utils/Gen_fmgrtab.pl31
-rw-r--r--src/backend/utils/activity/pgstat.c2
-rw-r--r--src/backend/utils/activity/pgstat_shmem.c2
-rw-r--r--src/backend/utils/activity/pgstat_xact.c8
-rw-r--r--src/backend/utils/adt/datetime.c12
-rw-r--r--src/backend/utils/adt/float.c3
-rw-r--r--src/backend/utils/adt/jsonfuncs.c6
-rw-r--r--src/backend/utils/adt/jsonpath.c54
-rw-r--r--src/backend/utils/adt/jsonpath_exec.c10
-rw-r--r--src/backend/utils/adt/jsonpath_internal.h6
-rw-r--r--src/backend/utils/adt/pg_locale.c136
-rw-r--r--src/backend/utils/adt/ruleutils.c2
-rw-r--r--src/backend/utils/adt/tsquery_op.c6
-rw-r--r--src/backend/utils/adt/tsvector_op.c2
-rw-r--r--src/backend/utils/adt/varchar.c14
-rw-r--r--src/backend/utils/adt/varlena.c5
-rw-r--r--src/backend/utils/adt/xid8funcs.c2
-rw-r--r--src/backend/utils/adt/xml.c2
-rw-r--r--src/backend/utils/cache/lsyscache.c12
-rw-r--r--src/backend/utils/cache/relcache.c22
-rw-r--r--src/backend/utils/cache/relmapper.c10
-rw-r--r--src/backend/utils/fmgr/fmgr.c2
-rw-r--r--src/backend/utils/generate-errcodes.pl5
-rw-r--r--src/backend/utils/init/postinit.c10
-rw-r--r--src/backend/utils/init/usercontext.c8
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_BIG5.pl14
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl10
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl24
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl516
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl30
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl14
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_GB18030.pl10
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_JOHAB.pl30
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl24
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_SJIS.pl84
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_UHC.pl20
-rwxr-xr-xsrc/backend/utils/mb/Unicode/UCS_to_most.pl44
-rw-r--r--src/backend/utils/mb/Unicode/convutils.pm64
-rw-r--r--src/backend/utils/misc/guc.c4
-rw-r--r--src/backend/utils/misc/guc_tables.c4
-rw-r--r--src/backend/utils/mmgr/dsa.c4
-rw-r--r--src/backend/utils/mmgr/freepage.c2
-rw-r--r--src/backend/utils/mmgr/mcxt.c6
-rw-r--r--src/backend/utils/resowner/resowner.c2
-rw-r--r--src/backend/utils/sort/tuplesort.c4
-rw-r--r--src/backend/utils/time/snapmgr.c6
47 files changed, 647 insertions, 643 deletions
diff --git a/src/backend/utils/Gen_dummy_probes.pl b/src/backend/utils/Gen_dummy_probes.pl
index 668b915a4d5..f289b19344b 100644
--- a/src/backend/utils/Gen_dummy_probes.pl
+++ b/src/backend/utils/Gen_dummy_probes.pl
@@ -44,7 +44,7 @@ sub Run()
# Initialize.
openARGV();
- $Hold = '';
+ $Hold = '';
$CondReg = 0;
$doPrint = $doAutoPrint;
CYCLE:
diff --git a/src/backend/utils/Gen_fmgrtab.pl b/src/backend/utils/Gen_fmgrtab.pl
index 2792373feda..764216c56dd 100644
--- a/src/backend/utils/Gen_fmgrtab.pl
+++ b/src/backend/utils/Gen_fmgrtab.pl
@@ -24,7 +24,7 @@ my $output_path = '';
my $include_path;
GetOptions(
- 'output:s' => \$output_path,
+ 'output:s' => \$output_path,
'include-path:s' => \$include_path) || usage();
# Make sure output_path ends in a slash.
@@ -34,7 +34,7 @@ if ($output_path ne '' && substr($output_path, -1) ne '/')
}
# Sanity check arguments.
-die "No input files.\n" unless @ARGV;
+die "No input files.\n" unless @ARGV;
die "--include-path must be specified.\n" unless $include_path;
# Read all the input files into internal data structures.
@@ -56,7 +56,7 @@ foreach my $datfile (@ARGV)
my $catalog = Catalog::ParseHeader($header);
my $catname = $catalog->{catname};
- my $schema = $catalog->{columns};
+ my $schema = $catalog->{columns};
$catalogs{$catname} = $catalog;
$catalog_data{$catname} = Catalog::ParseData($datfile, $schema, 0);
@@ -72,14 +72,14 @@ foreach my $row (@{ $catalog_data{pg_proc} })
push @fmgr,
{
- oid => $bki_values{oid},
- name => $bki_values{proname},
- lang => $bki_values{prolang},
- kind => $bki_values{prokind},
+ oid => $bki_values{oid},
+ name => $bki_values{proname},
+ lang => $bki_values{prolang},
+ kind => $bki_values{prokind},
strict => $bki_values{proisstrict},
retset => $bki_values{proretset},
- nargs => $bki_values{pronargs},
- args => $bki_values{proargtypes},
+ nargs => $bki_values{pronargs},
+ args => $bki_values{proargtypes},
prosrc => $bki_values{prosrc},
};
@@ -88,10 +88,10 @@ foreach my $row (@{ $catalog_data{pg_proc} })
}
# Emit headers for both files
-my $tmpext = ".tmp$$";
-my $oidsfile = $output_path . 'fmgroids.h';
+my $tmpext = ".tmp$$";
+my $oidsfile = $output_path . 'fmgroids.h';
my $protosfile = $output_path . 'fmgrprotos.h';
-my $tabfile = $output_path . 'fmgrtab.c';
+my $tabfile = $output_path . 'fmgrtab.c';
open my $ofh, '>', $oidsfile . $tmpext
or die "Could not open $oidsfile$tmpext: $!";
@@ -213,7 +213,8 @@ $bmap{'t'} = 'true';
$bmap{'f'} = 'false';
my @fmgr_builtin_oid_index;
my $last_builtin_oid = 0;
-my $fmgr_count = 0;
+my $fmgr_count = 0;
+
foreach my $s (sort { $a->{oid} <=> $b->{oid} } @fmgr)
{
next if $s->{lang} ne 'internal';
@@ -273,9 +274,9 @@ close($pfh);
close($tfh);
# Finally, rename the completed files into place.
-Catalog::RenameTempFile($oidsfile, $tmpext);
+Catalog::RenameTempFile($oidsfile, $tmpext);
Catalog::RenameTempFile($protosfile, $tmpext);
-Catalog::RenameTempFile($tabfile, $tmpext);
+Catalog::RenameTempFile($tabfile, $tmpext);
sub usage
{
diff --git a/src/backend/utils/activity/pgstat.c b/src/backend/utils/activity/pgstat.c
index f6edfc76ac4..0cdb552631e 100644
--- a/src/backend/utils/activity/pgstat.c
+++ b/src/backend/utils/activity/pgstat.c
@@ -1186,7 +1186,7 @@ pgstat_flush_pending_entries(bool nowait)
while (cur)
{
PgStat_EntryRef *entry_ref =
- dlist_container(PgStat_EntryRef, pending_node, cur);
+ dlist_container(PgStat_EntryRef, pending_node, cur);
PgStat_HashKey key = entry_ref->shared_entry->key;
PgStat_Kind kind = key.kind;
const PgStat_KindInfo *kind_info = pgstat_get_kind_info(kind);
diff --git a/src/backend/utils/activity/pgstat_shmem.c b/src/backend/utils/activity/pgstat_shmem.c
index 09fffd0e82a..d1149adf702 100644
--- a/src/backend/utils/activity/pgstat_shmem.c
+++ b/src/backend/utils/activity/pgstat_shmem.c
@@ -865,7 +865,7 @@ pgstat_drop_entry(PgStat_Kind kind, Oid dboid, Oid objoid)
if (pgStatEntryRefHash)
{
PgStat_EntryRefHashEntry *lohashent =
- pgstat_entry_ref_hash_lookup(pgStatEntryRefHash, key);
+ pgstat_entry_ref_hash_lookup(pgStatEntryRefHash, key);
if (lohashent)
pgstat_release_entry_ref(lohashent->key, lohashent->entry_ref,
diff --git a/src/backend/utils/activity/pgstat_xact.c b/src/backend/utils/activity/pgstat_xact.c
index 91cdd9222e3..369239d5014 100644
--- a/src/backend/utils/activity/pgstat_xact.c
+++ b/src/backend/utils/activity/pgstat_xact.c
@@ -76,7 +76,7 @@ AtEOXact_PgStat_DroppedStats(PgStat_SubXactStatus *xact_state, bool isCommit)
dclist_foreach_modify(iter, &xact_state->pending_drops)
{
PgStat_PendingDroppedStatsItem *pending =
- dclist_container(PgStat_PendingDroppedStatsItem, node, iter.cur);
+ dclist_container(PgStat_PendingDroppedStatsItem, node, iter.cur);
xl_xact_stats_item *it = &pending->item;
if (isCommit && !pending->is_create)
@@ -148,7 +148,7 @@ AtEOSubXact_PgStat_DroppedStats(PgStat_SubXactStatus *xact_state,
dclist_foreach_modify(iter, &xact_state->pending_drops)
{
PgStat_PendingDroppedStatsItem *pending =
- dclist_container(PgStat_PendingDroppedStatsItem, node, iter.cur);
+ dclist_container(PgStat_PendingDroppedStatsItem, node, iter.cur);
xl_xact_stats_item *it = &pending->item;
dclist_delete_from(&xact_state->pending_drops, &pending->node);
@@ -290,7 +290,7 @@ pgstat_get_transactional_drops(bool isCommit, xl_xact_stats_item **items)
dclist_foreach(iter, &xact_state->pending_drops)
{
PgStat_PendingDroppedStatsItem *pending =
- dclist_container(PgStat_PendingDroppedStatsItem, node, iter.cur);
+ dclist_container(PgStat_PendingDroppedStatsItem, node, iter.cur);
if (isCommit && pending->is_create)
continue;
@@ -335,7 +335,7 @@ create_drop_transactional_internal(PgStat_Kind kind, Oid dboid, Oid objoid, bool
int nest_level = GetCurrentTransactionNestLevel();
PgStat_SubXactStatus *xact_state;
PgStat_PendingDroppedStatsItem *drop = (PgStat_PendingDroppedStatsItem *)
- MemoryContextAlloc(TopTransactionContext, sizeof(PgStat_PendingDroppedStatsItem));
+ MemoryContextAlloc(TopTransactionContext, sizeof(PgStat_PendingDroppedStatsItem));
xact_state = pgstat_get_xact_stack_level(nest_level);
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index be2e55bb29f..5d8d583ddcb 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -4482,17 +4482,17 @@ EncodeInterval(struct pg_itm *itm, int style, char *str)
case INTSTYLE_SQL_STANDARD:
{
bool has_negative = year < 0 || mon < 0 ||
- mday < 0 || hour < 0 ||
- min < 0 || sec < 0 || fsec < 0;
+ mday < 0 || hour < 0 ||
+ min < 0 || sec < 0 || fsec < 0;
bool has_positive = year > 0 || mon > 0 ||
- mday > 0 || hour > 0 ||
- min > 0 || sec > 0 || fsec > 0;
+ mday > 0 || hour > 0 ||
+ min > 0 || sec > 0 || fsec > 0;
bool has_year_month = year != 0 || mon != 0;
bool has_day_time = mday != 0 || hour != 0 ||
- min != 0 || sec != 0 || fsec != 0;
+ min != 0 || sec != 0 || fsec != 0;
bool has_day = mday != 0;
bool sql_standard_value = !(has_negative && has_positive) &&
- !(has_year_month && has_day_time);
+ !(has_year_month && has_day_time);
/*
* SQL Standard wants only 1 "<sign>" preceding the whole
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index 9b51da2382d..dfa90a04fb2 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -189,8 +189,7 @@ float4in_internal(char *num, char **endptr_p,
/*
* endptr points to the first character _after_ the sequence we recognized
* as a valid floating point number. orig_string points to the original
- * input
- * string.
+ * input string.
*/
/* skip leading whitespace */
diff --git a/src/backend/utils/adt/jsonfuncs.c b/src/backend/utils/adt/jsonfuncs.c
index 4c5abaff257..70cb922e6b7 100644
--- a/src/backend/utils/adt/jsonfuncs.c
+++ b/src/backend/utils/adt/jsonfuncs.c
@@ -3219,9 +3219,9 @@ static RecordIOData *
allocate_record_info(MemoryContext mcxt, int ncolumns)
{
RecordIOData *data = (RecordIOData *)
- MemoryContextAlloc(mcxt,
- offsetof(RecordIOData, columns) +
- ncolumns * sizeof(ColumnIOData));
+ MemoryContextAlloc(mcxt,
+ offsetof(RecordIOData, columns) +
+ ncolumns * sizeof(ColumnIOData));
data->record_type = InvalidOid;
data->record_typmod = 0;
diff --git a/src/backend/utils/adt/jsonpath.c b/src/backend/utils/adt/jsonpath.c
index 0021b018306..7891fde3105 100644
--- a/src/backend/utils/adt/jsonpath.c
+++ b/src/backend/utils/adt/jsonpath.c
@@ -76,7 +76,7 @@
static Datum jsonPathFromCstring(char *in, int len, struct Node *escontext);
static char *jsonPathToCstring(StringInfo out, JsonPath *in,
int estimated_len);
-static bool flattenJsonPathParseItem(StringInfo buf, int *result,
+static bool flattenJsonPathParseItem(StringInfo buf, int *result,
struct Node *escontext,
JsonPathParseItem *item,
int nestingLevel, bool insideArraySubscript);
@@ -234,7 +234,7 @@ jsonPathToCstring(StringInfo out, JsonPath *in, int estimated_len)
* children into a binary representation.
*/
static bool
-flattenJsonPathParseItem(StringInfo buf, int *result, struct Node *escontext,
+flattenJsonPathParseItem(StringInfo buf, int *result, struct Node *escontext,
JsonPathParseItem *item, int nestingLevel,
bool insideArraySubscript)
{
@@ -306,19 +306,19 @@ flattenJsonPathParseItem(StringInfo buf, int *result, struct Node *escontext,
if (!item->value.args.left)
chld = pos;
- else if (! flattenJsonPathParseItem(buf, &chld, escontext,
- item->value.args.left,
- nestingLevel + argNestingLevel,
- insideArraySubscript))
+ else if (!flattenJsonPathParseItem(buf, &chld, escontext,
+ item->value.args.left,
+ nestingLevel + argNestingLevel,
+ insideArraySubscript))
return false;
*(int32 *) (buf->data + left) = chld - pos;
if (!item->value.args.right)
chld = pos;
- else if (! flattenJsonPathParseItem(buf, &chld, escontext,
- item->value.args.right,
- nestingLevel + argNestingLevel,
- insideArraySubscript))
+ else if (!flattenJsonPathParseItem(buf, &chld, escontext,
+ item->value.args.right,
+ nestingLevel + argNestingLevel,
+ insideArraySubscript))
return false;
*(int32 *) (buf->data + right) = chld - pos;
}
@@ -338,10 +338,10 @@ flattenJsonPathParseItem(StringInfo buf, int *result, struct Node *escontext,
item->value.like_regex.patternlen);
appendStringInfoChar(buf, '\0');
- if (! flattenJsonPathParseItem(buf, &chld, escontext,
- item->value.like_regex.expr,
- nestingLevel,
- insideArraySubscript))
+ if (!flattenJsonPathParseItem(buf, &chld, escontext,
+ item->value.like_regex.expr,
+ nestingLevel,
+ insideArraySubscript))
return false;
*(int32 *) (buf->data + offs) = chld - pos;
}
@@ -360,10 +360,10 @@ flattenJsonPathParseItem(StringInfo buf, int *result, struct Node *escontext,
if (!item->value.arg)
chld = pos;
- else if (! flattenJsonPathParseItem(buf, &chld, escontext,
- item->value.arg,
- nestingLevel + argNestingLevel,
- insideArraySubscript))
+ else if (!flattenJsonPathParseItem(buf, &chld, escontext,
+ item->value.arg,
+ nestingLevel + argNestingLevel,
+ insideArraySubscript))
return false;
*(int32 *) (buf->data + arg) = chld - pos;
}
@@ -405,17 +405,17 @@ flattenJsonPathParseItem(StringInfo buf, int *result, struct Node *escontext,
int32 topos;
int32 frompos;
- if (! flattenJsonPathParseItem(buf, &frompos, escontext,
- item->value.array.elems[i].from,
- nestingLevel, true))
+ if (!flattenJsonPathParseItem(buf, &frompos, escontext,
+ item->value.array.elems[i].from,
+ nestingLevel, true))
return false;
frompos -= pos;
if (item->value.array.elems[i].to)
{
- if (! flattenJsonPathParseItem(buf, &topos, escontext,
- item->value.array.elems[i].to,
- nestingLevel, true))
+ if (!flattenJsonPathParseItem(buf, &topos, escontext,
+ item->value.array.elems[i].to,
+ nestingLevel, true))
return false;
topos -= pos;
}
@@ -451,9 +451,9 @@ flattenJsonPathParseItem(StringInfo buf, int *result, struct Node *escontext,
if (item->next)
{
- if (! flattenJsonPathParseItem(buf, &chld, escontext,
- item->next, nestingLevel,
- insideArraySubscript))
+ if (!flattenJsonPathParseItem(buf, &chld, escontext,
+ item->next, nestingLevel,
+ insideArraySubscript))
return false;
chld -= pos;
*(int32 *) (buf->data + next) = chld;
diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c
index b561f0e7e80..41430bab7ed 100644
--- a/src/backend/utils/adt/jsonpath_exec.c
+++ b/src/backend/utils/adt/jsonpath_exec.c
@@ -1326,8 +1326,8 @@ executeBoolItem(JsonPathExecContext *cxt, JsonPathItem *jsp,
*/
JsonValueList vals = {0};
JsonPathExecResult res =
- executeItemOptUnwrapResultNoThrow(cxt, &larg, jb,
- false, &vals);
+ executeItemOptUnwrapResultNoThrow(cxt, &larg, jb,
+ false, &vals);
if (jperIsError(res))
return jpbUnknown;
@@ -1337,8 +1337,8 @@ executeBoolItem(JsonPathExecContext *cxt, JsonPathItem *jsp,
else
{
JsonPathExecResult res =
- executeItemOptUnwrapResultNoThrow(cxt, &larg, jb,
- false, NULL);
+ executeItemOptUnwrapResultNoThrow(cxt, &larg, jb,
+ false, NULL);
if (jperIsError(res))
return jpbUnknown;
@@ -1869,7 +1869,7 @@ executeDateTimeMethod(JsonPathExecContext *cxt, JsonPathItem *jsp,
if (!fmt_txt[i])
{
MemoryContext oldcxt =
- MemoryContextSwitchTo(TopMemoryContext);
+ MemoryContextSwitchTo(TopMemoryContext);
fmt_txt[i] = cstring_to_text(fmt_str[i]);
MemoryContextSwitchTo(oldcxt);
diff --git a/src/backend/utils/adt/jsonpath_internal.h b/src/backend/utils/adt/jsonpath_internal.h
index 2e12de038c3..90eea6e9616 100644
--- a/src/backend/utils/adt/jsonpath_internal.h
+++ b/src/backend/utils/adt/jsonpath_internal.h
@@ -20,7 +20,7 @@ typedef struct JsonPathString
char *val;
int len;
int total;
-} JsonPathString;
+} JsonPathString;
#include "utils/jsonpath.h"
#include "jsonpath_gram.h"
@@ -29,8 +29,8 @@ typedef struct JsonPathString
JsonPathParseResult **result, \
struct Node *escontext)
YY_DECL;
-extern int jsonpath_yyparse(JsonPathParseResult **result,
- struct Node *escontext);
+extern int jsonpath_yyparse(JsonPathParseResult **result,
+ struct Node *escontext);
extern void jsonpath_yyerror(JsonPathParseResult **result,
struct Node *escontext,
const char *message);
diff --git a/src/backend/utils/adt/pg_locale.c b/src/backend/utils/adt/pg_locale.c
index eea1d1ae0ff..31e3b16ae00 100644
--- a/src/backend/utils/adt/pg_locale.c
+++ b/src/backend/utils/adt/pg_locale.c
@@ -1794,8 +1794,7 @@ pg_strncoll_libc_win32_utf8(const char *arg1, size_t len1, const char *arg2,
else
#endif
result = wcscoll((LPWSTR) a1p, (LPWSTR) a2p);
- if (result == 2147483647) /* _NLSCMPERROR; missing from mingw
- * headers */
+ if (result == 2147483647) /* _NLSCMPERROR; missing from mingw headers */
ereport(ERROR,
(errmsg("could not compare Unicode strings: %m")));
@@ -1818,14 +1817,15 @@ pg_strncoll_libc_win32_utf8(const char *arg1, size_t len1, const char *arg2,
static int
pg_strcoll_libc(const char *arg1, const char *arg2, pg_locale_t locale)
{
- int result;
+ int result;
Assert(!locale || locale->provider == COLLPROVIDER_LIBC);
#ifdef WIN32
if (GetDatabaseEncoding() == PG_UTF8)
{
- size_t len1 = strlen(arg1);
- size_t len2 = strlen(arg2);
+ size_t len1 = strlen(arg1);
+ size_t len2 = strlen(arg2);
+
result = pg_strncoll_libc_win32_utf8(arg1, len1, arg2, len2, locale);
}
else
@@ -1854,13 +1854,13 @@ static int
pg_strncoll_libc(const char *arg1, size_t len1, const char *arg2, size_t len2,
pg_locale_t locale)
{
- char sbuf[TEXTBUFLEN];
- char *buf = sbuf;
- size_t bufsize1 = len1 + 1;
- size_t bufsize2 = len2 + 1;
- char *arg1n;
- char *arg2n;
- int result;
+ char sbuf[TEXTBUFLEN];
+ char *buf = sbuf;
+ size_t bufsize1 = len1 + 1;
+ size_t bufsize2 = len2 + 1;
+ char *arg1n;
+ char *arg2n;
+ int result;
Assert(!locale || locale->provider == COLLPROVIDER_LIBC);
@@ -1906,15 +1906,15 @@ static int
pg_strncoll_icu_no_utf8(const char *arg1, int32_t len1,
const char *arg2, int32_t len2, pg_locale_t locale)
{
- char sbuf[TEXTBUFLEN];
- char *buf = sbuf;
- int32_t ulen1;
- int32_t ulen2;
- size_t bufsize1;
- size_t bufsize2;
- UChar *uchar1,
- *uchar2;
- int result;
+ char sbuf[TEXTBUFLEN];
+ char *buf = sbuf;
+ int32_t ulen1;
+ int32_t ulen2;
+ size_t bufsize1;
+ size_t bufsize2;
+ UChar *uchar1,
+ *uchar2;
+ int result;
Assert(locale->provider == COLLPROVIDER_ICU);
#ifdef HAVE_UCOL_STRCOLLUTF8
@@ -1961,7 +1961,7 @@ static int
pg_strncoll_icu(const char *arg1, int32_t len1, const char *arg2, int32_t len2,
pg_locale_t locale)
{
- int result;
+ int result;
Assert(locale->provider == COLLPROVIDER_ICU);
@@ -2042,7 +2042,7 @@ int
pg_strncoll(const char *arg1, size_t len1, const char *arg2, size_t len2,
pg_locale_t locale)
{
- int result;
+ int result;
if (!locale || locale->provider == COLLPROVIDER_LIBC)
result = pg_strncoll_libc(arg1, len1, arg2, len2, locale);
@@ -2074,7 +2074,7 @@ pg_strxfrm_libc(char *dest, const char *src, size_t destsize,
#else
/* shouldn't happen */
elog(ERROR, "unsupported collprovider: %c", locale->provider);
- return 0; /* keep compiler quiet */
+ return 0; /* keep compiler quiet */
#endif
}
@@ -2082,10 +2082,10 @@ static size_t
pg_strnxfrm_libc(char *dest, const char *src, size_t srclen, size_t destsize,
pg_locale_t locale)
{
- char sbuf[TEXTBUFLEN];
- char *buf = sbuf;
- size_t bufsize = srclen + 1;
- size_t result;
+ char sbuf[TEXTBUFLEN];
+ char *buf = sbuf;
+ size_t bufsize = srclen + 1;
+ size_t result;
Assert(!locale || locale->provider == COLLPROVIDER_LIBC);
@@ -2114,12 +2114,12 @@ static size_t
pg_strnxfrm_icu(char *dest, const char *src, int32_t srclen, int32_t destsize,
pg_locale_t locale)
{
- char sbuf[TEXTBUFLEN];
- char *buf = sbuf;
- UChar *uchar;
- int32_t ulen;
- size_t uchar_bsize;
- Size result_bsize;
+ char sbuf[TEXTBUFLEN];
+ char *buf = sbuf;
+ UChar *uchar;
+ int32_t ulen;
+ size_t uchar_bsize;
+ Size result_bsize;
Assert(locale->provider == COLLPROVIDER_ICU);
@@ -2161,15 +2161,15 @@ static size_t
pg_strnxfrm_prefix_icu_no_utf8(char *dest, const char *src, int32_t srclen,
int32_t destsize, pg_locale_t locale)
{
- char sbuf[TEXTBUFLEN];
- char *buf = sbuf;
- UCharIterator iter;
- uint32_t state[2];
- UErrorCode status;
- int32_t ulen = -1;
- UChar *uchar = NULL;
- size_t uchar_bsize;
- Size result_bsize;
+ char sbuf[TEXTBUFLEN];
+ char *buf = sbuf;
+ UCharIterator iter;
+ uint32_t state[2];
+ UErrorCode status;
+ int32_t ulen = -1;
+ UChar *uchar = NULL;
+ size_t uchar_bsize;
+ Size result_bsize;
Assert(locale->provider == COLLPROVIDER_ICU);
Assert(GetDatabaseEncoding() != PG_UTF8);
@@ -2209,7 +2209,7 @@ static size_t
pg_strnxfrm_prefix_icu(char *dest, const char *src, int32_t srclen,
int32_t destsize, pg_locale_t locale)
{
- size_t result;
+ size_t result;
Assert(locale->provider == COLLPROVIDER_ICU);
@@ -2271,7 +2271,7 @@ pg_strxfrm_enabled(pg_locale_t locale)
/* shouldn't happen */
elog(ERROR, "unsupported collprovider: %c", locale->provider);
- return false; /* keep compiler quiet */
+ return false; /* keep compiler quiet */
}
/*
@@ -2291,7 +2291,7 @@ pg_strxfrm_enabled(pg_locale_t locale)
size_t
pg_strxfrm(char *dest, const char *src, size_t destsize, pg_locale_t locale)
{
- size_t result = 0; /* keep compiler quiet */
+ size_t result = 0; /* keep compiler quiet */
if (!locale || locale->provider == COLLPROVIDER_LIBC)
result = pg_strxfrm_libc(dest, src, destsize, locale);
@@ -2328,7 +2328,7 @@ size_t
pg_strnxfrm(char *dest, size_t destsize, const char *src, size_t srclen,
pg_locale_t locale)
{
- size_t result = 0; /* keep compiler quiet */
+ size_t result = 0; /* keep compiler quiet */
if (!locale || locale->provider == COLLPROVIDER_LIBC)
result = pg_strnxfrm_libc(dest, src, srclen, destsize, locale);
@@ -2358,7 +2358,7 @@ pg_strxfrm_prefix_enabled(pg_locale_t locale)
/* shouldn't happen */
elog(ERROR, "unsupported collprovider: %c", locale->provider);
- return false; /* keep compiler quiet */
+ return false; /* keep compiler quiet */
}
/*
@@ -2378,7 +2378,7 @@ size_t
pg_strxfrm_prefix(char *dest, const char *src, size_t destsize,
pg_locale_t locale)
{
- size_t result = 0; /* keep compiler quiet */
+ size_t result = 0; /* keep compiler quiet */
if (!locale || locale->provider == COLLPROVIDER_LIBC)
elog(ERROR, "collprovider '%c' does not support pg_strxfrm_prefix()",
@@ -2415,7 +2415,7 @@ size_t
pg_strnxfrm_prefix(char *dest, size_t destsize, const char *src,
size_t srclen, pg_locale_t locale)
{
- size_t result = 0; /* keep compiler quiet */
+ size_t result = 0; /* keep compiler quiet */
if (!locale || locale->provider == COLLPROVIDER_LIBC)
elog(ERROR, "collprovider '%c' does not support pg_strnxfrm_prefix()",
@@ -2491,7 +2491,7 @@ pg_ucol_open(const char *loc_str)
collator = ucol_open(loc_str, &status);
if (U_FAILURE(status))
ereport(ERROR,
- /* use original string for error report */
+ /* use original string for error report */
(errmsg("could not open collator for locale \"%s\": %s",
orig_str, u_errorName(status))));
@@ -2554,6 +2554,7 @@ uchar_length(UConverter *converter, const char *str, int32_t len)
{
UErrorCode status = U_ZERO_ERROR;
int32_t ulen;
+
ulen = ucnv_toUChars(converter, NULL, 0, str, len, &status);
if (U_FAILURE(status) && status != U_BUFFER_OVERFLOW_ERROR)
ereport(ERROR,
@@ -2571,6 +2572,7 @@ uchar_convert(UConverter *converter, UChar *dest, int32_t destlen,
{
UErrorCode status = U_ZERO_ERROR;
int32_t ulen;
+
status = U_ZERO_ERROR;
ulen = ucnv_toUChars(converter, dest, destlen, src, srclen, &status);
if (U_FAILURE(status))
@@ -2594,7 +2596,7 @@ uchar_convert(UConverter *converter, UChar *dest, int32_t destlen,
int32_t
icu_to_uchar(UChar **buff_uchar, const char *buff, size_t nbytes)
{
- int32_t len_uchar;
+ int32_t len_uchar;
init_icu_converter();
@@ -2781,11 +2783,11 @@ char *
icu_language_tag(const char *loc_str, int elevel)
{
#ifdef USE_ICU
- UErrorCode status;
- char lang[ULOC_LANG_CAPACITY];
- char *langtag;
- size_t buflen = 32; /* arbitrary starting buffer size */
- const bool strict = true;
+ UErrorCode status;
+ char lang[ULOC_LANG_CAPACITY];
+ char *langtag;
+ size_t buflen = 32; /* arbitrary starting buffer size */
+ const bool strict = true;
status = U_ZERO_ERROR;
uloc_getLanguage(loc_str, lang, ULOC_LANG_CAPACITY, &status);
@@ -2803,8 +2805,8 @@ icu_language_tag(const char *loc_str, int elevel)
return pstrdup("en-US-u-va-posix");
/*
- * A BCP47 language tag doesn't have a clearly-defined upper limit
- * (cf. RFC5646 section 4.4). Additionally, in older ICU versions,
+ * A BCP47 language tag doesn't have a clearly-defined upper limit (cf.
+ * RFC5646 section 4.4). Additionally, in older ICU versions,
* uloc_toLanguageTag() doesn't always return the ultimate length on the
* first call, necessitating a loop.
*/
@@ -2843,7 +2845,7 @@ icu_language_tag(const char *loc_str, int elevel)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("ICU is not supported in this build")));
- return NULL; /* keep compiler quiet */
+ return NULL; /* keep compiler quiet */
#endif /* not USE_ICU */
}
@@ -2854,11 +2856,11 @@ void
icu_validate_locale(const char *loc_str)
{
#ifdef USE_ICU
- UCollator *collator;
- UErrorCode status;
- char lang[ULOC_LANG_CAPACITY];
- bool found = false;
- int elevel = icu_validation_level;
+ UCollator *collator;
+ UErrorCode status;
+ char lang[ULOC_LANG_CAPACITY];
+ bool found = false;
+ int elevel = icu_validation_level;
/* no validation */
if (elevel < 0)
@@ -2889,8 +2891,8 @@ icu_validate_locale(const char *loc_str)
/* search for matching language within ICU */
for (int32_t i = 0; !found && i < uloc_countAvailable(); i++)
{
- const char *otherloc = uloc_getAvailable(i);
- char otherlang[ULOC_LANG_CAPACITY];
+ const char *otherloc = uloc_getAvailable(i);
+ char otherlang[ULOC_LANG_CAPACITY];
status = U_ZERO_ERROR;
uloc_getLanguage(otherloc, otherlang, ULOC_LANG_CAPACITY, &status);
diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index 6d673493cbc..d3a973d86b7 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -12587,7 +12587,7 @@ get_range_partbound_string(List *bound_datums)
foreach(cell, bound_datums)
{
PartitionRangeDatum *datum =
- lfirst_node(PartitionRangeDatum, cell);
+ lfirst_node(PartitionRangeDatum, cell);
appendStringInfoString(buf, sep);
if (datum->kind == PARTITION_RANGE_DATUM_MINVALUE)
diff --git a/src/backend/utils/adt/tsquery_op.c b/src/backend/utils/adt/tsquery_op.c
index 7e3bd51c1f8..2bc4ec904fe 100644
--- a/src/backend/utils/adt/tsquery_op.c
+++ b/src/backend/utils/adt/tsquery_op.c
@@ -150,9 +150,9 @@ Datum
tsquery_phrase(PG_FUNCTION_ARGS)
{
PG_RETURN_DATUM(DirectFunctionCall3(tsquery_phrase_distance,
- PG_GETARG_DATUM(0),
- PG_GETARG_DATUM(1),
- Int32GetDatum(1)));
+ PG_GETARG_DATUM(0),
+ PG_GETARG_DATUM(1),
+ Int32GetDatum(1)));
}
Datum
diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c
index a38db4697d3..4457c5d4f9f 100644
--- a/src/backend/utils/adt/tsvector_op.c
+++ b/src/backend/utils/adt/tsvector_op.c
@@ -525,7 +525,7 @@ tsvector_delete_by_indices(TSVector tsv, int *indices_to_delete,
if (arrin[i].haspos)
{
int len = POSDATALEN(tsv, arrin + i) * sizeof(WordEntryPos)
- + sizeof(uint16);
+ + sizeof(uint16);
curoff = SHORTALIGN(curoff);
memcpy(dataout + curoff,
diff --git a/src/backend/utils/adt/varchar.c b/src/backend/utils/adt/varchar.c
index 592afc18ecc..b92ff4d266e 100644
--- a/src/backend/utils/adt/varchar.c
+++ b/src/backend/utils/adt/varchar.c
@@ -1021,7 +1021,8 @@ hashbpchar(PG_FUNCTION_ARGS)
}
else
{
- Size bsize, rsize;
+ Size bsize,
+ rsize;
char *buf;
bsize = pg_strnxfrm(NULL, 0, keydata, keylen, mylocale);
@@ -1033,8 +1034,8 @@ hashbpchar(PG_FUNCTION_ARGS)
/*
* In principle, there's no reason to include the terminating NUL
- * character in the hash, but it was done before and the behavior
- * must be preserved.
+ * character in the hash, but it was done before and the behavior must
+ * be preserved.
*/
result = hash_any((uint8_t *) buf, bsize + 1);
@@ -1076,7 +1077,8 @@ hashbpcharextended(PG_FUNCTION_ARGS)
}
else
{
- Size bsize, rsize;
+ Size bsize,
+ rsize;
char *buf;
bsize = pg_strnxfrm(NULL, 0, keydata, keylen, mylocale);
@@ -1088,8 +1090,8 @@ hashbpcharextended(PG_FUNCTION_ARGS)
/*
* In principle, there's no reason to include the terminating NUL
- * character in the hash, but it was done before and the behavior
- * must be preserved.
+ * character in the hash, but it was done before and the behavior must
+ * be preserved.
*/
result = hash_any_extended((uint8_t *) buf, bsize + 1,
PG_GETARG_INT64(1));
diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c
index b5718764684..884bfbc8ceb 100644
--- a/src/backend/utils/adt/varlena.c
+++ b/src/backend/utils/adt/varlena.c
@@ -2312,8 +2312,7 @@ varstr_abbrev_convert(Datum original, SortSupport ssup)
memcpy(sss->buf1, authoritative_data, len);
/*
- * pg_strxfrm() and pg_strxfrm_prefix expect NUL-terminated
- * strings.
+ * pg_strxfrm() and pg_strxfrm_prefix expect NUL-terminated strings.
*/
sss->buf1[len] = '\0';
sss->last_len1 = len;
@@ -4523,7 +4522,7 @@ text_to_array(PG_FUNCTION_ARGS)
PG_RETURN_ARRAYTYPE_P(construct_empty_array(TEXTOID));
PG_RETURN_DATUM(makeArrayResult(tstate.astate,
- CurrentMemoryContext));
+ CurrentMemoryContext));
}
/*
diff --git a/src/backend/utils/adt/xid8funcs.c b/src/backend/utils/adt/xid8funcs.c
index 24271dfff73..06ae940df6f 100644
--- a/src/backend/utils/adt/xid8funcs.c
+++ b/src/backend/utils/adt/xid8funcs.c
@@ -519,7 +519,7 @@ pg_snapshot_recv(PG_FUNCTION_ARGS)
for (i = 0; i < nxip; i++)
{
FullTransactionId cur =
- FullTransactionIdFromU64((uint64) pq_getmsgint64(buf));
+ FullTransactionIdFromU64((uint64) pq_getmsgint64(buf));
if (FullTransactionIdPrecedes(cur, last) ||
FullTransactionIdPrecedes(cur, xmin) ||
diff --git a/src/backend/utils/adt/xml.c b/src/backend/utils/adt/xml.c
index 15adbd6a016..866d0d649a4 100644
--- a/src/backend/utils/adt/xml.c
+++ b/src/backend/utils/adt/xml.c
@@ -630,7 +630,7 @@ xmltotext_with_options(xmltype *data, XmlOptionType xmloption_arg, bool indent)
XmlOptionType parsed_xmloptiontype;
xmlNodePtr content_nodes;
volatile xmlBufferPtr buf = NULL;
- volatile xmlSaveCtxtPtr ctxt = NULL;
+ volatile xmlSaveCtxtPtr ctxt = NULL;
ErrorSaveContext escontext = {T_ErrorSaveContext};
PgXmlErrorContext *xmlerrcxt;
#endif
diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c
index c7607895cdd..60978f9415b 100644
--- a/src/backend/utils/cache/lsyscache.c
+++ b/src/backend/utils/cache/lsyscache.c
@@ -3603,7 +3603,7 @@ char *
get_publication_name(Oid pubid, bool missing_ok)
{
HeapTuple tup;
- char *pubname;
+ char *pubname;
Form_pg_publication pubform;
tup = SearchSysCache1(PUBLICATIONOID, ObjectIdGetDatum(pubid));
@@ -3630,16 +3630,16 @@ get_publication_name(Oid pubid, bool missing_ok)
* return InvalidOid.
*/
Oid
-get_subscription_oid(const char* subname, bool missing_ok)
+get_subscription_oid(const char *subname, bool missing_ok)
{
Oid oid;
oid = GetSysCacheOid2(SUBSCRIPTIONNAME, Anum_pg_subscription_oid,
- MyDatabaseId, CStringGetDatum(subname));
+ MyDatabaseId, CStringGetDatum(subname));
if (!OidIsValid(oid) && !missing_ok)
ereport(ERROR,
- (errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("subscription \"%s\" does not exist", subname)));
+ (errcode(ERRCODE_UNDEFINED_OBJECT),
+ errmsg("subscription \"%s\" does not exist", subname)));
return oid;
}
@@ -3653,7 +3653,7 @@ char *
get_subscription_name(Oid subid, bool missing_ok)
{
HeapTuple tup;
- char* subname;
+ char *subname;
Form_pg_subscription subform;
tup = SearchSysCache1(SUBSCRIPTIONOID, ObjectIdGetDatum(subid));
diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c
index 40140de9589..8a08463c2b7 100644
--- a/src/backend/utils/cache/relcache.c
+++ b/src/backend/utils/cache/relcache.c
@@ -3084,10 +3084,10 @@ static void
AssertPendingSyncConsistency(Relation relation)
{
bool relcache_verdict =
- RelationIsPermanent(relation) &&
- ((relation->rd_createSubid != InvalidSubTransactionId &&
- RELKIND_HAS_STORAGE(relation->rd_rel->relkind)) ||
- relation->rd_firstRelfilelocatorSubid != InvalidSubTransactionId);
+ RelationIsPermanent(relation) &&
+ ((relation->rd_createSubid != InvalidSubTransactionId &&
+ RELKIND_HAS_STORAGE(relation->rd_rel->relkind)) ||
+ relation->rd_firstRelfilelocatorSubid != InvalidSubTransactionId);
Assert(relcache_verdict == RelFileLocatorSkippingWAL(relation->rd_locator));
@@ -3765,12 +3765,12 @@ RelationSetNewRelfilenumber(Relation relation, char persistence)
*/
if (IsBinaryUpgrade)
{
- SMgrRelation srel;
+ SMgrRelation srel;
/*
* During a binary upgrade, we use this code path to ensure that
- * pg_largeobject and its index have the same relfilenumbers as in
- * the old cluster. This is necessary because pg_upgrade treats
+ * pg_largeobject and its index have the same relfilenumbers as in the
+ * old cluster. This is necessary because pg_upgrade treats
* pg_largeobject like a user table, not a system table. It is however
* possible that a table or index may need to end up with the same
* relfilenumber in the new cluster as what it had in the old cluster.
@@ -5171,8 +5171,8 @@ RelationGetIndexAttrBitmap(Relation relation, IndexAttrBitmapKind attrKind)
Bitmapset *uindexattrs; /* columns in unique indexes */
Bitmapset *pkindexattrs; /* columns in the primary index */
Bitmapset *idindexattrs; /* columns in the replica identity */
- Bitmapset *hotblockingattrs; /* columns with HOT blocking indexes */
- Bitmapset *summarizedattrs; /* columns with summarizing indexes */
+ Bitmapset *hotblockingattrs; /* columns with HOT blocking indexes */
+ Bitmapset *summarizedattrs; /* columns with summarizing indexes */
List *indexoidlist;
List *newindexoidlist;
Oid relpkindex;
@@ -5314,8 +5314,8 @@ restart:
* when the column value changes, thus require a separate
* attribute bitmapset.
*
- * Obviously, non-key columns couldn't be referenced by
- * foreign key or identity key. Hence we do not include them into
+ * Obviously, non-key columns couldn't be referenced by foreign
+ * key or identity key. Hence we do not include them into
* uindexattrs, pkindexattrs and idindexattrs bitmaps.
*/
if (attrnum != 0)
diff --git a/src/backend/utils/cache/relmapper.c b/src/backend/utils/cache/relmapper.c
index 4c21129707c..26575cae6c9 100644
--- a/src/backend/utils/cache/relmapper.c
+++ b/src/backend/utils/cache/relmapper.c
@@ -801,11 +801,11 @@ read_relmap_file(RelMapFile *map, char *dbpath, bool lock_held, int elevel)
/*
* Open the target file.
*
- * Because Windows isn't happy about the idea of renaming over a file
- * that someone has open, we only open this file after acquiring the lock,
- * and for the same reason, we close it before releasing the lock. That
- * way, by the time write_relmap_file() acquires an exclusive lock, no
- * one else will have it open.
+ * Because Windows isn't happy about the idea of renaming over a file that
+ * someone has open, we only open this file after acquiring the lock, and
+ * for the same reason, we close it before releasing the lock. That way,
+ * by the time write_relmap_file() acquires an exclusive lock, no one else
+ * will have it open.
*/
snprintf(mapfilename, sizeof(mapfilename), "%s/%s", dbpath,
RELMAPPER_FILENAME);
diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c
index 7458ef5c90f..9208c31fe06 100644
--- a/src/backend/utils/fmgr/fmgr.c
+++ b/src/backend/utils/fmgr/fmgr.c
@@ -2150,7 +2150,7 @@ CheckFunctionValidatorAccess(Oid validatorOid, Oid functionOid)
/* first validate that we have permissions to use the language */
aclresult = object_aclcheck(LanguageRelationId, procStruct->prolang, GetUserId(),
- ACL_USAGE);
+ ACL_USAGE);
if (aclresult != ACLCHECK_OK)
aclcheck_error(aclresult, OBJECT_LANGUAGE,
NameStr(langStruct->lanname));
diff --git a/src/backend/utils/generate-errcodes.pl b/src/backend/utils/generate-errcodes.pl
index dd8ac6d56d8..34d0f25c233 100644
--- a/src/backend/utils/generate-errcodes.pl
+++ b/src/backend/utils/generate-errcodes.pl
@@ -7,10 +7,9 @@ use strict;
use warnings;
use Getopt::Long;
-my $outfile = '';
+my $outfile = '';
-GetOptions(
- 'outfile=s' => \$outfile) or die "$0: wrong arguments";
+GetOptions('outfile=s' => \$outfile) or die "$0: wrong arguments";
open my $errcodes, '<', $ARGV[0]
or die "$0: could not open input file '$ARGV[0]': $!\n";
diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c
index 53420f4974f..88434c3e5d4 100644
--- a/src/backend/utils/init/postinit.c
+++ b/src/backend/utils/init/postinit.c
@@ -362,7 +362,7 @@ CheckMyDatabase(const char *name, bool am_superuser, bool override_allow_connect
*/
if (!am_superuser &&
object_aclcheck(DatabaseRelationId, MyDatabaseId, GetUserId(),
- ACL_CONNECT) != ACLCHECK_OK)
+ ACL_CONNECT) != ACLCHECK_OK)
ereport(FATAL,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
errmsg("permission denied for database \"%s\"", name),
@@ -933,10 +933,10 @@ InitPostgres(const char *in_dbname, Oid dboid,
}
/*
- * The last few connection slots are reserved for superusers and roles with
- * privileges of pg_use_reserved_connections. Replication connections are
- * drawn from slots reserved with max_wal_senders and are not limited by
- * max_connections, superuser_reserved_connections, or
+ * The last few connection slots are reserved for superusers and roles
+ * with privileges of pg_use_reserved_connections. Replication
+ * connections are drawn from slots reserved with max_wal_senders and are
+ * not limited by max_connections, superuser_reserved_connections, or
* reserved_connections.
*
* Note: At this point, the new backend has already claimed a proc struct,
diff --git a/src/backend/utils/init/usercontext.c b/src/backend/utils/init/usercontext.c
index 38bcfa60df6..dd9a0dd6a83 100644
--- a/src/backend/utils/init/usercontext.c
+++ b/src/backend/utils/init/usercontext.c
@@ -61,15 +61,15 @@ SwitchToUntrustedUser(Oid userid, UserContext *context)
}
else
{
- int sec_context = context->save_sec_context;
+ int sec_context = context->save_sec_context;
/*
* This user can SET ROLE to the target user, but not the other way
* around, so protect ourselves against the target user by setting
* SECURITY_RESTRICTED_OPERATION to prevent certain changes to the
- * session state. Also set up a new GUC nest level, so that we can roll
- * back any GUC changes that may be made by code running as the target
- * user, inasmuch as they could be malicious.
+ * session state. Also set up a new GUC nest level, so that we can
+ * roll back any GUC changes that may be made by code running as the
+ * target user, inasmuch as they could be malicious.
*/
sec_context |= SECURITY_RESTRICTED_OPERATION;
SetUserIdAndSecContext(userid, sec_context);
diff --git a/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl b/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl
index 40b3fb6db67..4c5724b8b75 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_BIG5.pl
@@ -40,7 +40,7 @@ my $cp950txt = &read_source("CP950.TXT");
foreach my $i (@$cp950txt)
{
my $code = $i->{code};
- my $ucs = $i->{ucs};
+ my $ucs = $i->{ucs};
# Pick only the ETEN extended characters in the range 0xf9d6 - 0xf9dc
# from CP950.TXT
@@ -51,12 +51,12 @@ foreach my $i (@$cp950txt)
{
push @$all,
{
- code => $code,
- ucs => $ucs,
- comment => $i->{comment},
+ code => $code,
+ ucs => $ucs,
+ comment => $i->{comment},
direction => BOTH,
- f => $i->{f},
- l => $i->{l}
+ f => $i->{f},
+ l => $i->{l}
};
}
}
@@ -64,7 +64,7 @@ foreach my $i (@$cp950txt)
foreach my $i (@$all)
{
my $code = $i->{code};
- my $ucs = $i->{ucs};
+ my $ucs = $i->{ucs};
# BIG5.TXT maps several BIG5 characters to U+FFFD. The UTF-8 to BIG5 mapping can
# contain only one of them. XXX: Doesn't really make sense to include any of them,
diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
index adfdca24f71..f9ff2bd3d2a 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_CN.pl
@@ -33,7 +33,7 @@ while (<$in>)
next if (!m/<a u="([0-9A-F]+)" b="([0-9A-F ]+)"/);
my ($u, $c) = ($1, $2);
$c =~ s/ //g;
- my $ucs = hex($u);
+ my $ucs = hex($u);
my $code = hex($c);
# The GB-18030 character set, which we use as the source, contains
@@ -73,11 +73,11 @@ while (<$in>)
push @mapping,
{
- ucs => $ucs,
- code => $code,
+ ucs => $ucs,
+ code => $code,
direction => BOTH,
- f => $in_file,
- l => $.
+ f => $in_file,
+ l => $.
};
}
close($in);
diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
index b7715ed4195..2d0e05fb794 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_JIS_2004.pl
@@ -37,13 +37,13 @@ while (my $line = <$in>)
push @all,
{
- direction => BOTH,
- ucs => $ucs1,
+ direction => BOTH,
+ ucs => $ucs1,
ucs_second => $ucs2,
- code => $code,
- comment => $rest,
- f => $in_file,
- l => $.
+ code => $code,
+ comment => $rest,
+ f => $in_file,
+ l => $.
};
}
elsif ($line =~ /^0x(\w+)\s*U\+(\w+)\s*#\s*(\S.*)?\s*$/)
@@ -51,7 +51,7 @@ while (my $line = <$in>)
# non-combined characters
my ($c, $u, $rest) = ($1, $2, "U+" . $2 . $3);
- my $ucs = hex($u);
+ my $ucs = hex($u);
my $code = hex($c);
next if ($code < 0x80 && $ucs < 0x80);
@@ -59,11 +59,11 @@ while (my $line = <$in>)
push @all,
{
direction => BOTH,
- ucs => $ucs,
- code => $code,
- comment => $rest,
- f => $in_file,
- l => $.
+ ucs => $ucs,
+ code => $code,
+ comment => $rest,
+ f => $in_file,
+ l => $.
};
}
}
diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
index 9c949f95b15..4073578027e 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_JP.pl
@@ -120,521 +120,521 @@ foreach my $i (grep defined $_->{sjis}, @mapping)
push @mapping, (
{
direction => BOTH,
- ucs => 0x4efc,
- code => 0x8ff4af,
- comment => '# CJK(4EFC)'
+ ucs => 0x4efc,
+ code => 0x8ff4af,
+ comment => '# CJK(4EFC)'
},
{
direction => BOTH,
- ucs => 0x50f4,
- code => 0x8ff4b0,
- comment => '# CJK(50F4)'
+ ucs => 0x50f4,
+ code => 0x8ff4b0,
+ comment => '# CJK(50F4)'
},
{
direction => BOTH,
- ucs => 0x51EC,
- code => 0x8ff4b1,
- comment => '# CJK(51EC)'
+ ucs => 0x51EC,
+ code => 0x8ff4b1,
+ comment => '# CJK(51EC)'
},
{
direction => BOTH,
- ucs => 0x5307,
- code => 0x8ff4b2,
- comment => '# CJK(5307)'
+ ucs => 0x5307,
+ code => 0x8ff4b2,
+ comment => '# CJK(5307)'
},
{
direction => BOTH,
- ucs => 0x5324,
- code => 0x8ff4b3,
- comment => '# CJK(5324)'
+ ucs => 0x5324,
+ code => 0x8ff4b3,
+ comment => '# CJK(5324)'
},
{
direction => BOTH,
- ucs => 0x548A,
- code => 0x8ff4b5,
- comment => '# CJK(548A)'
+ ucs => 0x548A,
+ code => 0x8ff4b5,
+ comment => '# CJK(548A)'
},
{
direction => BOTH,
- ucs => 0x5759,
- code => 0x8ff4b6,
- comment => '# CJK(5759)'
+ ucs => 0x5759,
+ code => 0x8ff4b6,
+ comment => '# CJK(5759)'
},
{
direction => BOTH,
- ucs => 0x589E,
- code => 0x8ff4b9,
- comment => '# CJK(589E)'
+ ucs => 0x589E,
+ code => 0x8ff4b9,
+ comment => '# CJK(589E)'
},
{
direction => BOTH,
- ucs => 0x5BEC,
- code => 0x8ff4ba,
- comment => '# CJK(5BEC)'
+ ucs => 0x5BEC,
+ code => 0x8ff4ba,
+ comment => '# CJK(5BEC)'
},
{
direction => BOTH,
- ucs => 0x5CF5,
- code => 0x8ff4bb,
- comment => '# CJK(5CF5)'
+ ucs => 0x5CF5,
+ code => 0x8ff4bb,
+ comment => '# CJK(5CF5)'
},
{
direction => BOTH,
- ucs => 0x5D53,
- code => 0x8ff4bc,
- comment => '# CJK(5D53)'
+ ucs => 0x5D53,
+ code => 0x8ff4bc,
+ comment => '# CJK(5D53)'
},
{
direction => BOTH,
- ucs => 0x5FB7,
- code => 0x8ff4be,
- comment => '# CJK(5FB7)'
+ ucs => 0x5FB7,
+ code => 0x8ff4be,
+ comment => '# CJK(5FB7)'
},
{
direction => BOTH,
- ucs => 0x6085,
- code => 0x8ff4bf,
- comment => '# CJK(6085)'
+ ucs => 0x6085,
+ code => 0x8ff4bf,
+ comment => '# CJK(6085)'
},
{
direction => BOTH,
- ucs => 0x6120,
- code => 0x8ff4c0,
- comment => '# CJK(6120)'
+ ucs => 0x6120,
+ code => 0x8ff4c0,
+ comment => '# CJK(6120)'
},
{
direction => BOTH,
- ucs => 0x654E,
- code => 0x8ff4c1,
- comment => '# CJK(654E)'
+ ucs => 0x654E,
+ code => 0x8ff4c1,
+ comment => '# CJK(654E)'
},
{
direction => BOTH,
- ucs => 0x663B,
- code => 0x8ff4c2,
- comment => '# CJK(663B)'
+ ucs => 0x663B,
+ code => 0x8ff4c2,
+ comment => '# CJK(663B)'
},
{
direction => BOTH,
- ucs => 0x6665,
- code => 0x8ff4c3,
- comment => '# CJK(6665)'
+ ucs => 0x6665,
+ code => 0x8ff4c3,
+ comment => '# CJK(6665)'
},
{
direction => BOTH,
- ucs => 0x6801,
- code => 0x8ff4c6,
- comment => '# CJK(6801)'
+ ucs => 0x6801,
+ code => 0x8ff4c6,
+ comment => '# CJK(6801)'
},
{
direction => BOTH,
- ucs => 0x6A6B,
- code => 0x8ff4c9,
- comment => '# CJK(6A6B)'
+ ucs => 0x6A6B,
+ code => 0x8ff4c9,
+ comment => '# CJK(6A6B)'
},
{
direction => BOTH,
- ucs => 0x6AE2,
- code => 0x8ff4ca,
- comment => '# CJK(6AE2)'
+ ucs => 0x6AE2,
+ code => 0x8ff4ca,
+ comment => '# CJK(6AE2)'
},
{
direction => BOTH,
- ucs => 0x6DF2,
- code => 0x8ff4cc,
- comment => '# CJK(6DF2)'
+ ucs => 0x6DF2,
+ code => 0x8ff4cc,
+ comment => '# CJK(6DF2)'
},
{
direction => BOTH,
- ucs => 0x6DF8,
- code => 0x8ff4cb,
- comment => '# CJK(6DF8)'
+ ucs => 0x6DF8,
+ code => 0x8ff4cb,
+ comment => '# CJK(6DF8)'
},
{
direction => BOTH,
- ucs => 0x7028,
- code => 0x8ff4cd,
- comment => '# CJK(7028)'
+ ucs => 0x7028,
+ code => 0x8ff4cd,
+ comment => '# CJK(7028)'
},
{
direction => BOTH,
- ucs => 0x70BB,
- code => 0x8ff4ae,
- comment => '# CJK(70BB)'
+ ucs => 0x70BB,
+ code => 0x8ff4ae,
+ comment => '# CJK(70BB)'
},
{
direction => BOTH,
- ucs => 0x7501,
- code => 0x8ff4d0,
- comment => '# CJK(7501)'
+ ucs => 0x7501,
+ code => 0x8ff4d0,
+ comment => '# CJK(7501)'
},
{
direction => BOTH,
- ucs => 0x7682,
- code => 0x8ff4d1,
- comment => '# CJK(7682)'
+ ucs => 0x7682,
+ code => 0x8ff4d1,
+ comment => '# CJK(7682)'
},
{
direction => BOTH,
- ucs => 0x769E,
- code => 0x8ff4d2,
- comment => '# CJK(769E)'
+ ucs => 0x769E,
+ code => 0x8ff4d2,
+ comment => '# CJK(769E)'
},
{
direction => BOTH,
- ucs => 0x7930,
- code => 0x8ff4d4,
- comment => '# CJK(7930)'
+ ucs => 0x7930,
+ code => 0x8ff4d4,
+ comment => '# CJK(7930)'
},
{
direction => BOTH,
- ucs => 0x7AE7,
- code => 0x8ff4d9,
- comment => '# CJK(7AE7)'
+ ucs => 0x7AE7,
+ code => 0x8ff4d9,
+ comment => '# CJK(7AE7)'
},
{
direction => BOTH,
- ucs => 0x7DA0,
- code => 0x8ff4dc,
- comment => '# CJK(7DA0)'
+ ucs => 0x7DA0,
+ code => 0x8ff4dc,
+ comment => '# CJK(7DA0)'
},
{
direction => BOTH,
- ucs => 0x7DD6,
- code => 0x8ff4dd,
- comment => '# CJK(7DD6)'
+ ucs => 0x7DD6,
+ code => 0x8ff4dd,
+ comment => '# CJK(7DD6)'
},
{
direction => BOTH,
- ucs => 0x8362,
- code => 0x8ff4df,
- comment => '# CJK(8362)'
+ ucs => 0x8362,
+ code => 0x8ff4df,
+ comment => '# CJK(8362)'
},
{
direction => BOTH,
- ucs => 0x85B0,
- code => 0x8ff4e1,
- comment => '# CJK(85B0)'
+ ucs => 0x85B0,
+ code => 0x8ff4e1,
+ comment => '# CJK(85B0)'
},
{
direction => BOTH,
- ucs => 0x8807,
- code => 0x8ff4e4,
- comment => '# CJK(8807)'
+ ucs => 0x8807,
+ code => 0x8ff4e4,
+ comment => '# CJK(8807)'
},
{
direction => BOTH,
- ucs => 0x8B7F,
- code => 0x8ff4e6,
- comment => '# CJK(8B7F)'
+ ucs => 0x8B7F,
+ code => 0x8ff4e6,
+ comment => '# CJK(8B7F)'
},
{
direction => BOTH,
- ucs => 0x8CF4,
- code => 0x8ff4e7,
- comment => '# CJK(8CF4)'
+ ucs => 0x8CF4,
+ code => 0x8ff4e7,
+ comment => '# CJK(8CF4)'
},
{
direction => BOTH,
- ucs => 0x8D76,
- code => 0x8ff4e8,
- comment => '# CJK(8D76)'
+ ucs => 0x8D76,
+ code => 0x8ff4e8,
+ comment => '# CJK(8D76)'
},
{
direction => BOTH,
- ucs => 0x90DE,
- code => 0x8ff4ec,
- comment => '# CJK(90DE)'
+ ucs => 0x90DE,
+ code => 0x8ff4ec,
+ comment => '# CJK(90DE)'
},
{
direction => BOTH,
- ucs => 0x9115,
- code => 0x8ff4ee,
- comment => '# CJK(9115)'
+ ucs => 0x9115,
+ code => 0x8ff4ee,
+ comment => '# CJK(9115)'
},
{
direction => BOTH,
- ucs => 0x9592,
- code => 0x8ff4f1,
- comment => '# CJK(9592)'
+ ucs => 0x9592,
+ code => 0x8ff4f1,
+ comment => '# CJK(9592)'
},
{
direction => BOTH,
- ucs => 0x973B,
- code => 0x8ff4f4,
- comment => '# CJK(973B)'
+ ucs => 0x973B,
+ code => 0x8ff4f4,
+ comment => '# CJK(973B)'
},
{
direction => BOTH,
- ucs => 0x974D,
- code => 0x8ff4f5,
- comment => '# CJK(974D)'
+ ucs => 0x974D,
+ code => 0x8ff4f5,
+ comment => '# CJK(974D)'
},
{
direction => BOTH,
- ucs => 0x9751,
- code => 0x8ff4f6,
- comment => '# CJK(9751)'
+ ucs => 0x9751,
+ code => 0x8ff4f6,
+ comment => '# CJK(9751)'
},
{
direction => BOTH,
- ucs => 0x999E,
- code => 0x8ff4fa,
- comment => '# CJK(999E)'
+ ucs => 0x999E,
+ code => 0x8ff4fa,
+ comment => '# CJK(999E)'
},
{
direction => BOTH,
- ucs => 0x9AD9,
- code => 0x8ff4fb,
- comment => '# CJK(9AD9)'
+ ucs => 0x9AD9,
+ code => 0x8ff4fb,
+ comment => '# CJK(9AD9)'
},
{
direction => BOTH,
- ucs => 0x9B72,
- code => 0x8ff4fc,
- comment => '# CJK(9B72)'
+ ucs => 0x9B72,
+ code => 0x8ff4fc,
+ comment => '# CJK(9B72)'
},
{
direction => BOTH,
- ucs => 0x9ED1,
- code => 0x8ff4fe,
- comment => '# CJK(9ED1)'
+ ucs => 0x9ED1,
+ code => 0x8ff4fe,
+ comment => '# CJK(9ED1)'
},
{
direction => BOTH,
- ucs => 0xF929,
- code => 0x8ff4c5,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-F929'
+ ucs => 0xF929,
+ code => 0x8ff4c5,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-F929'
},
{
direction => BOTH,
- ucs => 0xF9DC,
- code => 0x8ff4f2,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-F9DC'
+ ucs => 0xF9DC,
+ code => 0x8ff4f2,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-F9DC'
},
{
direction => BOTH,
- ucs => 0xFA0E,
- code => 0x8ff4b4,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA0E'
+ ucs => 0xFA0E,
+ code => 0x8ff4b4,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA0E'
},
{
direction => BOTH,
- ucs => 0xFA0F,
- code => 0x8ff4b7,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA0F'
+ ucs => 0xFA0F,
+ code => 0x8ff4b7,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA0F'
},
{
direction => BOTH,
- ucs => 0xFA10,
- code => 0x8ff4b8,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA10'
+ ucs => 0xFA10,
+ code => 0x8ff4b8,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA10'
},
{
direction => BOTH,
- ucs => 0xFA11,
- code => 0x8ff4bd,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA11'
+ ucs => 0xFA11,
+ code => 0x8ff4bd,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA11'
},
{
direction => BOTH,
- ucs => 0xFA12,
- code => 0x8ff4c4,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA12'
+ ucs => 0xFA12,
+ code => 0x8ff4c4,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA12'
},
{
direction => BOTH,
- ucs => 0xFA13,
- code => 0x8ff4c7,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA13'
+ ucs => 0xFA13,
+ code => 0x8ff4c7,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA13'
},
{
direction => BOTH,
- ucs => 0xFA14,
- code => 0x8ff4c8,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA14'
+ ucs => 0xFA14,
+ code => 0x8ff4c8,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA14'
},
{
direction => BOTH,
- ucs => 0xFA15,
- code => 0x8ff4ce,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA15'
+ ucs => 0xFA15,
+ code => 0x8ff4ce,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA15'
},
{
direction => BOTH,
- ucs => 0xFA16,
- code => 0x8ff4cf,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA16'
+ ucs => 0xFA16,
+ code => 0x8ff4cf,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA16'
},
{
direction => BOTH,
- ucs => 0xFA17,
- code => 0x8ff4d3,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA17'
+ ucs => 0xFA17,
+ code => 0x8ff4d3,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA17'
},
{
direction => BOTH,
- ucs => 0xFA18,
- code => 0x8ff4d5,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA18'
+ ucs => 0xFA18,
+ code => 0x8ff4d5,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA18'
},
{
direction => BOTH,
- ucs => 0xFA19,
- code => 0x8ff4d6,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA19'
+ ucs => 0xFA19,
+ code => 0x8ff4d6,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA19'
},
{
direction => BOTH,
- ucs => 0xFA1A,
- code => 0x8ff4d7,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1A'
+ ucs => 0xFA1A,
+ code => 0x8ff4d7,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1A'
},
{
direction => BOTH,
- ucs => 0xFA1B,
- code => 0x8ff4d8,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1B'
+ ucs => 0xFA1B,
+ code => 0x8ff4d8,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1B'
},
{
direction => BOTH,
- ucs => 0xFA1C,
- code => 0x8ff4da,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1C'
+ ucs => 0xFA1C,
+ code => 0x8ff4da,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1C'
},
{
direction => BOTH,
- ucs => 0xFA1D,
- code => 0x8ff4db,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1D'
+ ucs => 0xFA1D,
+ code => 0x8ff4db,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1D'
},
{
direction => BOTH,
- ucs => 0xFA1E,
- code => 0x8ff4de,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1E'
+ ucs => 0xFA1E,
+ code => 0x8ff4de,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1E'
},
{
direction => BOTH,
- ucs => 0xFA1F,
- code => 0x8ff4e0,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1F'
+ ucs => 0xFA1F,
+ code => 0x8ff4e0,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA1F'
},
{
direction => BOTH,
- ucs => 0xFA20,
- code => 0x8ff4e2,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA20'
+ ucs => 0xFA20,
+ code => 0x8ff4e2,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA20'
},
{
direction => BOTH,
- ucs => 0xFA21,
- code => 0x8ff4e3,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA21'
+ ucs => 0xFA21,
+ code => 0x8ff4e3,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA21'
},
{
direction => BOTH,
- ucs => 0xFA22,
- code => 0x8ff4e5,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA22'
+ ucs => 0xFA22,
+ code => 0x8ff4e5,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA22'
},
{
direction => BOTH,
- ucs => 0xFA23,
- code => 0x8ff4e9,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA23'
+ ucs => 0xFA23,
+ code => 0x8ff4e9,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA23'
},
{
direction => BOTH,
- ucs => 0xFA24,
- code => 0x8ff4ea,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA24'
+ ucs => 0xFA24,
+ code => 0x8ff4ea,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA24'
},
{
direction => BOTH,
- ucs => 0xFA25,
- code => 0x8ff4eb,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA25'
+ ucs => 0xFA25,
+ code => 0x8ff4eb,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA25'
},
{
direction => BOTH,
- ucs => 0xFA26,
- code => 0x8ff4ed,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA26'
+ ucs => 0xFA26,
+ code => 0x8ff4ed,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA26'
},
{
direction => BOTH,
- ucs => 0xFA27,
- code => 0x8ff4ef,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA27'
+ ucs => 0xFA27,
+ code => 0x8ff4ef,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA27'
},
{
direction => BOTH,
- ucs => 0xFA28,
- code => 0x8ff4f0,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA28'
+ ucs => 0xFA28,
+ code => 0x8ff4f0,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA28'
},
{
direction => BOTH,
- ucs => 0xFA29,
- code => 0x8ff4f3,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA29'
+ ucs => 0xFA29,
+ code => 0x8ff4f3,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA29'
},
{
direction => BOTH,
- ucs => 0xFA2A,
- code => 0x8ff4f7,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2A'
+ ucs => 0xFA2A,
+ code => 0x8ff4f7,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2A'
},
{
direction => BOTH,
- ucs => 0xFA2B,
- code => 0x8ff4f8,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2B'
+ ucs => 0xFA2B,
+ code => 0x8ff4f8,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2B'
},
{
direction => BOTH,
- ucs => 0xFA2C,
- code => 0x8ff4f9,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2C'
+ ucs => 0xFA2C,
+ code => 0x8ff4f9,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2C'
},
{
direction => BOTH,
- ucs => 0xFA2D,
- code => 0x8ff4fd,
- comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2D'
+ ucs => 0xFA2D,
+ code => 0x8ff4fd,
+ comment => '# CJK COMPATIBILITY IDEOGRAPH-FA2D'
},
{
direction => BOTH,
- ucs => 0xFF07,
- code => 0x8ff4a9,
- comment => '# FULLWIDTH APOSTROPHE'
+ ucs => 0xFF07,
+ code => 0x8ff4a9,
+ comment => '# FULLWIDTH APOSTROPHE'
},
{
direction => BOTH,
- ucs => 0xFFE4,
- code => 0x8fa2c3,
- comment => '# FULLWIDTH BROKEN BAR'
+ ucs => 0xFFE4,
+ code => 0x8fa2c3,
+ comment => '# FULLWIDTH BROKEN BAR'
},
# additional conversions for EUC_JP -> UTF-8 conversion
{
direction => TO_UNICODE,
- ucs => 0x2116,
- code => 0x8ff4ac,
- comment => '# NUMERO SIGN'
+ ucs => 0x2116,
+ code => 0x8ff4ac,
+ comment => '# NUMERO SIGN'
},
{
direction => TO_UNICODE,
- ucs => 0x2121,
- code => 0x8ff4ad,
- comment => '# TELEPHONE SIGN'
+ ucs => 0x2121,
+ code => 0x8ff4ad,
+ comment => '# TELEPHONE SIGN'
},
{
direction => TO_UNICODE,
- ucs => 0x3231,
- code => 0x8ff4ab,
- comment => '# PARENTHESIZED IDEOGRAPH STOCK'
+ ucs => 0x3231,
+ code => 0x8ff4ab,
+ comment => '# PARENTHESIZED IDEOGRAPH STOCK'
});
print_conversion_tables($this_script, "EUC_JP", \@mapping);
diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl
index 4c3989d2c51..9112e1cfe9b 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_KR.pl
@@ -36,27 +36,27 @@ foreach my $i (@$mapping)
push @$mapping,
( {
direction => BOTH,
- ucs => 0x20AC,
- code => 0xa2e6,
- comment => '# EURO SIGN',
- f => $this_script,
- l => __LINE__
+ ucs => 0x20AC,
+ code => 0xa2e6,
+ comment => '# EURO SIGN',
+ f => $this_script,
+ l => __LINE__
},
{
direction => BOTH,
- ucs => 0x00AE,
- code => 0xa2e7,
- comment => '# REGISTERED SIGN',
- f => $this_script,
- l => __LINE__
+ ucs => 0x00AE,
+ code => 0xa2e7,
+ comment => '# REGISTERED SIGN',
+ f => $this_script,
+ l => __LINE__
},
{
direction => BOTH,
- ucs => 0x327E,
- code => 0xa2e8,
- comment => '# CIRCLED HANGUL IEUNG U',
- f => $this_script,
- l => __LINE__
+ ucs => 0x327E,
+ code => 0xa2e8,
+ comment => '# CIRCLED HANGUL IEUNG U',
+ f => $this_script,
+ l => __LINE__
});
print_conversion_tables($this_script, "EUC_KR", $mapping);
diff --git a/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl b/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
index ecc175528ec..4ad17064abc 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_EUC_TW.pl
@@ -30,8 +30,8 @@ my @extras;
foreach my $i (@$mapping)
{
- my $ucs = $i->{ucs};
- my $code = $i->{code};
+ my $ucs = $i->{ucs};
+ my $code = $i->{code};
my $origcode = $i->{code};
my $plane = ($code & 0x1f0000) >> 16;
@@ -56,12 +56,12 @@ foreach my $i (@$mapping)
{
push @extras,
{
- ucs => $i->{ucs},
- code => ($i->{code} + 0x8ea10000),
- rest => $i->{rest},
+ ucs => $i->{ucs},
+ code => ($i->{code} + 0x8ea10000),
+ rest => $i->{rest},
direction => TO_UNICODE,
- f => $i->{f},
- l => $i->{l}
+ f => $i->{f},
+ l => $i->{l}
};
}
}
diff --git a/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl b/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
index fb401e60991..9c8a983bf71 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_GB18030.pl
@@ -33,17 +33,17 @@ while (<$in>)
next if (!m/<a u="([0-9A-F]+)" b="([0-9A-F ]+)"/);
my ($u, $c) = ($1, $2);
$c =~ s/ //g;
- my $ucs = hex($u);
+ my $ucs = hex($u);
my $code = hex($c);
if ($code >= 0x80 && $ucs >= 0x0080)
{
push @mapping,
{
- ucs => $ucs,
- code => $code,
+ ucs => $ucs,
+ code => $code,
direction => BOTH,
- f => $in_file,
- l => $.
+ f => $in_file,
+ l => $.
};
}
}
diff --git a/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl b/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl
index 370c5b801c9..f50baa8f1f4 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_JOHAB.pl
@@ -30,27 +30,27 @@ my $mapping = &read_source("JOHAB.TXT");
push @$mapping,
( {
direction => BOTH,
- ucs => 0x20AC,
- code => 0xd9e6,
- comment => '# EURO SIGN',
- f => $this_script,
- l => __LINE__
+ ucs => 0x20AC,
+ code => 0xd9e6,
+ comment => '# EURO SIGN',
+ f => $this_script,
+ l => __LINE__
},
{
direction => BOTH,
- ucs => 0x00AE,
- code => 0xd9e7,
- comment => '# REGISTERED SIGN',
- f => $this_script,
- l => __LINE__
+ ucs => 0x00AE,
+ code => 0xd9e7,
+ comment => '# REGISTERED SIGN',
+ f => $this_script,
+ l => __LINE__
},
{
direction => BOTH,
- ucs => 0x327E,
- code => 0xd9e8,
- comment => '# CIRCLED HANGUL IEUNG U',
- f => $this_script,
- l => __LINE__
+ ucs => 0x327E,
+ code => 0xd9e8,
+ comment => '# CIRCLED HANGUL IEUNG U',
+ f => $this_script,
+ l => __LINE__
});
print_conversion_tables($this_script, "JOHAB", $mapping);
diff --git a/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl b/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl
index 6431aba555d..ed010a58fac 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_SHIFT_JIS_2004.pl
@@ -37,13 +37,13 @@ while (my $line = <$in>)
push @mapping,
{
- code => $code,
- ucs => $ucs1,
+ code => $code,
+ ucs => $ucs1,
ucs_second => $ucs2,
- comment => $rest,
- direction => BOTH,
- f => $in_file,
- l => $.
+ comment => $rest,
+ direction => BOTH,
+ f => $in_file,
+ l => $.
};
}
elsif ($line =~ /^0x(\w+)\s*U\+(\w+)\s*#\s*(\S.*)?\s*$/)
@@ -51,7 +51,7 @@ while (my $line = <$in>)
# non-combined characters
my ($c, $u, $rest) = ($1, $2, "U+" . $2 . $3);
- my $ucs = hex($u);
+ my $ucs = hex($u);
my $code = hex($c);
my $direction;
@@ -74,12 +74,12 @@ while (my $line = <$in>)
push @mapping,
{
- code => $code,
- ucs => $ucs,
- comment => $rest,
+ code => $code,
+ ucs => $ucs,
+ comment => $rest,
direction => $direction,
- f => $in_file,
- l => $.
+ f => $in_file,
+ l => $.
};
}
}
diff --git a/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl b/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
index 6426cf47942..0808c6836b3 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_SJIS.pl
@@ -22,13 +22,13 @@ my $mapping = read_source("CP932.TXT");
# Drop these SJIS codes from the source for UTF8=>SJIS conversion
my @reject_sjis = (
0xed40 .. 0xeefc, 0x8754 .. 0x875d, 0x878a, 0x8782,
- 0x8784, 0xfa5b, 0xfa54, 0x8790 .. 0x8792,
+ 0x8784, 0xfa5b, 0xfa54, 0x8790 .. 0x8792,
0x8795 .. 0x8797, 0x879a .. 0x879c);
foreach my $i (@$mapping)
{
my $code = $i->{code};
- my $ucs = $i->{ucs};
+ my $ucs = $i->{ucs};
if (grep { $code == $_ } @reject_sjis)
{
@@ -40,67 +40,67 @@ foreach my $i (@$mapping)
push @$mapping,
( {
direction => FROM_UNICODE,
- ucs => 0x00a2,
- code => 0x8191,
- comment => '# CENT SIGN',
- f => $this_script,
- l => __LINE__
+ ucs => 0x00a2,
+ code => 0x8191,
+ comment => '# CENT SIGN',
+ f => $this_script,
+ l => __LINE__
},
{
direction => FROM_UNICODE,
- ucs => 0x00a3,
- code => 0x8192,
- comment => '# POUND SIGN',
- f => $this_script,
- l => __LINE__
+ ucs => 0x00a3,
+ code => 0x8192,
+ comment => '# POUND SIGN',
+ f => $this_script,
+ l => __LINE__
},
{
direction => FROM_UNICODE,
- ucs => 0x00a5,
- code => 0x5c,
- comment => '# YEN SIGN',
- f => $this_script,
- l => __LINE__
+ ucs => 0x00a5,
+ code => 0x5c,
+ comment => '# YEN SIGN',
+ f => $this_script,
+ l => __LINE__
},
{
direction => FROM_UNICODE,
- ucs => 0x00ac,
- code => 0x81ca,
- comment => '# NOT SIGN',
- f => $this_script,
- l => __LINE__
+ ucs => 0x00ac,
+ code => 0x81ca,
+ comment => '# NOT SIGN',
+ f => $this_script,
+ l => __LINE__
},
{
direction => FROM_UNICODE,
- ucs => 0x2016,
- code => 0x8161,
- comment => '# DOUBLE VERTICAL LINE',
- f => $this_script,
- l => __LINE__
+ ucs => 0x2016,
+ code => 0x8161,
+ comment => '# DOUBLE VERTICAL LINE',
+ f => $this_script,
+ l => __LINE__
},
{
direction => FROM_UNICODE,
- ucs => 0x203e,
- code => 0x7e,
- comment => '# OVERLINE',
- f => $this_script,
- l => __LINE__
+ ucs => 0x203e,
+ code => 0x7e,
+ comment => '# OVERLINE',
+ f => $this_script,
+ l => __LINE__
},
{
direction => FROM_UNICODE,
- ucs => 0x2212,
- code => 0x817c,
- comment => '# MINUS SIGN',
- f => $this_script,
- l => __LINE__
+ ucs => 0x2212,
+ code => 0x817c,
+ comment => '# MINUS SIGN',
+ f => $this_script,
+ l => __LINE__
},
{
direction => FROM_UNICODE,
- ucs => 0x301c,
- code => 0x8160,
- comment => '# WAVE DASH',
- f => $this_script,
- l => __LINE__
+ ucs => 0x301c,
+ code => 0x8160,
+ comment => '# WAVE DASH',
+ f => $this_script,
+ l => __LINE__
});
print_conversion_tables($this_script, "SJIS", $mapping);
diff --git a/src/backend/utils/mb/Unicode/UCS_to_UHC.pl b/src/backend/utils/mb/Unicode/UCS_to_UHC.pl
index 5ec9c069b7d..207677d76dc 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_UHC.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_UHC.pl
@@ -33,7 +33,7 @@ while (<$in>)
next if (!m/<a u="([0-9A-F]+)" b="([0-9A-F ]+)"/);
my ($u, $c) = ($1, $2);
$c =~ s/ //g;
- my $ucs = hex($u);
+ my $ucs = hex($u);
my $code = hex($c);
next if ($code == 0x0080 || $code == 0x00FF);
@@ -42,11 +42,11 @@ while (<$in>)
{
push @mapping,
{
- ucs => $ucs,
- code => $code,
+ ucs => $ucs,
+ code => $code,
direction => BOTH,
- f => $in_file,
- l => $.
+ f => $in_file,
+ l => $.
};
}
}
@@ -56,11 +56,11 @@ close($in);
push @mapping,
{
direction => BOTH,
- code => 0xa2e8,
- ucs => 0x327e,
- comment => 'CIRCLED HANGUL IEUNG U',
- f => $this_script,
- l => __LINE__
+ code => 0xa2e8,
+ ucs => 0x327e,
+ comment => 'CIRCLED HANGUL IEUNG U',
+ f => $this_script,
+ l => __LINE__
};
print_conversion_tables($this_script, "UHC", \@mapping);
diff --git a/src/backend/utils/mb/Unicode/UCS_to_most.pl b/src/backend/utils/mb/Unicode/UCS_to_most.pl
index 1917f86f0a3..a1947308ffa 100755
--- a/src/backend/utils/mb/Unicode/UCS_to_most.pl
+++ b/src/backend/utils/mb/Unicode/UCS_to_most.pl
@@ -23,33 +23,33 @@ use convutils;
my $this_script = 'src/backend/utils/mb/Unicode/UCS_to_most.pl';
my %filename = (
- 'WIN866' => 'CP866.TXT',
- 'WIN874' => 'CP874.TXT',
- 'WIN1250' => 'CP1250.TXT',
- 'WIN1251' => 'CP1251.TXT',
- 'WIN1252' => 'CP1252.TXT',
- 'WIN1253' => 'CP1253.TXT',
- 'WIN1254' => 'CP1254.TXT',
- 'WIN1255' => 'CP1255.TXT',
- 'WIN1256' => 'CP1256.TXT',
- 'WIN1257' => 'CP1257.TXT',
- 'WIN1258' => 'CP1258.TXT',
- 'ISO8859_2' => '8859-2.TXT',
- 'ISO8859_3' => '8859-3.TXT',
- 'ISO8859_4' => '8859-4.TXT',
- 'ISO8859_5' => '8859-5.TXT',
- 'ISO8859_6' => '8859-6.TXT',
- 'ISO8859_7' => '8859-7.TXT',
- 'ISO8859_8' => '8859-8.TXT',
- 'ISO8859_9' => '8859-9.TXT',
+ 'WIN866' => 'CP866.TXT',
+ 'WIN874' => 'CP874.TXT',
+ 'WIN1250' => 'CP1250.TXT',
+ 'WIN1251' => 'CP1251.TXT',
+ 'WIN1252' => 'CP1252.TXT',
+ 'WIN1253' => 'CP1253.TXT',
+ 'WIN1254' => 'CP1254.TXT',
+ 'WIN1255' => 'CP1255.TXT',
+ 'WIN1256' => 'CP1256.TXT',
+ 'WIN1257' => 'CP1257.TXT',
+ 'WIN1258' => 'CP1258.TXT',
+ 'ISO8859_2' => '8859-2.TXT',
+ 'ISO8859_3' => '8859-3.TXT',
+ 'ISO8859_4' => '8859-4.TXT',
+ 'ISO8859_5' => '8859-5.TXT',
+ 'ISO8859_6' => '8859-6.TXT',
+ 'ISO8859_7' => '8859-7.TXT',
+ 'ISO8859_8' => '8859-8.TXT',
+ 'ISO8859_9' => '8859-9.TXT',
'ISO8859_10' => '8859-10.TXT',
'ISO8859_13' => '8859-13.TXT',
'ISO8859_14' => '8859-14.TXT',
'ISO8859_15' => '8859-15.TXT',
'ISO8859_16' => '8859-16.TXT',
- 'KOI8R' => 'KOI8-R.TXT',
- 'KOI8U' => 'KOI8-U.TXT',
- 'GBK' => 'CP936.TXT');
+ 'KOI8R' => 'KOI8-R.TXT',
+ 'KOI8U' => 'KOI8-U.TXT',
+ 'GBK' => 'CP936.TXT');
# make maps for all encodings if not specified
my @charsets = (scalar(@ARGV) > 0) ? @ARGV : sort keys(%filename);
diff --git a/src/backend/utils/mb/Unicode/convutils.pm b/src/backend/utils/mb/Unicode/convutils.pm
index fd019424fdf..77de7b1a4d7 100644
--- a/src/backend/utils/mb/Unicode/convutils.pm
+++ b/src/backend/utils/mb/Unicode/convutils.pm
@@ -16,10 +16,10 @@ our @EXPORT =
# Constants used in the 'direction' field of the character maps
use constant {
- NONE => 0,
- TO_UNICODE => 1,
+ NONE => 0,
+ TO_UNICODE => 1,
FROM_UNICODE => 2,
- BOTH => 3
+ BOTH => 3
};
#######################################################################
@@ -53,12 +53,12 @@ sub read_source
exit;
}
my $out = {
- code => hex($1),
- ucs => hex($2),
- comment => $4,
+ code => hex($1),
+ ucs => hex($2),
+ comment => $4,
direction => BOTH,
- f => $fname,
- l => $.
+ f => $fname,
+ l => $.
};
# Ignore pure ASCII mappings. PostgreSQL character conversion code
@@ -124,14 +124,14 @@ sub print_conversion_tables_direction
my $tblname;
if ($direction == TO_UNICODE)
{
- $fname = lc("${csname}_to_utf8.map");
+ $fname = lc("${csname}_to_utf8.map");
$tblname = lc("${csname}_to_unicode_tree");
print "- Writing ${csname}=>UTF8 conversion table: $fname\n";
}
else
{
- $fname = lc("utf8_to_${csname}.map");
+ $fname = lc("utf8_to_${csname}.map");
$tblname = lc("${csname}_from_unicode_tree");
print "- Writing UTF8=>${csname} conversion table: $fname\n";
@@ -378,10 +378,10 @@ sub print_radix_table
unshift @segments,
{
- header => "Dummy map, for invalid values",
+ header => "Dummy map, for invalid values",
min_idx => 0,
max_idx => $widest_range,
- label => "dummy map"
+ label => "dummy map"
};
###
@@ -397,7 +397,7 @@ sub print_radix_table
###
for (my $j = 0; $j < $#segments - 1; $j++)
{
- my $seg = $segments[$j];
+ my $seg = $segments[$j];
my $nextseg = $segments[ $j + 1 ];
# Count the number of zero values at the end of this segment.
@@ -527,17 +527,17 @@ sub print_radix_table
if ($max_val <= 0xffff)
{
$vals_per_line = 8;
- $colwidth = 4;
+ $colwidth = 4;
}
elsif ($max_val <= 0xffffff)
{
$vals_per_line = 4;
- $colwidth = 6;
+ $colwidth = 6;
}
else
{
$vals_per_line = 4;
- $colwidth = 8;
+ $colwidth = 8;
}
###
@@ -607,8 +607,10 @@ sub print_radix_table
# Print the next line's worth of values.
# XXX pad to begin at a nice boundary
printf $out " /* %02x */ ", $i;
- for (my $j = 0;
- $j < $vals_per_line && $i <= $seg->{max_idx}; $j++)
+ for (
+ my $j = 0;
+ $j < $vals_per_line && $i <= $seg->{max_idx};
+ $j++)
{
# missing values represent zero.
my $val = $seg->{values}->{$i} || 0;
@@ -671,10 +673,10 @@ sub build_segments_recurse
push @segments,
{
header => $header . ", leaf: ${path}xx",
- label => $label,
- level => $level,
- depth => $depth,
- path => $path,
+ label => $label,
+ level => $level,
+ depth => $depth,
+ path => $path,
values => $map
};
}
@@ -696,10 +698,10 @@ sub build_segments_recurse
push @segments,
{
header => $header . ", byte #$level: ${path}xx",
- label => $label,
- level => $level,
- depth => $depth,
- path => $path,
+ label => $label,
+ level => $level,
+ depth => $depth,
+ path => $path,
values => \%children
};
}
@@ -789,12 +791,12 @@ sub make_charmap_combined
if (defined $c->{ucs_second})
{
my $entry = {
- utf8 => ucs2utf($c->{ucs}),
+ utf8 => ucs2utf($c->{ucs}),
utf8_second => ucs2utf($c->{ucs_second}),
- code => $c->{code},
- comment => $c->{comment},
- f => $c->{f},
- l => $c->{l}
+ code => $c->{code},
+ comment => $c->{comment},
+ f => $c->{f},
+ l => $c->{l}
};
push @combined, $entry;
}
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 67c37c49cb3..a9033b7a54d 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -1470,8 +1470,8 @@ check_GUC_init(struct config_generic *gconf)
/* Flag combinations */
/*
- * GUC_NO_SHOW_ALL requires GUC_NOT_IN_SAMPLE, as a parameter not part
- * of SHOW ALL should not be hidden in postgresql.conf.sample.
+ * GUC_NO_SHOW_ALL requires GUC_NOT_IN_SAMPLE, as a parameter not part of
+ * SHOW ALL should not be hidden in postgresql.conf.sample.
*/
if ((gconf->flags & GUC_NO_SHOW_ALL) &&
!(gconf->flags & GUC_NOT_IN_SAMPLE))
diff --git a/src/backend/utils/misc/guc_tables.c b/src/backend/utils/misc/guc_tables.c
index 844781a7f5d..c27eb367583 100644
--- a/src/backend/utils/misc/guc_tables.c
+++ b/src/backend/utils/misc/guc_tables.c
@@ -4685,8 +4685,8 @@ struct config_enum ConfigureNamesEnum[] =
{
{"icu_validation_level", PGC_USERSET, CLIENT_CONN_LOCALE,
- gettext_noop("Log level for reporting invalid ICU locale strings."),
- NULL
+ gettext_noop("Log level for reporting invalid ICU locale strings."),
+ NULL
},
&icu_validation_level,
WARNING, icu_validation_level_options,
diff --git a/src/backend/utils/mmgr/dsa.c b/src/backend/utils/mmgr/dsa.c
index f5a62061a3e..7a3781466ed 100644
--- a/src/backend/utils/mmgr/dsa.c
+++ b/src/backend/utils/mmgr/dsa.c
@@ -1369,7 +1369,7 @@ init_span(dsa_area *area,
if (DsaPointerIsValid(pool->spans[1]))
{
dsa_area_span *head = (dsa_area_span *)
- dsa_get_address(area, pool->spans[1]);
+ dsa_get_address(area, pool->spans[1]);
head->prevspan = span_pointer;
}
@@ -2215,7 +2215,7 @@ make_new_segment(dsa_area *area, size_t requested_pages)
if (segment_map->header->next != DSA_SEGMENT_INDEX_NONE)
{
dsa_segment_map *next =
- get_segment_by_index(area, segment_map->header->next);
+ get_segment_by_index(area, segment_map->header->next);
Assert(next->header->bin == segment_map->header->bin);
next->header->prev = new_index;
diff --git a/src/backend/utils/mmgr/freepage.c b/src/backend/utils/mmgr/freepage.c
index 722a2e34db6..8f9ea090faa 100644
--- a/src/backend/utils/mmgr/freepage.c
+++ b/src/backend/utils/mmgr/freepage.c
@@ -285,7 +285,7 @@ sum_free_pages(FreePageManager *fpm)
if (!relptr_is_null(fpm->freelist[list]))
{
FreePageSpanLeader *candidate =
- relptr_access(base, fpm->freelist[list]);
+ relptr_access(base, fpm->freelist[list]);
do
{
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 42b90e4d4fa..9fc83f11f6f 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -734,9 +734,9 @@ MemoryContextStatsDetail(MemoryContext context, int max_children,
*
* We don't buffer the information about all memory contexts in a
* backend into StringInfo and log it as one message. That would
- * require the buffer to be enlarged, risking an OOM as there could
- * be a large number of memory contexts in a backend. Instead, we
- * log one message per memory context.
+ * require the buffer to be enlarged, risking an OOM as there could be
+ * a large number of memory contexts in a backend. Instead, we log
+ * one message per memory context.
*/
ereport(LOG_SERVER_ONLY,
(errhidestmt(true),
diff --git a/src/backend/utils/resowner/resowner.c b/src/backend/utils/resowner/resowner.c
index 7dec652106f..f926f1faad3 100644
--- a/src/backend/utils/resowner/resowner.c
+++ b/src/backend/utils/resowner/resowner.c
@@ -587,7 +587,7 @@ ResourceOwnerReleaseInternal(ResourceOwner owner,
while (ResourceArrayGetAny(&(owner->cryptohasharr), &foundres))
{
pg_cryptohash_ctx *context =
- (pg_cryptohash_ctx *) DatumGetPointer(foundres);
+ (pg_cryptohash_ctx *) DatumGetPointer(foundres);
if (isCommit)
PrintCryptoHashLeakWarning(foundres);
diff --git a/src/backend/utils/sort/tuplesort.c b/src/backend/utils/sort/tuplesort.c
index 95c3970437d..e5a4e5b371e 100644
--- a/src/backend/utils/sort/tuplesort.c
+++ b/src/backend/utils/sort/tuplesort.c
@@ -1438,8 +1438,8 @@ tuplesort_performsort(Tuplesortstate *state)
/*
* We were able to accumulate all the tuples required for output
* in memory, using a heap to eliminate excess tuples. Now we
- * have to transform the heap to a properly-sorted array.
- * Note that sort_bounded_heap sets the correct state->status.
+ * have to transform the heap to a properly-sorted array. Note
+ * that sort_bounded_heap sets the correct state->status.
*/
sort_bounded_heap(state);
state->current = 0;
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index c9ca44d8b76..3a419e348fa 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -1990,7 +1990,7 @@ MaintainOldSnapshotTimeMapping(TimestampTz whenTaken, TransactionId xmin)
int bucket = (oldSnapshotControl->head_offset
+ ((ts - oldSnapshotControl->head_timestamp)
/ USECS_PER_MINUTE))
- % OLD_SNAPSHOT_TIME_MAP_ENTRIES;
+ % OLD_SNAPSHOT_TIME_MAP_ENTRIES;
if (TransactionIdPrecedes(oldSnapshotControl->xid_by_minute[bucket], xmin))
oldSnapshotControl->xid_by_minute[bucket] = xmin;
@@ -2057,7 +2057,7 @@ MaintainOldSnapshotTimeMapping(TimestampTz whenTaken, TransactionId xmin)
/* Extend map to unused entry. */
int new_tail = (oldSnapshotControl->head_offset
+ oldSnapshotControl->count_used)
- % OLD_SNAPSHOT_TIME_MAP_ENTRIES;
+ % OLD_SNAPSHOT_TIME_MAP_ENTRIES;
oldSnapshotControl->count_used++;
oldSnapshotControl->xid_by_minute[new_tail] = xmin;
@@ -2188,7 +2188,7 @@ SerializeSnapshot(Snapshot snapshot, char *start_address)
if (serialized_snapshot.subxcnt > 0)
{
Size subxipoff = sizeof(SerializedSnapshotData) +
- snapshot->xcnt * sizeof(TransactionId);
+ snapshot->xcnt * sizeof(TransactionId);
memcpy((TransactionId *) (start_address + subxipoff),
snapshot->subxip, snapshot->subxcnt * sizeof(TransactionId));