mirror of
https://github.com/postgres/postgres.git
synced 2025-05-11 05:41:32 +03:00
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
This commit is contained in:
parent
16492df70b
commit
7beda87b6a
@ -1187,7 +1187,7 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||||
errmsg("ALTER SUBSCRIPTION with refresh and copy_data is not allowed when two_phase is enabled"),
|
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.")));
|
", or use DROP/CREATE SUBSCRIPTION.")));
|
||||||
|
|
||||||
PreventInTransactionBlock(isTopLevel, "ALTER SUBSCRIPTION with refresh");
|
PreventInTransactionBlock(isTopLevel, "ALTER SUBSCRIPTION with refresh");
|
||||||
@ -1239,7 +1239,7 @@ AlterSubscription(ParseState *pstate, AlterSubscriptionStmt *stmt,
|
|||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||||
errmsg("ALTER SUBSCRIPTION with refresh and copy_data is not allowed when two_phase is enabled"),
|
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.")));
|
", or use DROP/CREATE SUBSCRIPTION.")));
|
||||||
|
|
||||||
PreventInTransactionBlock(isTopLevel, "ALTER SUBSCRIPTION with refresh");
|
PreventInTransactionBlock(isTopLevel, "ALTER SUBSCRIPTION with refresh");
|
||||||
|
@ -663,7 +663,7 @@ SanityCheckBackgroundWorker(BackgroundWorker *worker, int elevel)
|
|||||||
{
|
{
|
||||||
ereport(elevel,
|
ereport(elevel,
|
||||||
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
|
(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)));
|
worker->bgw_name)));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -578,7 +578,7 @@ rewriteRuleAction(Query *parsetree,
|
|||||||
if (sub_action->hasModifyingCTE && rule_action != sub_action)
|
if (sub_action->hasModifyingCTE && rule_action != sub_action)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
(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")));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2515,14 +2515,14 @@ SELECT * FROM bug6051_2;
|
|||||||
3
|
3
|
||||||
(3 rows)
|
(3 rows)
|
||||||
|
|
||||||
-- check INSERT...SELECT rule actions are disallowed on commands
|
-- check INSERT ... SELECT rule actions are disallowed on commands
|
||||||
-- that have modifyingCTEs
|
-- that have modifyingCTEs
|
||||||
CREATE OR REPLACE RULE bug6051_ins AS ON INSERT TO bug6051 DO INSTEAD
|
CREATE OR REPLACE RULE bug6051_ins AS ON INSERT TO bug6051 DO INSTEAD
|
||||||
INSERT INTO bug6051_2
|
INSERT INTO bug6051_2
|
||||||
SELECT NEW.i;
|
SELECT NEW.i;
|
||||||
WITH t1 AS ( DELETE FROM bug6051 RETURNING * )
|
WITH t1 AS ( DELETE FROM bug6051 RETURNING * )
|
||||||
INSERT INTO bug6051 SELECT * FROM t1;
|
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
|
-- silly example to verify that hasModifyingCTE flag is propagated
|
||||||
CREATE TEMP TABLE bug6051_3 AS
|
CREATE TEMP TABLE bug6051_3 AS
|
||||||
SELECT a FROM generate_series(11,13) AS a;
|
SELECT a FROM generate_series(11,13) AS a;
|
||||||
|
@ -1169,7 +1169,7 @@ INSERT INTO bug6051 SELECT * FROM t1;
|
|||||||
SELECT * FROM bug6051;
|
SELECT * FROM bug6051;
|
||||||
SELECT * FROM bug6051_2;
|
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
|
-- that have modifyingCTEs
|
||||||
CREATE OR REPLACE RULE bug6051_ins AS ON INSERT TO bug6051 DO INSTEAD
|
CREATE OR REPLACE RULE bug6051_ins AS ON INSERT TO bug6051 DO INSTEAD
|
||||||
INSERT INTO bug6051_2
|
INSERT INTO bug6051_2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user