Skip to content

Commit a351705

Browse files
committed
Improve some messages
1 parent 8b469bd commit a351705

File tree

9 files changed

+12
-12
lines changed

9 files changed

+12
-12
lines changed

src/backend/access/transam/commit_ts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ error_commit_ts_disabled(void)
384384
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
385385
errmsg("could not get commit timestamp data"),
386386
RecoveryInProgress() ?
387-
errhint("Make sure the configuration parameter \"%s\" is set in the master server.",
387+
errhint("Make sure the configuration parameter \"%s\" is set on the master server.",
388388
"track_commit_timestamp") :
389389
errhint("Make sure the configuration parameter \"%s\" is set.",
390390
"track_commit_timestamp")));

src/backend/catalog/objectaddress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1901,7 +1901,7 @@ pg_get_object_address(PG_FUNCTION_ARGS)
19011901
if (list_length(name) < 1)
19021902
ereport(ERROR,
19031903
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1904-
errmsg("name list must be of length at least %d", 1)));
1904+
errmsg("name list length must be at least %d", 1)));
19051905
}
19061906

19071907
/*

src/backend/commands/policy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ policy_role_list_to_array(List *roles, int *num_roles)
167167
{
168168
ereport(WARNING,
169169
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
170-
errmsg("ignoring roles specified other than public"),
171-
errhint("All roles are members of the public role.")));
170+
errmsg("ignoring specified roles other than PUBLIC"),
171+
errhint("All roles are members of the PUBLIC role.")));
172172
*num_roles = 1;
173173
}
174174
role_oids[0] = ObjectIdGetDatum(ACL_ID_PUBLIC);

src/backend/commands/user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ DropRole(DropRoleStmt *stmt)
959959
if (rolspec->roletype != ROLESPEC_CSTRING)
960960
ereport(ERROR,
961961
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
962-
errmsg("cannot use special role specifier in \"%s\"", "DROP ROLE")));
962+
errmsg("cannot use special role specifier in DROP ROLE")));
963963
role = rolspec->rolename;
964964

965965
tuple = SearchSysCache1(AUTHNAME, PointerGetDatum(role));

src/backend/executor/nodeCustom.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ ExecCustomMarkPos(CustomScanState *node)
144144
if (!node->methods->MarkPosCustomScan)
145145
ereport(ERROR,
146146
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
147-
errmsg("custom-scan \"%s\" does not support MarkPos",
147+
errmsg("custom scan \"%s\" does not support MarkPos",
148148
node->methods->CustomName)));
149149
node->methods->MarkPosCustomScan(node);
150150
}
@@ -155,7 +155,7 @@ ExecCustomRestrPos(CustomScanState *node)
155155
if (!node->methods->RestrPosCustomScan)
156156
ereport(ERROR,
157157
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
158-
errmsg("custom-scan \"%s\" does not support MarkPos",
158+
errmsg("custom scan \"%s\" does not support MarkPos",
159159
node->methods->CustomName)));
160160
node->methods->RestrPosCustomScan(node);
161161
}

src/backend/utils/adt/jsonb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ jsonb_build_object(PG_FUNCTION_ARGS)
12381238
if (val_type == InvalidOid || val_type == UNKNOWNOID)
12391239
ereport(ERROR,
12401240
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1241-
errmsg("arg %d: could not determine data type", i + 2)));
1241+
errmsg("argument %d: could not determine data type", i + 2)));
12421242
add_jsonb(arg, PG_ARGISNULL(i + 1), &result, val_type, false);
12431243

12441244
}
@@ -1300,7 +1300,7 @@ jsonb_build_array(PG_FUNCTION_ARGS)
13001300
if (val_type == InvalidOid || val_type == UNKNOWNOID)
13011301
ereport(ERROR,
13021302
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
1303-
errmsg("arg %d: could not determine data type", i + 1)));
1303+
errmsg("argument %d: could not determine data type", i + 1)));
13041304
add_jsonb(arg, PG_ARGISNULL(i), &result, val_type, false);
13051305
}
13061306

src/backend/utils/adt/jsonfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3464,7 +3464,7 @@ jsonb_delete_idx(PG_FUNCTION_ARGS)
34643464
if (JB_ROOT_IS_OBJECT(in))
34653465
ereport(ERROR,
34663466
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
3467-
errmsg("cannot delete from object using integer subscript")));
3467+
errmsg("cannot delete from object using integer index")));
34683468

34693469
if (JB_ROOT_COUNT(in) == 0)
34703470
PG_RETURN_JSONB(in);

src/test/regress/expected/jsonb.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3173,7 +3173,7 @@ select '[]'::jsonb - 'a';
31733173
select '"a"'::jsonb - 1; -- error
31743174
ERROR: cannot delete from scalar
31753175
select '{}'::jsonb - 1; -- error
3176-
ERROR: cannot delete from object using integer subscript
3176+
ERROR: cannot delete from object using integer index
31773177
select '[]'::jsonb - 1;
31783178
?column?
31793179
----------

src/test/regress/expected/object_address.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ CREATE TRANSFORM FOR int LANGUAGE SQL (
3939
SELECT pg_get_object_address('stone', '{}', '{}');
4040
ERROR: unrecognized object type "stone"
4141
SELECT pg_get_object_address('table', '{}', '{}');
42-
ERROR: name list must be of length at least 1
42+
ERROR: name list length must be at least 1
4343
SELECT pg_get_object_address('table', '{NULL}', '{}');
4444
ERROR: name or argument lists may not contain nulls
4545
-- unrecognized object types

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