aboutsummaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-07-20 09:50:12 +0900
committerMichael Paquier <michael@paquier.xyz>2022-07-20 09:50:12 +0900
commit12c254c99f6c6f0bbfc7997ee10ea73fee30dea2 (patch)
tree8fef3ccd28d896897f1298c9cad604b580cd1035 /src/backend
parentecc84b916f8f36924e2b3de358045edfc3205e5a (diff)
downloadpostgresql-12c254c99f6c6f0bbfc7997ee10ea73fee30dea2.tar.gz
postgresql-12c254c99f6c6f0bbfc7997ee10ea73fee30dea2.zip
Tweak detail and hint messages to be consistent with project policy
Detail and hint messages should be full sentences and should end with a period, but some of the messages newly-introduced in v15 did not follow that. Author: Justin Pryzby Reviewed-by: Álvaro Herrera Discussion: https://postgr.es/m/20220719120948.GF12702@telsasoft.com Backpatch-through: 15
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/commands/publicationcmds.c2
-rw-r--r--src/backend/commands/tablecmds.c2
-rw-r--r--src/backend/parser/parse_expr.c4
-rw-r--r--src/backend/parser/parse_jsontable.c12
-rw-r--r--src/backend/utils/adt/jsonpath_exec.c4
-rw-r--r--src/backend/utils/adt/jsonpath_gram.y2
-rw-r--r--src/backend/utils/misc/guc.c2
7 files changed, 14 insertions, 14 deletions
diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c
index 8e645741e4e..89a005540f6 100644
--- a/src/backend/commands/publicationcmds.c
+++ b/src/backend/commands/publicationcmds.c
@@ -743,7 +743,7 @@ CheckPubRelationColumnList(List *tables, const char *queryString,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("cannot use publication column list for relation \"%s\"",
RelationGetRelationName(pri->relation)),
- errdetail("column list cannot be used for a partitioned table when %s is false.",
+ errdetail("Column list cannot be used for a partitioned table when %s is false.",
"publish_via_partition_root")));
}
}
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index a2f577024a1..7fbee0c1f71 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -17790,7 +17790,7 @@ ATExecAttachPartition(List **wqueue, Relation rel, PartitionCmd *cmd,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("trigger \"%s\" prevents table \"%s\" from becoming a partition",
trigger_name, RelationGetRelationName(attachrel)),
- errdetail("ROW triggers with transition tables are not supported on partitions")));
+ errdetail("ROW triggers with transition tables are not supported on partitions.")));
/*
* Check that the new partition's bound is valid and does not overlap any
diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c
index b1cc6a382f1..9f567f4bf41 100644
--- a/src/backend/parser/parse_expr.c
+++ b/src/backend/parser/parse_expr.c
@@ -3447,7 +3447,7 @@ checkJsonOutputFormat(ParseState *pstate, const JsonFormat *format,
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("unsupported JSON encoding"),
- errhint("only UTF8 JSON encoding is supported"),
+ errhint("Only UTF8 JSON encoding is supported."),
parser_errposition(pstate, format->location)));
}
}
@@ -4580,7 +4580,7 @@ transformJsonSerializeExpr(ParseState *pstate, JsonSerializeExpr *expr)
errmsg("cannot use RETURNING type %s in %s",
format_type_be(returning->typid),
"JSON_SERIALIZE()"),
- errhint("Try returning a string type or bytea")));
+ errhint("Try returning a string type or bytea.")));
}
}
else
diff --git a/src/backend/parser/parse_jsontable.c b/src/backend/parser/parse_jsontable.c
index ae559d9cae5..bc3272017ef 100644
--- a/src/backend/parser/parse_jsontable.c
+++ b/src/backend/parser/parse_jsontable.c
@@ -141,7 +141,7 @@ registerJsonTableColumn(JsonTableContext *cxt, char *colname)
ereport(ERROR,
(errcode(ERRCODE_DUPLICATE_ALIAS),
errmsg("duplicate JSON_TABLE column name: %s", colname),
- errhint("JSON_TABLE column names must be distinct from one another")));
+ errhint("JSON_TABLE column names must be distinct from one another.")));
cxt->pathNames = lappend(cxt->pathNames, colname);
}
@@ -258,7 +258,7 @@ validateJsonTableChildPlan(ParseState *pstate, JsonTablePlan *plan,
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("invalid JSON_TABLE plan"),
- errdetail("plan node for nested path %s was not found in plan", jtc->pathname),
+ errdetail("Plan node for nested path %s was not found in plan.", jtc->pathname),
parser_errposition(pstate, jtc->location)));
nchildren++;
@@ -269,7 +269,7 @@ validateJsonTableChildPlan(ParseState *pstate, JsonTablePlan *plan,
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("invalid JSON_TABLE plan"),
- errdetail("plan node contains some extra or duplicate sibling nodes"),
+ errdetail("Plan node contains some extra or duplicate sibling nodes."),
parser_errposition(pstate, plan ? plan->location : -1)));
}
@@ -385,7 +385,7 @@ transformJsonTableChildPlan(JsonTableContext *cxt, JsonTablePlan *plan,
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("invalid JSON_TABLE plan"),
- errdetail("path name was %s not found in nested columns list",
+ errdetail("Path name was %s not found in nested columns list.",
plan->pathname),
parser_errposition(cxt->pstate, plan->location)));
@@ -586,7 +586,7 @@ transformJsonTableColumns(JsonTableContext *cxt, JsonTablePlan *plan,
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("invalid JSON_TABLE plan"),
- errdetail("expected INNER or OUTER JSON_TABLE plan node"),
+ errdetail("Expected INNER or OUTER JSON_TABLE plan node."),
parser_errposition(cxt->pstate, plan->location)));
parentPlan = plan->plan1;
@@ -605,7 +605,7 @@ transformJsonTableColumns(JsonTableContext *cxt, JsonTablePlan *plan,
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("invalid JSON_TABLE plan"),
- errdetail("path name mismatch: expected %s but %s is given",
+ errdetail("Path name mismatch: expected %s but %s is given.",
*pathName, parentPlan->pathname),
parser_errposition(cxt->pstate, plan->location)));
diff --git a/src/backend/utils/adt/jsonpath_exec.c b/src/backend/utils/adt/jsonpath_exec.c
index 0943a381bac..10c7e64aab3 100644
--- a/src/backend/utils/adt/jsonpath_exec.c
+++ b/src/backend/utils/adt/jsonpath_exec.c
@@ -2973,8 +2973,8 @@ JsonPathQuery(Datum jb, JsonPath *jp, JsonWrapper wrapper, bool *empty,
(errcode(ERRCODE_MORE_THAN_ONE_SQL_JSON_ITEM),
errmsg("JSON path expression in JSON_QUERY should return "
"singleton item without wrapper"),
- errhint("use WITH WRAPPER clause to wrap SQL/JSON item "
- "sequence into array")));
+ errhint("Use WITH WRAPPER clause to wrap SQL/JSON item "
+ "sequence into array.")));
}
if (first)
diff --git a/src/backend/utils/adt/jsonpath_gram.y b/src/backend/utils/adt/jsonpath_gram.y
index 57f6beb27bf..f903dba3e34 100644
--- a/src/backend/utils/adt/jsonpath_gram.y
+++ b/src/backend/utils/adt/jsonpath_gram.y
@@ -526,7 +526,7 @@ makeItemLikeRegex(JsonPathParseItem *expr, JsonPathString *pattern,
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
errmsg("invalid input syntax for type %s", "jsonpath"),
- errdetail("unrecognized flag character \"%.*s\" in LIKE_REGEX predicate",
+ errdetail("Unrecognized flag character \"%.*s\" in LIKE_REGEX predicate.",
pg_mblen(flags->val + i), flags->val + i)));
break;
}
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 28da02ff6c9..af4a1c30689 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -12551,7 +12551,7 @@ check_client_connection_check_interval(int *newval, void **extra, GucSource sour
{
if (!WaitEventSetCanReportClosed() && *newval != 0)
{
- GUC_check_errdetail("client_connection_check_interval must be set to 0 on this platform");
+ GUC_check_errdetail("client_connection_check_interval must be set to 0 on this platform.");
return false;
}
return true;