Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2b44306

Browse files
committed
Assorted message style improvements
1 parent41f4a0a commit2b44306

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 containsinconsistentdata 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 alltemp files used by each session."),
1725+
gettext_noop("Limits the total size of alltemporary 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
returnNULL;
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 usingcommand\"%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("unrecognizedboolean value; assuming \"on\".\n");
115+
psql_error("unrecognizedBoolean 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
gotocleanup;
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
gotocleanup;
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("unexpectedcharacter \"%c\" at position %d in URI (expected \":\" or\"/\"):\"%s\"\n"),
46774677
*p, (int) (p-buf+1),uri);
46784678
gotocleanup;
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
returnNULL;
@@ -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
returnNULL;

‎src/interfaces/libpq/win32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ winsock_strerror(int err, char *strerrbuf, size_t buflen)
319319
}
320320

321321
if (!success)
322-
sprintf(strerrbuf,libpq_gettext("Unknown socket error (0x%08X/%d)"),err,err);
322+
sprintf(strerrbuf,libpq_gettext("unrecognized socket error:0x%08X/%d"),err,err);
323323
else
324324
{
325325
strerrbuf[buflen-1]='\0';

‎src/pl/plpgsql/src/gram.y

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3483,8 +3483,8 @@ read_cursor_args(PLpgSQL_var *cursor, int until, const char *expected)
34833483
if (argv[argpos] != NULL)
34843484
ereport(ERROR,
34853485
(errcode(ERRCODE_SYNTAX_ERROR),
3486-
errmsg("duplicatevalue forcursor \"%s\"parameter\"%s\"",
3487-
cursor->refname,row->fieldnames[argpos]),
3486+
errmsg("value forparameter \"%s\"of cursor\"%s\" specified more than once",
3487+
row->fieldnames[argpos], cursor->refname),
34883488
parser_errposition(arglocation)));
34893489

34903490
/*

‎src/test/regress/expected/plpgsql.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,7 +2347,7 @@ begin
23472347
open c1(param2 := 20, 21);
23482348
end
23492349
$$ language plpgsql;
2350-
ERROR:duplicatevalue forcursor "c1" parameter "param2"
2350+
ERROR: value forparameter "param2" of cursor "c1" specified more than once
23512351
LINE 5: open c1(param2 := 20, 21);
23522352
^
23532353
-- mixing named and positional: same as previous test, but param1 is duplicated
@@ -2358,7 +2358,7 @@ begin
23582358
open c1(20, param1 := 21);
23592359
end
23602360
$$ language plpgsql;
2361-
ERROR:duplicatevalue forcursor "c1" parameter "param1"
2361+
ERROR: value forparameter "param1" of cursor "c1" specified more than once
23622362
LINE 5: open c1(20, param1 := 21);
23632363
^
23642364
-- duplicate named parameter, should throw an error at parse time
@@ -2370,7 +2370,7 @@ begin
23702370
open c1 (p2 := 77, p2 := 42);
23712371
end
23722372
$$ language plpgsql;
2373-
ERROR:duplicatevalue forcursor "c1" parameter "p2"
2373+
ERROR: value forparameter "p2" of cursor "c1" specified more than once
23742374
LINE 6: open c1 (p2 := 77, p2 := 42);
23752375
^
23762376
-- not enough parameters, should throw an error at parse time

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp