]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Message style fixes
authorPeter Eisentraut <peter@eisentraut.org>
Tue, 21 Jul 2026 13:27:02 +0000 (15:27 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Tue, 21 Jul 2026 13:32:56 +0000 (15:32 +0200)
Change DETAIL messages to conform to the style guide by capitalizing
the first word of sentences and ending sentences with a period.

Author: Peter Smith <peter.b.smith@fujitsu.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: vignesh C <vignesh21.gmail.com>
Reviewed-by: Xiaopeng Wang <wxp_728.163.com>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://www.postgresql.org/message-id/flat/CAHut%2BPszSntkUgN%2BQa9matGY6MLEoFGSuVbuKDgnnTdZ7YPRwg%40mail.gmail.com

15 files changed:
contrib/dblink/dblink.c
contrib/passwordcheck/expected/passwordcheck.out
contrib/passwordcheck/expected/passwordcheck_1.out
contrib/passwordcheck/passwordcheck.c
contrib/pg_stash_advice/expected/pg_stash_advice.out
contrib/pg_stash_advice/expected/pg_stash_advice_utf8.out
contrib/pg_stash_advice/pg_stash_advice.c
contrib/postgres_fdw/expected/postgres_fdw.out
src/backend/commands/copyto.c
src/backend/commands/extension.c
src/backend/commands/tablecmds.c
src/backend/libpq/be-secure-openssl.c
src/test/modules/test_extensions/expected/test_extensions.out
src/test/regress/expected/create_view.out
src/test/regress/expected/rangefuncs.out

index 9e42a642419b41695e09224737a30966733dc46e..9613f881985caac2c11ffddd5afa5528ac523093 100644 (file)
@@ -2714,7 +2714,7 @@ dblink_security_check(PGconn *conn, const char *connname, const char *connstr)
        ereport(ERROR,
                        (errcode(ERRCODE_S_R_E_PROHIBITED_SQL_STATEMENT_ATTEMPTED),
                         errmsg("password or GSSAPI delegated credentials required"),
-                        errdetail("Non-superusers may only connect using credentials they provide, eg: password in connection string or delegated GSSAPI credentials"),
+                        errdetail("Non-superusers may only connect using credentials they provide, eg: password in connection string or delegated GSSAPI credentials."),
                         errhint("Ensure provided credentials match target server's authentication method.")));
 }
 
index 83472c76d2784e6469367a008bf3648ff6f6b7f0..9d02129e9369aeb4ca4c076b3a3891fd7e573a61 100644 (file)
@@ -6,7 +6,7 @@ ALTER USER regress_passwordcheck_user1 PASSWORD 'a_nice_long_password';
 -- error: too short
 ALTER USER regress_passwordcheck_user1 PASSWORD 'tooshrt';
 ERROR:  password is too short
-DETAIL:  password must be at least "passwordcheck.min_password_length" (8) bytes long
+DETAIL:  Password must be at least "passwordcheck.min_password_length" (8) bytes long.
 -- ok
 SET passwordcheck.min_password_length = 6;
 ALTER USER regress_passwordcheck_user1 PASSWORD 'v_shrt';
index fb12ec45cc4bf7e9458bcefdd53197f1f988520e..a334720431d579d4d1860cbf9cd5c40f5aad76aa 100644 (file)
@@ -6,7 +6,7 @@ ALTER USER regress_passwordcheck_user1 PASSWORD 'a_nice_long_password';
 -- error: too short
 ALTER USER regress_passwordcheck_user1 PASSWORD 'tooshrt';
 ERROR:  password is too short
-DETAIL:  password must be at least "passwordcheck.min_password_length" (8) bytes long
+DETAIL:  Password must be at least "passwordcheck.min_password_length" (8) bytes long.
 -- ok
 SET passwordcheck.min_password_length = 6;
 ALTER USER regress_passwordcheck_user1 PASSWORD 'v_shrt';
