Skip to content

Commit 2b44306

Browse files
committed
Assorted message style improvements
1 parent 41f4a0a commit 2b44306

File tree

13 files changed

+26
-26
lines changed

13 files changed

+26
-26
lines changed

src/backend/access/spgist/spgutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ spgFormInnerTuple(SpGistState *state, bool hasPrefix, Datum prefix,
661661
if (size > SPGIST_PAGE_CAPACITY - sizeof(ItemIdData))
662662
ereport(ERROR,
663663
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
664-
errmsg("SPGiST inner tuple size %lu exceeds maximum %lu",
664+
errmsg("SP-GiST inner tuple size %lu exceeds maximum %lu",
665665
(unsigned long) size,
666666
(unsigned long) (SPGIST_PAGE_CAPACITY - sizeof(ItemIdData))),
667667
errhint("Values larger than a buffer page cannot be indexed.")));

src/backend/access/transam/xlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6355,7 +6355,7 @@ StartupXLOG(void)
63556355
{
63566356
if (dbstate_at_startup != DB_IN_ARCHIVE_RECOVERY)
63576357
ereport(FATAL,
6358-
(errmsg("backup_label contains inconsistent data with control file"),
6358+
(errmsg("backup_label contains data inconsistent with control file"),
63596359
errhint("This means that the backup is corrupted and you will "
63606360
"have to use another backup for recovery.")));
63616361
ControlFile->backupEndPoint = ControlFile->minRecoveryPoint;

src/backend/utils/adt/rangetypes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1834,7 +1834,7 @@ range_parse_flags(const char *flags_str)
18341834
ereport(ERROR,
18351835
(errcode(ERRCODE_SYNTAX_ERROR),
18361836
errmsg("invalid range bound flags"),
1837-
errhint("Valid values are '[]', '[)', '(]', and '()'.")));
1837+
errhint("Valid values are \"[]\", \"[)\", \"(]\", and \"()\".")));
18381838

18391839
switch (flags_str[0])
18401840
{

src/backend/utils/misc/guc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1722,7 +1722,7 @@ static struct config_int ConfigureNamesInt[] =
17221722

17231723
{
17241724
{"temp_file_limit", PGC_SUSET, RESOURCES_DISK,
1725-
gettext_noop("Limits the total size of all temp files used by each session."),
1725+
gettext_noop("Limits the total size of all temporary files used by each session."),
17261726
gettext_noop("-1 means no limit."),
17271727
GUC_UNIT_KB
17281728
},

src/backend/utils/time/snapmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ ImportSnapshot(const char *idstr)
10111011
if (strspn(idstr, "0123456789ABCDEF-") != strlen(idstr))
10121012
ereport(ERROR,
10131013
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1014-
errmsg("invalid snapshot identifier \"%s\"", idstr)));
1014+
errmsg("invalid snapshot identifier: \"%s\"", idstr)));
10151015

10161016
/* OK, read the file */
10171017
snprintf(path, MAXPGPATH, SNAPSHOT_EXPORT_DIR "/%s", idstr);
@@ -1020,7 +1020,7 @@ ImportSnapshot(const char *idstr)
10201020
if (!f)
10211021
ereport(ERROR,
10221022
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1023-
errmsg("invalid snapshot identifier \"%s\"", idstr)));
1023+
errmsg("invalid snapshot identifier: \"%s\"", idstr)));
10241024

10251025
/* get the size of the file so that we know how much memory we need */
10261026
if (fstat(fileno(f), &stat_buf))

src/bin/pg_basebackup/streamutil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ GetConnection(void)
154154

155155
if (PQstatus(tmpconn) != CONNECTION_OK)
156156
{
157-
fprintf(stderr, _("%s: could not connect to server: %s\n"),
157+
fprintf(stderr, _("%s: could not connect to server: %s"),
158158
progname, PQerrorMessage(tmpconn));
159159
return NULL;
160160
}

src/bin/pg_ctl/pg_ctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1935,7 +1935,7 @@ adjust_data_dir(void)
19351935
fd = popen(cmd, "r");
19361936
if (fd == NULL || fgets(filename, sizeof(filename), fd) == NULL)
19371937
{
1938-
write_stderr(_("%s: could not determine the data directory using \"%s\"\n"), progname, cmd);
1938+
write_stderr(_("%s: could not determine the data directory using command \"%s\"\n"), progname, cmd);
19391939
exit(1);
19401940
}
19411941
pclose(fd);

src/bin/psql/common.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ AcceptResult(const PGresult *result)
462462

463463
default:
464464
OK = false;
465-
psql_error("unexpected PQresultStatus (%d)",
465+
psql_error("unexpected PQresultStatus: %d\n",
466466
PQresultStatus(result));
467467
break;
468468
}
@@ -686,7 +686,7 @@ ProcessResult(PGresult **results)
686686
default:
687687
/* AcceptResult() should have caught anything else. */
688688
is_copy = false;
689-
psql_error("unexpected PQresultStatus (%d)", result_status);
689+
psql_error("unexpected PQresultStatus: %d\n", result_status);
690690
break;
691691
}
692692

@@ -816,7 +816,7 @@ PrintQueryResults(PGresult *results)
816816

817817
default:
818818
success = false;
819-
psql_error("unexpected PQresultStatus (%d)",
819+
psql_error("unexpected PQresultStatus: %d\n",
820820
PQresultStatus(results));
821821
break;
822822
}

src/bin/psql/variables.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ ParseVariableBool(const char *value)
112112
else
113113
{
114114
/* NULL is treated as false, so a non-matching value is 'true' */
115-
psql_error("unrecognized boolean value; assuming \"on\".\n");
115+
psql_error("unrecognized Boolean value; assuming \"on\"\n");
116116
return true;
117117
}
118118
/* suppress compiler warning */

src/interfaces/libpq/fe-connect.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4651,14 +4651,14 @@ conninfo_uri_parse_options(PQconninfoOption *options, const char *uri,
46514651
if (!*p)
46524652
{
46534653
printfPQExpBuffer(errorMessage,
4654-
libpq_gettext("end of string reached when looking for matching ']' in IPv6 host address in URI: %s\n"),
4654+
libpq_gettext("end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"),
46554655
uri);
46564656
goto cleanup;
46574657
}
46584658
if (p == host)
46594659
{
46604660
printfPQExpBuffer(errorMessage,
4661-
libpq_gettext("IPv6 host address may not be empty in URI: %s\n"),
4661+
libpq_gettext("IPv6 host address may not be empty in URI: \"%s\"\n"),
46624662
uri);
46634663
goto cleanup;
46644664
}
@@ -4673,7 +4673,7 @@ conninfo_uri_parse_options(PQconninfoOption *options, const char *uri,
46734673
if (*p && *p != ':' && *p != '/' && *p != '?')
46744674
{
46754675
printfPQExpBuffer(errorMessage,
4676-
libpq_gettext("unexpected '%c' at position %d in URI (expecting ':' or '/'): %s\n"),
4676+
libpq_gettext("unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"),
46774677
*p, (int) (p - buf + 1), uri);
46784678
goto cleanup;
46794679
}
@@ -4787,7 +4787,7 @@ conninfo_uri_parse_params(char *params,
47874787
if (value != NULL)
47884788
{
47894789
printfPQExpBuffer(errorMessage,
4790-
libpq_gettext("extra key/value separator '=' in URI query parameter: %s\n"),
4790+
libpq_gettext("extra key/value separator \"=\" in URI query parameter: \"%s\"\n"),
47914791
params);
47924792
return false;
47934793
}
@@ -4807,7 +4807,7 @@ conninfo_uri_parse_params(char *params,
48074807
if (value == NULL)
48084808
{
48094809
printfPQExpBuffer(errorMessage,
4810-
libpq_gettext("missing key/value separator '=' in URI query parameter: %s\n"),
4810+
libpq_gettext("missing key/value separator \"=\" in URI query parameter: \"%s\"\n"),
48114811
params);
48124812
return false;
48134813
}
@@ -4878,7 +4878,7 @@ conninfo_uri_parse_params(char *params,
48784878

48794879
printfPQExpBuffer(errorMessage,
48804880
libpq_gettext(
4881-
"invalid URI query parameter \"%s\"\n"),
4881+
"invalid URI query parameter: \"%s\"\n"),
48824882
keyword);
48834883
return false;
48844884
}
@@ -4943,7 +4943,7 @@ conninfo_uri_decode(const char *str, PQExpBuffer errorMessage)
49434943
if (!(get_hexdigit(*q++, &hi) && get_hexdigit(*q++, &lo)))
49444944
{
49454945
printfPQExpBuffer(errorMessage,
4946-
libpq_gettext("invalid percent-encoded token: %s\n"),
4946+
libpq_gettext("invalid percent-encoded token: \"%s\"\n"),
49474947
str);
49484948
free(buf);
49494949
return NULL;
@@ -4953,7 +4953,7 @@ conninfo_uri_decode(const char *str, PQExpBuffer errorMessage)
49534953
if (c == 0)
49544954
{
49554955
printfPQExpBuffer(errorMessage,
4956-
libpq_gettext("forbidden value %%00 in percent-encoded value: %s\n"),
4956+
libpq_gettext("forbidden value %%00 in percent-encoded value: \"%s\"\n"),
49574957
str);
49584958
free(buf);
49594959
return NULL;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy