Skip to content

Commit 5e368e2

Browse files
j-naylorpull[bot]
authored andcommitted
Fix grammar in error message
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
1 parent eb676b3 commit 5e368e2

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

src/backend/commands/subscriptioncmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
11871187
ereport(ERROR,
11881188
(errcode(ERRCODE_SYNTAX_ERROR),
11891189
errmsg("ALTER SUBSCRIPTION with refresh and copy_data is not allowed when two_phase is enabled"),
1190-
errhint("Use ALTER SUBSCRIPTION ...SET PUBLICATION with refresh = false, or with copy_data = false"
1190+
errhint("Use ALTER SUBSCRIPTION ... SET PUBLICATION with refresh = false, or with copy_data = false"
11911191
", or use DROP/CREATE SUBSCRIPTION.")));
11921192

11931193
PreventInTransactionBlock(isTopLevel, "ALTER SUBSCRIPTION with refresh");
@@ -1239,7 +1239,7 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
12391239
ereport(ERROR,
12401240
(errcode(ERRCODE_SYNTAX_ERROR),
12411241
errmsg("ALTER SUBSCRIPTION with refresh and copy_data is not allowed when two_phase is enabled"),
1242-
errhint("Use ALTER SUBSCRIPTION ...SET PUBLICATION with refresh = false, or with copy_data = false"
1242+
errhint("Use ALTER SUBSCRIPTION ... SET PUBLICATION with refresh = false, or with copy_data = false"
12431243
", or use DROP/CREATE SUBSCRIPTION.")));
12441244

12451245
PreventInTransactionBlock(isTopLevel, "ALTER SUBSCRIPTION with refresh");

src/backend/postmaster/bgworker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ SanityCheckBackgroundWorker(BackgroundWorker *worker, int elevel)
663663
{
664664
ereport(elevel,
665665
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
666-
errmsg("background worker \"%s\": background worker without shared memory access are not supported",
666+
errmsg("background worker \"%s\": background workers without shared memory access are not supported",
667667
worker->bgw_name)));
668668
return false;
669669
}

src/backend/rewrite/rewriteHandler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ rewriteRuleAction(Query *parsetree,
578578
if (sub_action->hasModifyingCTE && rule_action != sub_action)
579579
ereport(ERROR,
580580
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
581-
errmsg("INSERT...SELECT rule actions are not supported for queries having data-modifying statements in WITH")));
581+
errmsg("INSERT ... SELECT rule actions are not supported for queries having data-modifying statements in WITH")));
582582
}
583583

584584
/*

src/test/regress/expected/with.out

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2515,14 +2515,14 @@ SELECT * FROM bug6051_2;
25152515
3
25162516
(3 rows)
25172517

2518-
-- check INSERT...SELECT rule actions are disallowed on commands
2518+
-- check INSERT ... SELECT rule actions are disallowed on commands
25192519
-- that have modifyingCTEs
25202520
CREATE OR REPLACE RULE bug6051_ins AS ON INSERT TO bug6051 DO INSTEAD
25212521
INSERT INTO bug6051_2
25222522
SELECT NEW.i;
25232523
WITH t1 AS ( DELETE FROM bug6051 RETURNING * )
25242524
INSERT INTO bug6051 SELECT * FROM t1;
2525-
ERROR: INSERT...SELECT rule actions are not supported for queries having data-modifying statements in WITH
2525+
ERROR: INSERT ... SELECT rule actions are not supported for queries having data-modifying statements in WITH
25262526
-- silly example to verify that hasModifyingCTE flag is propagated
25272527
CREATE TEMP TABLE bug6051_3 AS
25282528
SELECT a FROM generate_series(11,13) AS a;

src/test/regress/sql/with.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ INSERT INTO bug6051 SELECT * FROM t1;
11691169
SELECT * FROM bug6051;
11701170
SELECT * FROM bug6051_2;
11711171

1172-
-- check INSERT...SELECT rule actions are disallowed on commands
1172+
-- check INSERT ... SELECT rule actions are disallowed on commands
11731173
-- that have modifyingCTEs
11741174
CREATE OR REPLACE RULE bug6051_ins AS ON INSERT TO bug6051 DO INSTEAD
11751175
INSERT INTO bug6051_2

0 commit comments

Comments
 (0)