Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcb9b66d

Browse files
committed
Improve error message wording
The wording changes applied in0ac5ad5 were universally disliked.Per gripe from Andrew Dunstan
1 parentab0f7b6 commitcb9b66d

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

‎contrib/file_fdw/output/file_fdw.source

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ ERROR: cannot change foreign table "agg_csv"
191191
DELETE FROM agg_csv WHERE a = 100;
192192
ERROR: cannot change foreign table "agg_csv"
193193
SELECT * FROM agg_csv FOR UPDATE OF agg_csv;
194-
ERROR:SELECT FOR UPDATE/SHARE/KEY UPDATE/KEY SHARE cannot be used with foreign table "agg_csv"
194+
ERROR:row-level locks cannot be used with foreign table "agg_csv"
195195
LINE 1: SELECT * FROM agg_csv FOR UPDATE OF agg_csv;
196196
^
197197
-- but this should be ignored

‎src/backend/optimizer/plan/initsplan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ make_outerjoininfo(PlannerInfo *root,
883883
(jointype==JOIN_FULL&&bms_is_member(rc->rti,left_rels)))
884884
ereport(ERROR,
885885
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
886-
errmsg("SELECT FOR UPDATE/SHARE/KEY UPDATE/KEY SHARE cannot be applied to the nullable side of an outer join")));
886+
errmsg("row-level locks cannot be applied to the nullable side of an outer join")));
887887
}
888888

889889
sjinfo->syn_lefthand=left_rels;

‎src/backend/optimizer/plan/planner.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ grouping_planner(PlannerInfo *root, double tuple_fraction)
10711071
if (parse->rowMarks)
10721072
ereport(ERROR,
10731073
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1074-
errmsg("SELECT FOR UPDATE/SHARE/KEY UPDATE/KEY SHARE is not allowed with UNION/INTERSECT/EXCEPT")));
1074+
errmsg("row-level locks are not allowed with UNION/INTERSECT/EXCEPT")));
10751075

10761076
/*
10771077
* Calculate pathkeys that represent result ordering requirements

‎src/backend/parser/analyze.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,31 +2149,31 @@ CheckSelectLocking(Query *qry)
21492149
if (qry->setOperations)
21502150
ereport(ERROR,
21512151
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2152-
errmsg("SELECT FOR UPDATE/SHARE/FOR KEY UPDATE/FOR KEY SHARE is not allowed with UNION/INTERSECT/EXCEPT")));
2152+
errmsg("row-level locks are not allowed with UNION/INTERSECT/EXCEPT")));
21532153
if (qry->distinctClause!=NIL)
21542154
ereport(ERROR,
21552155
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2156-
errmsg("SELECT FOR UPDATE/SHARE/FOR KEY UPDATE/FOR KEY SHARE is not allowed with DISTINCT clause")));
2156+
errmsg("row-level locks are not allowed with DISTINCT clause")));
21572157
if (qry->groupClause!=NIL)
21582158
ereport(ERROR,
21592159
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2160-
errmsg("SELECT FOR UPDATE/SHARE/FOR KEY UPDATE/FOR KEY SHARE is not allowed with GROUP BY clause")));
2160+
errmsg("row-level locks are not allowed with GROUP BY clause")));
21612161
if (qry->havingQual!=NULL)
21622162
ereport(ERROR,
21632163
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2164-
errmsg("SELECT FOR UPDATE/SHARE/FOR KEY UPDATE/FOR KEY SHARE is not allowed with HAVING clause")));
2164+
errmsg("row-level locks are not allowed with HAVING clause")));
21652165
if (qry->hasAggs)
21662166
ereport(ERROR,
21672167
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2168-
errmsg("SELECT FOR UPDATE/SHARE/FOR KEY UPDATE/FOR KEY SHARE is not allowed with aggregate functions")));
2168+
errmsg("row-level locks are not allowed with aggregate functions")));
21692169
if (qry->hasWindowFuncs)
21702170
ereport(ERROR,
21712171
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2172-
errmsg("SELECT FOR UPDATE/SHARE/FOR KEY UPDATE/FOR KEY SHARE is not allowed with window functions")));
2172+
errmsg("row-level locks are not allowed with window functions")));
21732173
if (expression_returns_set((Node*)qry->targetList))
21742174
ereport(ERROR,
21752175
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2176-
errmsg("SELECT FOR UPDATE/SHARE/FOR KEY UPDATE/FOR KEY SHARE is not allowed with set-returning functions in the target list")));
2176+
errmsg("row-level locks are not allowed with set-returning functions in the target list")));
21772177
}
21782178

21792179
/*
@@ -2252,7 +2252,7 @@ transformLockingClause(ParseState *pstate, Query *qry, LockingClause *lc,
22522252
if (thisrel->catalogname||thisrel->schemaname)
22532253
ereport(ERROR,
22542254
(errcode(ERRCODE_SYNTAX_ERROR),
2255-
errmsg("SELECT FOR UPDATE/SHARE/KEY UPDATE/KEY SHARE must specify unqualified relation names"),
2255+
errmsg("row-level locks must specify unqualified relation names"),
22562256
parser_errposition(pstate,thisrel->location)));
22572257

22582258
i=0;
@@ -2269,7 +2269,7 @@ transformLockingClause(ParseState *pstate, Query *qry, LockingClause *lc,
22692269
if (rte->relkind==RELKIND_FOREIGN_TABLE)
22702270
ereport(ERROR,
22712271
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2272-
errmsg("SELECT FOR UPDATE/SHARE/KEY UPDATE/KEY SHARE cannot be used with foreign table \"%s\"",
2272+
errmsg("row-level locks cannot be used with foreign table \"%s\"",
22732273
rte->eref->aliasname),
22742274
parser_errposition(pstate,thisrel->location)));
22752275
applyLockingClause(qry,i,
@@ -2288,25 +2288,25 @@ transformLockingClause(ParseState *pstate, Query *qry, LockingClause *lc,
22882288
caseRTE_JOIN:
22892289
ereport(ERROR,
22902290
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2291-
errmsg("SELECT FOR UPDATE/SHARE/KEY UPDATE/KEY SHARE cannot be applied to a join"),
2291+
errmsg("row-level locks cannot be applied to a join"),
22922292
parser_errposition(pstate,thisrel->location)));
22932293
break;
22942294
caseRTE_FUNCTION:
22952295
ereport(ERROR,
22962296
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2297-
errmsg("SELECT FOR UPDATE/SHARE/KEY UPDATE/KEY SHARE cannot be applied to a function"),
2297+
errmsg("row-level locks cannot be applied to a function"),
22982298
parser_errposition(pstate,thisrel->location)));
22992299
break;
23002300
caseRTE_VALUES:
23012301
ereport(ERROR,
23022302
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2303-
errmsg("SELECT FOR UPDATE/SHARE/KEY UPDATE/KEY SHARE cannot be applied to VALUES"),
2303+
errmsg("row-level locks cannot be applied to VALUES"),
23042304
parser_errposition(pstate,thisrel->location)));
23052305
break;
23062306
caseRTE_CTE:
23072307
ereport(ERROR,
23082308
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
2309-
errmsg("SELECT FOR UPDATE/SHARE/KEY UPDATE/KEY SHARE cannot be applied to a WITH query"),
2309+
errmsg("row-level locks cannot be applied to a WITH query"),
23102310
parser_errposition(pstate,thisrel->location)));
23112311
break;
23122312
default:
@@ -2320,7 +2320,7 @@ transformLockingClause(ParseState *pstate, Query *qry, LockingClause *lc,
23202320
if (rt==NULL)
23212321
ereport(ERROR,
23222322
(errcode(ERRCODE_UNDEFINED_TABLE),
2323-
errmsg("relation \"%s\" inFOR UPDATE/SHARE/KEY UPDATE/KEY SHARE clause not found in FROM clause",
2323+
errmsg("relation \"%s\" inrow-level lock clause not found in FROM clause",
23242324
thisrel->relname),
23252325
parser_errposition(pstate,thisrel->location)));
23262326
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp