mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Assorted message style improvements
This commit is contained in:
@ -4651,14 +4651,14 @@ conninfo_uri_parse_options(PQconninfoOption *options, const char *uri,
|
||||
if (!*p)
|
||||
{
|
||||
printfPQExpBuffer(errorMessage,
|
||||
libpq_gettext("end of string reached when looking for matching ']' in IPv6 host address in URI: %s\n"),
|
||||
libpq_gettext("end of string reached when looking for matching \"]\" in IPv6 host address in URI: \"%s\"\n"),
|
||||
uri);
|
||||
goto cleanup;
|
||||
}
|
||||
if (p == host)
|
||||
{
|
||||
printfPQExpBuffer(errorMessage,
|
||||
libpq_gettext("IPv6 host address may not be empty in URI: %s\n"),
|
||||
libpq_gettext("IPv6 host address may not be empty in URI: \"%s\"\n"),
|
||||
uri);
|
||||
goto cleanup;
|
||||
}
|
||||
@ -4673,7 +4673,7 @@ conninfo_uri_parse_options(PQconninfoOption *options, const char *uri,
|
||||
if (*p && *p != ':' && *p != '/' && *p != '?')
|
||||
{
|
||||
printfPQExpBuffer(errorMessage,
|
||||
libpq_gettext("unexpected '%c' at position %d in URI (expecting ':' or '/'): %s\n"),
|
||||
libpq_gettext("unexpected character \"%c\" at position %d in URI (expected \":\" or \"/\"): \"%s\"\n"),
|
||||
*p, (int) (p - buf + 1), uri);
|
||||
goto cleanup;
|
||||
}
|
||||
@ -4787,7 +4787,7 @@ conninfo_uri_parse_params(char *params,
|
||||
if (value != NULL)
|
||||
{
|
||||
printfPQExpBuffer(errorMessage,
|
||||
libpq_gettext("extra key/value separator '=' in URI query parameter: %s\n"),
|
||||
libpq_gettext("extra key/value separator \"=\" in URI query parameter: \"%s\"\n"),
|
||||
params);
|
||||
return false;
|
||||
}
|
||||
@ -4807,7 +4807,7 @@ conninfo_uri_parse_params(char *params,
|
||||
if (value == NULL)
|
||||
{
|
||||
printfPQExpBuffer(errorMessage,
|
||||
libpq_gettext("missing key/value separator '=' in URI query parameter: %s\n"),
|
||||
libpq_gettext("missing key/value separator \"=\" in URI query parameter: \"%s\"\n"),
|
||||
params);
|
||||
return false;
|
||||
}
|
||||
@ -4878,7 +4878,7 @@ conninfo_uri_parse_params(char *params,
|
||||
|
||||
printfPQExpBuffer(errorMessage,
|
||||
libpq_gettext(
|
||||
"invalid URI query parameter \"%s\"\n"),
|
||||
"invalid URI query parameter: \"%s\"\n"),
|
||||
keyword);
|
||||
return false;
|
||||
}
|
||||
@ -4943,7 +4943,7 @@ conninfo_uri_decode(const char *str, PQExpBuffer errorMessage)
|
||||
if (!(get_hexdigit(*q++, &hi) && get_hexdigit(*q++, &lo)))
|
||||
{
|
||||
printfPQExpBuffer(errorMessage,
|
||||
libpq_gettext("invalid percent-encoded token: %s\n"),
|
||||
libpq_gettext("invalid percent-encoded token: \"%s\"\n"),
|
||||
str);
|
||||
free(buf);
|
||||
return NULL;
|
||||
@ -4953,7 +4953,7 @@ conninfo_uri_decode(const char *str, PQExpBuffer errorMessage)
|
||||
if (c == 0)
|
||||
{
|
||||
printfPQExpBuffer(errorMessage,
|
||||
libpq_gettext("forbidden value %%00 in percent-encoded value: %s\n"),
|
||||
libpq_gettext("forbidden value %%00 in percent-encoded value: \"%s\"\n"),
|
||||
str);
|
||||
free(buf);
|
||||
return NULL;
|
||||
|
@ -319,7 +319,7 @@ winsock_strerror(int err, char *strerrbuf, size_t buflen)
|
||||
}
|
||||
|
||||
if (!success)
|
||||
sprintf(strerrbuf, libpq_gettext("Unknown socket error (0x%08X/%d)"), err, err);
|
||||
sprintf(strerrbuf, libpq_gettext("unrecognized socket error: 0x%08X/%d"), err, err);
|
||||
else
|
||||
{
|
||||
strerrbuf[buflen - 1] = '\0';
|
||||
|
Reference in New Issue
Block a user