index 13fd5c976a014b5bc814b4e4cdd96a0071634622..b45187cce9e89f5a8aed1c77f76af88c481340e0 100644 (file)
@@ -101,7 +101,7 @@ check_password(const char *username,
                        ereport(ERROR,
                                        (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                                         errmsg("password is too short"),
-                                        errdetail("password must be at least \"passwordcheck.min_password_length\" (%d) bytes long",
+                                        errdetail("Password must be at least \"passwordcheck.min_password_length\" (%d) bytes long.",
                                                           min_password_length)));
 
                /* check if the password contains the username */
index 788da854aa7c0a2f480004478a34626ebc38145c..8c24a21295ef761fad28da770623a4342eda37e1 100644 (file)
@@ -315,7 +315,7 @@ SELECT pg_create_advice_stash('   ');
 ERROR:  advice stash name must begin with a letter or underscore and contain only letters, digits, and underscores
 SET pg_stash_advice.stash_name = '99bottles';
 ERROR:  invalid value for parameter "pg_stash_advice.stash_name": "99bottles"
-DETAIL:  advice stash name must begin with a letter or underscore and contain only letters, digits, and underscores
+DETAIL:  Advice stash name must begin with a letter or underscore and contain only letters, digits, and underscores.
 -- Clean up state in dynamic shared memory.
 SELECT pg_drop_advice_stash('regress_stash');
  pg_drop_advice_stash 
index 7c532571ed5b1cdab3a84dd90d67a1a197a156c2..c4bc93c8efbda1fa7d4ae95cb52c5157e7a3c3ee 100644 (file)
@@ -13,4 +13,4 @@ SELECT pg_create_advice_stash('café');
 ERROR:  advice stash name must not contain non-ASCII characters
 SET pg_stash_advice.stash_name = 'café';
 ERROR:  invalid value for parameter "pg_stash_advice.stash_name": "café"
-DETAIL:  advice stash name must not contain non-ASCII characters
+DETAIL:  Advice stash name must not contain non-ASCII characters.
index 777ff3745994eaea33850926d3b7af7b28f28acf..79048329f61c7ff07898451462055c3163c11059 100644 (file)
@@ -388,7 +388,7 @@ pgsa_check_stash_name_guc(char **newval, void **extra, GucSource source)
        if (strlen(stash_name) + 1 > NAMEDATALEN)
        {
                GUC_check_errcode(ERRCODE_INVALID_PARAMETER_VALUE);
-               GUC_check_errdetail("advice stash names may not be longer than %d bytes",
+               GUC_check_errdetail("Advice stash names may not be longer than %d bytes.",
                                                        NAMEDATALEN - 1);
                return false;
        }
@@ -400,7 +400,7 @@ pgsa_check_stash_name_guc(char **newval, void **extra, GucSource source)
        if (!pg_is_ascii(stash_name))
        {
                GUC_check_errcode(ERRCODE_INVALID_PARAMETER_VALUE);
-               GUC_check_errdetail("advice stash name must not contain non-ASCII characters");
+               GUC_check_errdetail("Advice stash name must not contain non-ASCII characters.");
                return false;
        }
 
@@ -412,7 +412,7 @@ pgsa_check_stash_name_guc(char **newval, void **extra, GucSource source)
        if (!pgsa_is_identifier(stash_name))
        {
                GUC_check_errcode(ERRCODE_INVALID_PARAMETER_VALUE);
-               GUC_check_errdetail("advice stash name must begin with a letter or underscore and contain only letters, digits, and underscores");
+               GUC_check_errdetail("Advice stash name must begin with a letter or underscore and contain only letters, digits, and underscores.");
                return false;
        }
 
@@ -701,7 +701,7 @@ pgsa_set_advice_string(char *stash_name, int64 queryId, char *advice_string)
                ereport(ERROR,
                                errcode(ERRCODE_OUT_OF_MEMORY),
                                errmsg("out of memory"),
-                               errdetail("could not insert advice string into shared hash table"));
+                               errdetail("Could not insert advice string into shared hash table."));
        }
 
        /* Update the entry and release the lock. */
index 9303de98b62d3a7353744e486695937adda291f5..d19121b05dae369903253fa07ad987a351ed15cf 100644 (file)
@@ -11839,7 +11839,7 @@ DELETE FROM result_tbl;
 -- Test COPY TO when foreign table is partition
 COPY async_pt TO stdout; --error
 ERROR:  cannot copy from foreign table "async_p1"
-DETAIL:  Partition "async_p1" is a foreign table in partitioned table "async_pt"
+DETAIL:  Partition "async_p1" is a foreign table in partitioned table "async_pt".
 HINT:  Try the COPY (SELECT ...) TO variant.
 DROP FOREIGN TABLE async_p3;
 DROP TABLE base_tbl3;
index f9bc617ddb1e0100715cec2463ac7bfee49c21a2..b0bdfb5810432110c88e03ebc1f17ab28e9fb5ee 100644 (file)
@@ -856,7 +856,7 @@ BeginCopyTo(ParseState *pstate,
                                        ereport(ERROR,
                                                        errcode(ERRCODE_WRONG_OBJECT_TYPE),
                                                        errmsg("cannot copy from foreign table \"%s\"", relation_name),
-                                                       errdetail("Partition \"%s\" is a foreign table in partitioned table \"%s\"",
+                                                       errdetail("Partition \"%s\" is a foreign table in partitioned table \"%s\".",
                                                                          relation_name, RelationGetRelationName(rel)),
                                                        errhint("Try the COPY (SELECT ...) TO variant."));
                                }
index d073585c42175b32a35a2585f783114ead750318..ae03f20c34322d9d42e8d293f8e396b7957496c0 100644 (file)
@@ -3433,7 +3433,7 @@ AlterExtensionNamespace(const char *extensionName, const char *newschema, Oid *o
                                        (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                         errmsg("extension \"%s\" does not support SET SCHEMA",
                                                        NameStr(extForm->extname)),
-                                        errdetail("%s is not in the extension's schema \"%s\"",
+                                        errdetail("%s is not in the extension's schema \"%s\".",
                                                           getObjectDescription(&dep, false),
                                                           get_namespace_name(oldNspOid))));
        }
index cb93c3e935a1f742d802bb507ecfe8662eb26302..6d4c457b82060d6235bab9304002532f05d86df9 100644 (file)
@@ -15664,7 +15664,7 @@ RememberAllDependentForRebuilding(AlteredTableInfo *tab, AlterTableType subtype,
                                        ereport(ERROR,
                                                        (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                                         errmsg("cannot alter type of a column used by a function or procedure"),
-                                                        errdetail("%s depends on column \"%s\"",
+                                                        errdetail("%s depends on column \"%s\".",
                                                                           getObjectDescription(&foundObject, false),
                                                                           colName)));
                                break;
@@ -15679,7 +15679,7 @@ RememberAllDependentForRebuilding(AlteredTableInfo *tab, AlterTableType subtype,
                                        ereport(ERROR,
                                                        (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                                         errmsg("cannot alter type of a column used by a view or rule"),
-                                                        errdetail("%s depends on column \"%s\"",
+                                                        errdetail("%s depends on column \"%s\".",
                                                                           getObjectDescription(&foundObject, false),
                                                                           colName)));
                                break;
@@ -15699,7 +15699,7 @@ RememberAllDependentForRebuilding(AlteredTableInfo *tab, AlterTableType subtype,
                                        ereport(ERROR,
                                                        (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                                         errmsg("cannot alter type of a column used in a trigger definition"),
-                                                        errdetail("%s depends on column \"%s\"",
+                                                        errdetail("%s depends on column \"%s\".",
                                                                           getObjectDescription(&foundObject, false),
                                                                           colName)));
                                break;
@@ -15718,7 +15718,7 @@ RememberAllDependentForRebuilding(AlteredTableInfo *tab, AlterTableType subtype,
                                        ereport(ERROR,
                                                        (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                                         errmsg("cannot alter type of a column used in a policy definition"),
-                                                        errdetail("%s depends on column \"%s\"",
+                                                        errdetail("%s depends on column \"%s\".",
                                                                           getObjectDescription(&foundObject, false),
                                                                           colName)));
                                break;
@@ -15777,7 +15777,7 @@ RememberAllDependentForRebuilding(AlteredTableInfo *tab, AlterTableType subtype,
                                        ereport(ERROR,
                                                        (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                                                         errmsg("cannot alter type of a column used by a publication WHERE clause"),
-                                                        errdetail("%s depends on column \"%s\"",
+                                                        errdetail("%s depends on column \"%s\".",
                                                                           getObjectDescription(&foundObject, false),
                                                                           colName)));
                                break;
index 3674f3cd5de5bdd6d32ddc05ffc30d3efe70db0c..6a99a3d7f9fcaf1f9d48e909382a7d3da62bc737 100644 (file)
@@ -471,7 +471,7 @@ be_tls_init(bool isServerStart)
                        ereport(isServerStart ? FATAL : LOG,
                                        (errcode(ERRCODE_CONFIG_FILE_ERROR),
                                         errmsg("could not set SSL protocol version range"),
-                                        errdetail("\"%s\" cannot be higher than \"%s\"",
+                                        errdetail("\"%s\" cannot be higher than \"%s\".",
                                                           "ssl_min_protocol_version",
                                                           "ssl_max_protocol_version")));
                        goto error;
index fdae52d6ab2bf5ea7feba5f9121720464d06ec2a..1b5debdeeb15dfedbe49c4104905a48a6c5a83c7 100644 (file)
@@ -566,7 +566,7 @@ SELECT pg_describe_object(classid, objid, objsubid) as obj,
 -- fails, as function dep_req1 is not in the same schema as the extension.
 ALTER EXTENSION test_ext_req_schema1 SET SCHEMA test_func_dep3;
 ERROR:  extension "test_ext_req_schema1" does not support SET SCHEMA
-DETAIL:  function test_func_dep2.dep_req1() is not in the extension's schema "test_func_dep1"
+DETAIL:  function test_func_dep2.dep_req1() is not in the extension's schema "test_func_dep1".
 -- Move back the function, and the extension can be moved.
 ALTER FUNCTION test_func_dep2.dep_req1() SET SCHEMA test_func_dep1;
 ALTER EXTENSION test_ext_req_schema1 SET SCHEMA test_func_dep3;
index 63cf4b4371d00ca0b77219bd27bb6bda735d9bcf..053fa56573f25655ce2ec754cc7a56952d9a195e 100644 (file)
@@ -1720,7 +1720,7 @@ rollback;
 -- likewise, altering a referenced column's type is prohibited ...
 alter table tt14t alter column f4 type integer using f4::integer;  -- fail
 ERROR:  cannot alter type of a column used by a view or rule
-DETAIL:  rule _RETURN on view tt14v depends on column "f4"
+DETAIL:  rule _RETURN on view tt14v depends on column "f4".
 -- ... but some bug might let it happen, so check defenses
 begin;
 -- destroy the dependency entry that prevents the ALTER:
index 5cc94011e978f09841c534be640e5fc135f10af1..a7cb1b5611ddbca2353103dd441b65db9075fb58 100644 (file)
@@ -2279,7 +2279,7 @@ ERROR:  attribute 5 of type record has been dropped
 rollback;
 alter table users alter column seq type numeric;  -- fail, view has reference
 ERROR:  cannot alter type of a column used by a view or rule
-DETAIL:  rule _RETURN on view usersview depends on column "seq"
+DETAIL:  rule _RETURN on view usersview depends on column "seq".
 -- likewise, check we don't crash if the dependency goes wrong
 begin;
 -- destroy the dependency entry that prevents the ALTER: