Fix grammar in error message
authorJohn Naylor <john.naylor@postgresql.org>
Thu, 15 Sep 2022 04:40:17 +0000 (11:40 +0700)
committerJohn Naylor <john.naylor@postgresql.org>
Thu, 15 Sep 2022 04:40:17 +0000 (11:40 +0700)
While at it, make ellipses formatting consistent when describing SQL statements.

Ekaterina Kiryanova and Alexander Lakhin

Reviewed by myself and Álvaro Herrera
Discussion: https://www.postgresql.org/message-id/eed5cec0-a542-53da-6a5e-7789c6ed9817%40postgrespro.ru
Backpatch only the grammar fix to v15

src/backend/commands/subscriptioncmds.c
src/backend/postmaster/bgworker.c
src/backend/rewrite/rewriteHandler.c
src/test/regress/expected/with.out
src/test/regress/sql/with.sql

index 1024d51dca8f8d40a67f96352aa8051e10a93a1d..27cc5f0e65a3dd6f436ed43003f8ea09508c1732 100644 (file)
@@ -1187,7 +1187,7 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
                        ereport(ERROR,
                                (errcode(ERRCODE_SYNTAX_ERROR),
                                 errmsg("ALTER SUBSCRIPTION with refresh and copy_data is not allowed when two_phase is enabled"),
-                                errhint("Use ALTER SUBSCRIPTION ...SET PUBLICATION with refresh = false, or with copy_data = false"
+                                errhint("Use ALTER SUBSCRIPTION ... SET PUBLICATION with refresh = false, or with copy_data = false"
                                         ", or use DROP/CREATE SUBSCRIPTION.")));
 
                    PreventInTransactionBlock(isTopLevel, "ALTER SUBSCRIPTION with refresh");
@@ -1239,7 +1239,7 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
                        ereport(ERROR,
                                (errcode(ERRCODE_SYNTAX_ERROR),
                                 errmsg("ALTER SUBSCRIPTION with refresh and copy_data is not allowed when two_phase is enabled"),
-                                errhint("Use ALTER SUBSCRIPTION ...SET PUBLICATION with refresh = false, or with copy_data = false"
+                                errhint("Use ALTER SUBSCRIPTION ... SET PUBLICATION with refresh = false, or with copy_data = false"
                                         ", or use DROP/CREATE SUBSCRIPTION.")));
 
                    PreventInTransactionBlock(isTopLevel, "ALTER SUBSCRIPTION with refresh");
index 40601aefd974e4955dded8f2c929286b98145cca..8dd7d64630c4866a8738f184a9394f82980af7b2 100644 (file)
@@ -663,7 +663,7 @@ SanityCheckBackgroundWorker(BackgroundWorker *worker, int elevel)
    {
        ereport(elevel,
                (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-                errmsg("background worker \"%s\": background worker without shared memory access are not supported",
+                errmsg("background worker \"%s\": background workers without shared memory access are not supported",
                        worker->bgw_name)));
        return false;
    }
index 29ae27e5e323915b182e7be7884e747887af812f..d02fd83c0ae5185836ec3f76930caf92c3d157a2 100644 (file)
@@ -578,7 +578,7 @@ rewriteRuleAction(Query *parsetree,
        if (sub_action->hasModifyingCTE && rule_action != sub_action)
            ereport(ERROR,
                    (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-                    errmsg("INSERT...SELECT rule actions are not supported for queries having data-modifying statements in WITH")));
+                    errmsg("INSERT ... SELECT rule actions are not supported for queries having data-modifying statements in WITH")));
    }
 
    /*
index 30dd900e1141e4519b4ad377cf8c943942487fc4..7f2e32d8b0494ef9a94acd4d2f6180f7f26ab30d 100644 (file)
@@ -2515,14 +2515,14 @@ SELECT * FROM bug6051_2;
  3
 (3 rows)
 
--- check INSERT...SELECT rule actions are disallowed on commands
+-- check INSERT ... SELECT rule actions are disallowed on commands
 -- that have modifyingCTEs
 CREATE OR REPLACE RULE bug6051_ins AS ON INSERT TO bug6051 DO INSTEAD
  INSERT INTO bug6051_2
  SELECT NEW.i;
 WITH t1 AS ( DELETE FROM bug6051 RETURNING * )
 INSERT INTO bug6051 SELECT * FROM t1;
-ERROR:  INSERT...SELECT rule actions are not supported for queries having data-modifying statements in WITH
+ERROR:  INSERT ... SELECT rule actions are not supported for queries having data-modifying statements in WITH
 -- silly example to verify that hasModifyingCTE flag is propagated
 CREATE TEMP TABLE bug6051_3 AS
   SELECT a FROM generate_series(11,13) AS a;
index 5c52561a8aa4295a6b59f270d318f707a2d98c37..0f5730797fa3ccd70f274fa41152a907e2657dbc 100644 (file)
@@ -1169,7 +1169,7 @@ INSERT INTO bug6051 SELECT * FROM t1;
 SELECT * FROM bug6051;
 SELECT * FROM bug6051_2;
 
--- check INSERT...SELECT rule actions are disallowed on commands
+-- check INSERT ... SELECT rule actions are disallowed on commands
 -- that have modifyingCTEs
 CREATE OR REPLACE RULE bug6051_ins AS ON INSERT TO bug6051 DO INSTEAD
  INSERT INTO bug6051_2