Commit 730422af authored by Michael Paquier's avatar Michael Paquier

Fix some errhint and errdetail strings missing a period

As per the error message style guide of the documentation, those should
be full sentences.

Author: Daniel Gustafsson
Reviewed-by: Michael Paquier, Álvaro Herrera
Discussion: https://1E8D49B4-16BC-4420-B4ED-58501D9E076B@yesql.se
parent d2b0b60e
......@@ -294,7 +294,7 @@ btree_index_checkable(Relation rel)
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("cannot check index \"%s\"",
RelationGetRelationName(rel)),
errdetail("Index is not valid")));
errdetail("Index is not valid.")));
}
/*
......
......@@ -11382,7 +11382,7 @@ ATExecAddInherit(Relation child_rel, RangeVar *parent, LOCKMODE lockmode)
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
errmsg("trigger \"%s\" prevents table \"%s\" from becoming an inheritance child",
trigger_name, RelationGetRelationName(child_rel)),
errdetail("ROW triggers with transition tables are not supported in inheritance hierarchies")));
errdetail("ROW triggers with transition tables are not supported in inheritance hierarchies.")));
/* OK to create inheritance */
CreateInheritance(child_rel, parent_rel);
......
......@@ -4993,7 +4993,7 @@ parse_jsonb_index_flags(Jsonb *jb)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("flag array element is not a string"),
errhint("Possible values are: \"string\", \"numeric\", \"boolean\", \"key\", and \"all\"")));
errhint("Possible values are: \"string\", \"numeric\", \"boolean\", \"key\", and \"all\".")));
if (v.val.string.len == 3 &&
pg_strncasecmp(v.val.string.val, "all", 3) == 0)
......@@ -5015,7 +5015,7 @@ parse_jsonb_index_flags(Jsonb *jb)
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("wrong flag in flag array: \"%s\"",
pnstrdup(v.val.string.val, v.val.string.len)),
errhint("Possible values are: \"string\", \"numeric\", \"boolean\", \"key\", and \"all\"")));
errhint("Possible values are: \"string\", \"numeric\", \"boolean\", \"key\", and \"all\".")));
}
/* expect end of array now */
......
......@@ -10929,7 +10929,7 @@ check_effective_io_concurrency(int *newval, void **extra, GucSource source)
#else
if (*newval != 0)
{
GUC_check_errdetail("effective_io_concurrency must be set to 0 on platforms that lack posix_fadvise()");
GUC_check_errdetail("effective_io_concurrency must be set to 0 on platforms that lack posix_fadvise().");
return false;
}
return true;
......@@ -11041,7 +11041,7 @@ check_recovery_target_timeline(char **newval, void **extra, GucSource source)
strtoul(*newval, NULL, 0);
if (errno == EINVAL || errno == ERANGE)
{
GUC_check_errdetail("recovery_target_timeline is not a valid number");
GUC_check_errdetail("recovery_target_timeline is not a valid number.");
return false;
}
rttg = RECOVERY_TARGET_TIMELINE_NUMERIC;
......@@ -11219,7 +11219,7 @@ check_recovery_target_name(char **newval, void **extra, GucSource source)
/* Use the value of newval directly */
if (strlen(*newval) >= MAXFNAMELEN)
{
GUC_check_errdetail("recovery_target_name is too long (maximum %d characters)",
GUC_check_errdetail("recovery_target_name is too long (maximum %d characters).",
MAXFNAMELEN - 1);
return false;
}
......
......@@ -4232,7 +4232,7 @@ exec_stmt_execsql(PLpgSQL_execstate *estate,
(errcode(ERRCODE_TOO_MANY_ROWS),
errmsg("query returned more than one row"),
errdetail ? errdetail_internal("parameters: %s", errdetail) : 0,
errhint("Make sure the query returns a single row, or use LIMIT 1")));
errhint("Make sure the query returns a single row, or use LIMIT 1.")));
}
/* Put the first result row into the target */
exec_move_row(estate, target, tuptab->vals[0], tuptab->tupdesc);
......
......@@ -2479,7 +2479,7 @@ select json_to_tsvector('null'::json, '"all"');
select json_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::json, '""');
ERROR: wrong flag in flag array: ""
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all"
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all".
select json_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::json, '{}');
ERROR: wrong flag type, only arrays and scalars are allowed
select json_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::json, '[]');
......@@ -2490,10 +2490,10 @@ select json_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d":
select json_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::json, 'null');
ERROR: flag array element is not a string
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all"
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all".
select json_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::json, '["all", null]');
ERROR: flag array element is not a string
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all"
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all".
-- ts_headline for json
select ts_headline('{"a": "aaa bbb", "b": {"c": "ccc ddd fff", "c1": "ccc1 ddd1"}, "d": ["ggg hhh", "iii jjj"]}'::json, tsquery('bbb & ddd & hhh'));
ts_headline
......
......@@ -4277,7 +4277,7 @@ select jsonb_to_tsvector('null'::jsonb, '"all"');
select jsonb_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::jsonb, '""');
ERROR: wrong flag in flag array: ""
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all"
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all".
select jsonb_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::jsonb, '{}');
ERROR: wrong flag type, only arrays and scalars are allowed
select jsonb_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::jsonb, '[]');
......@@ -4288,10 +4288,10 @@ select jsonb_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d"
select jsonb_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::jsonb, 'null');
ERROR: flag array element is not a string
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all"
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all".
select jsonb_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::jsonb, '["all", null]');
ERROR: flag array element is not a string
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all"
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all".
-- ts_headline for jsonb
select ts_headline('{"a": "aaa bbb", "b": {"c": "ccc ddd fff", "c1": "ccc1 ddd1"}, "d": ["ggg hhh", "iii jjj"]}'::jsonb, tsquery('bbb & ddd & hhh'));
ts_headline
......
......@@ -2778,7 +2778,7 @@ begin
end$$ language plpgsql;
select stricttest();
ERROR: query returned more than one row
HINT: Make sure the query returns a single row, or use LIMIT 1
HINT: Make sure the query returns a single row, or use LIMIT 1.
CONTEXT: PL/pgSQL function stricttest() line 5 at SQL statement
create or replace function stricttest() returns void as $$
declare x record;
......@@ -2852,7 +2852,7 @@ begin
end$$ language plpgsql;
select stricttest();
ERROR: query returned more than one row
HINT: Make sure the query returns a single row, or use LIMIT 1
HINT: Make sure the query returns a single row, or use LIMIT 1.
CONTEXT: PL/pgSQL function stricttest() line 5 at SQL statement
create or replace function stricttest() returns void as $$
declare x record;
......@@ -2918,7 +2918,7 @@ end$$ language plpgsql;
select stricttest();
ERROR: query returned more than one row
DETAIL: parameters: p1 = '2', p3 = 'foo'
HINT: Make sure the query returns a single row, or use LIMIT 1
HINT: Make sure the query returns a single row, or use LIMIT 1.
CONTEXT: PL/pgSQL function stricttest() line 8 at SQL statement
create or replace function stricttest() returns void as $$
declare x record;
......@@ -2929,7 +2929,7 @@ begin
end$$ language plpgsql;
select stricttest();
ERROR: query returned more than one row
HINT: Make sure the query returns a single row, or use LIMIT 1
HINT: Make sure the query returns a single row, or use LIMIT 1.
CONTEXT: PL/pgSQL function stricttest() line 5 at SQL statement
create or replace function stricttest() returns void as $$
declare x record;
......@@ -2977,7 +2977,7 @@ begin
end$$ language plpgsql;
select stricttest();
ERROR: query returned more than one row
HINT: Make sure the query returns a single row, or use LIMIT 1
HINT: Make sure the query returns a single row, or use LIMIT 1.
CONTEXT: PL/pgSQL function stricttest() line 10 at SQL statement
reset plpgsql.print_strict_params;
create or replace function stricttest() returns void as $$
......@@ -2995,7 +2995,7 @@ end$$ language plpgsql;
select stricttest();
ERROR: query returned more than one row
DETAIL: parameters: p1 = '2', p3 = 'foo'
HINT: Make sure the query returns a single row, or use LIMIT 1
HINT: Make sure the query returns a single row, or use LIMIT 1.
CONTEXT: PL/pgSQL function stricttest() line 10 at SQL statement
-- test warnings and errors
set plpgsql.extra_warnings to 'all';
......@@ -3128,7 +3128,7 @@ begin
end;
$$;
WARNING: query returned more than one row
HINT: Make sure the query returns a single row, or use LIMIT 1
HINT: Make sure the query returns a single row, or use LIMIT 1.
set plpgsql.extra_errors to 'too_many_rows';
do $$
declare x int;
......@@ -3137,7 +3137,7 @@ begin
end;
$$;
ERROR: query returned more than one row
HINT: Make sure the query returns a single row, or use LIMIT 1
HINT: Make sure the query returns a single row, or use LIMIT 1.
CONTEXT: PL/pgSQL function inline_code_block line 4 at SQL statement
reset plpgsql.extra_errors;
reset plpgsql.extra_warnings;
......
......@@ -2564,7 +2564,7 @@ create trigger child_row_trig
-- but now we're not allowed to make it inherit anymore
alter table child inherit parent;
ERROR: trigger "child_row_trig" prevents table "child" from becoming an inheritance child
DETAIL: ROW triggers with transition tables are not supported in inheritance hierarchies
DETAIL: ROW triggers with transition tables are not supported in inheritance hierarchies.
-- drop the trigger, and now we're allowed to make it inherit again
drop trigger child_row_trig on child;
alter table child inherit parent;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment