]> granicus.if.org Git - postgresql/commitdiff
Improve some messages
authorPeter Eisentraut <peter_e@gmx.net>
Fri, 11 Dec 2015 03:05:27 +0000 (22:05 -0500)
committerPeter Eisentraut <peter_e@gmx.net>
Fri, 11 Dec 2015 03:05:27 +0000 (22:05 -0500)
src/backend/access/transam/commit_ts.c
src/backend/catalog/objectaddress.c
src/backend/commands/policy.c
src/backend/commands/user.c
src/backend/executor/nodeCustom.c
src/backend/utils/adt/jsonb.c
src/backend/utils/adt/jsonfuncs.c
src/test/regress/expected/jsonb.out
src/test/regress/expected/object_address.out

index f9da7593125fc8f7585ca7ab80a0b6a7eeca82b4..834010ff716f27ac66577e32461e16ac27e91707 100644 (file)
@@ -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")));
index b90faa6e72ce1bdec6f93f3fc334054bb92cadd3..e44d7d09e1617853103de595c9e5bba9451f5e1c 100644 (file)
@@ -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)));
        }
 
        /*
index 8851fe7c9ff9b662380b0ffc6c1e01e0087c31f5..6399b2e3eb7d3bf3dd8982873cd0f99fe18a9573 100644 (file)
@@ -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);
index 295e0b0fdf37a75bf24b2d955dfbb3a1e4d1105a..2961ccb8ef3d68561d09ae5968d7a256eb25b1ce 100644 (file)
@@ -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));
index 0a022dff940b7627191831e5648075747a53e832..ac7bee02378da8339be14372d7f53c1e1bc889b5 100644 (file)
@@ -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);
 }
index 0c14a3bfda4ec3a91fe41463655f22c270e4edd9..5bebc952fa4482b20bb85ab01e12be59fd393dbd 100644 (file)
@@ -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);
        }
 
index 222acd7afb7118b115d3d6de18ad3251103cc1d6..80018de6f0e30dbcb77709dace4dc9034ff9c126 100644 (file)
@@ -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);
index 8d9b5db38de248a6ab9e6658d5ce3cf905f5d07e..72fe808734c7262301e6f499b6eca5e286832883 100644 (file)
@@ -3173,7 +3173,7 @@ select '[]'::jsonb - 'a';
 select '"a"'::jsonb - 1; -- error
 ERROR:  cannot delete from scalar
 select '{}'::jsonb -  1; -- error
-ERROR:  cannot delete from object using integer subscript
+ERROR:  cannot delete from object using integer index
 select '[]'::jsonb - 1;
  ?column? 
 ----------
index 963b7ef4dd019ad773a6d2189cd6c2440db1ac03..75751bebeff157d21297592d201b73fd19b2739b 100644 (file)
@@ -39,7 +39,7 @@ CREATE TRANSFORM FOR int LANGUAGE SQL (
 SELECT pg_get_object_address('stone', '{}', '{}');
 ERROR:  unrecognized object type "stone"
 SELECT pg_get_object_address('table', '{}', '{}');
-ERROR:  name list must be of length at least 1
+ERROR:  name list length must be at least 1
 SELECT pg_get_object_address('table', '{NULL}', '{}');
 ERROR:  name or argument lists may not contain nulls
 -- unrecognized object types