]> granicus.if.org Git - postgresql/commitdiff
Remove function names from error messages
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 19 Dec 2018 17:51:13 +0000 (14:51 -0300)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 19 Dec 2018 17:53:27 +0000 (14:53 -0300)
They are not necessary, and having them there gives useless work for
translators.

src/backend/access/transam/xlogfuncs.c
src/backend/commands/extension.c

index f139eeff9fff9ac5354da8de3ed4051e6528f259..d2615356ec59c56491800b3540a8b4ef52d521ae 100644 (file)
@@ -465,7 +465,8 @@ pg_walfile_name_offset(PG_FUNCTION_ARGS)
                ereport(ERROR,
                                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
                                 errmsg("recovery is in progress"),
-                                errhint("pg_walfile_name_offset() cannot be executed during recovery.")));
+                                errhint("%s cannot be executed during recovery.",
+                                                "pg_walfile_name_offset()")));
 
        /*
         * Construct a tuple descriptor for the result row.  This must match this
@@ -521,7 +522,8 @@ pg_walfile_name(PG_FUNCTION_ARGS)
                ereport(ERROR,
                                (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
                                 errmsg("recovery is in progress"),
-                                errhint("pg_walfile_name() cannot be executed during recovery.")));
+                                errhint("%s cannot be executed during recovery.",
+                                                "pg_walfile_name()")));
 
        XLByteToPrevSeg(locationpoint, xlogsegno, wal_segment_size);
        XLogFileName(xlogfilename, ThisTimeLineID, xlogsegno, wal_segment_size);
index 87e4dd824533bb1b9e57d4bcf58b6fd49b0d090d..31dcfe7b11b0e30bd102e00b8a3a58fdd9739eaf 100644 (file)
@@ -2348,8 +2348,8 @@ pg_extension_config_dump(PG_FUNCTION_ARGS)
        if (!creating_extension)
                ereport(ERROR,
                                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                                errmsg("pg_extension_config_dump() can only be called "
-                                               "from an SQL script executed by CREATE EXTENSION")));
+                                errmsg("%s can only be called from an SQL script executed by CREATE EXTENSION",
+                                               "pg_extension_config_dump()")));
 
        /*
         * Check that the table exists and is a member of the extension being