mirror of
https://github.com/postgres/postgres.git
synced 2025-10-16 17:07:43 +03:00
Improve some messages
This commit is contained in:
@@ -384,7 +384,7 @@ error_commit_ts_disabled(void)
|
||||
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
|
||||
errmsg("could not get commit timestamp data"),
|
||||
RecoveryInProgress() ?
|
||||
errhint("Make sure the configuration parameter \"%s\" is set in the master server.",
|
||||
errhint("Make sure the configuration parameter \"%s\" is set on the master server.",
|
||||
"track_commit_timestamp") :
|
||||
errhint("Make sure the configuration parameter \"%s\" is set.",
|
||||
"track_commit_timestamp")));
|
||||
|
@@ -1901,7 +1901,7 @@ pg_get_object_address(PG_FUNCTION_ARGS)
|
||||
if (list_length(name) < 1)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("name list must be of length at least %d", 1)));
|
||||
errmsg("name list length must be at least %d", 1)));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -167,8 +167,8 @@ policy_role_list_to_array(List *roles, int *num_roles)
|
||||
{
|
||||
ereport(WARNING,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("ignoring roles specified other than public"),
|
||||
errhint("All roles are members of the public role.")));
|
||||
errmsg("ignoring specified roles other than PUBLIC"),
|
||||
errhint("All roles are members of the PUBLIC role.")));
|
||||
*num_roles = 1;
|
||||
}
|
||||
role_oids[0] = ObjectIdGetDatum(ACL_ID_PUBLIC);
|
||||
|
@@ -959,7 +959,7 @@ DropRole(DropRoleStmt *stmt)
|
||||
if (rolspec->roletype != ROLESPEC_CSTRING)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("cannot use special role specifier in \"%s\"", "DROP ROLE")));
|
||||
errmsg("cannot use special role specifier in DROP ROLE")));
|
||||
role = rolspec->rolename;
|
||||
|
||||
tuple = SearchSysCache1(AUTHNAME, PointerGetDatum(role));
|
||||
|
@@ -144,7 +144,7 @@ ExecCustomMarkPos(CustomScanState *node)
|
||||
if (!node->methods->MarkPosCustomScan)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("custom-scan \"%s\" does not support MarkPos",
|
||||
errmsg("custom scan \"%s\" does not support MarkPos",
|
||||
node->methods->CustomName)));
|
||||
node->methods->MarkPosCustomScan(node);
|
||||
}
|
||||
@@ -155,7 +155,7 @@ ExecCustomRestrPos(CustomScanState *node)
|
||||
if (!node->methods->RestrPosCustomScan)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("custom-scan \"%s\" does not support MarkPos",
|
||||
errmsg("custom scan \"%s\" does not support MarkPos",
|
||||
node->methods->CustomName)));
|
||||
node->methods->RestrPosCustomScan(node);
|
||||
}
|
||||
|
@@ -1238,7 +1238,7 @@ jsonb_build_object(PG_FUNCTION_ARGS)
|
||||
if (val_type == InvalidOid || val_type == UNKNOWNOID)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("arg %d: could not determine data type", i + 2)));
|
||||
errmsg("argument %d: could not determine data type", i + 2)));
|
||||
add_jsonb(arg, PG_ARGISNULL(i + 1), &result, val_type, false);
|
||||
|
||||
}
|
||||
@@ -1300,7 +1300,7 @@ jsonb_build_array(PG_FUNCTION_ARGS)
|
||||
if (val_type == InvalidOid || val_type == UNKNOWNOID)
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("arg %d: could not determine data type", i + 1)));
|
||||
errmsg("argument %d: could not determine data type", i + 1)));
|
||||
add_jsonb(arg, PG_ARGISNULL(i), &result, val_type, false);
|
||||
}
|
||||
|
||||
|
@@ -3464,7 +3464,7 @@ jsonb_delete_idx(PG_FUNCTION_ARGS)
|
||||
if (JB_ROOT_IS_OBJECT(in))
|
||||
ereport(ERROR,
|
||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
||||
errmsg("cannot delete from object using integer subscript")));
|
||||
errmsg("cannot delete from object using integer index")));
|
||||
|
||||
if (JB_ROOT_COUNT(in) == 0)
|
||||
PG_RETURN_JSONB(in);
|
||||
|
Reference in New Issue
Block a user