Skip to content

Commit 730422a

Browse files
committed
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://[email protected]
1 parent d2b0b60 commit 730422a

File tree

9 files changed

+23
-23
lines changed

9 files changed

+23
-23
lines changed

contrib/amcheck/verify_nbtree.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ btree_index_checkable(Relation rel)
294294
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
295295
errmsg("cannot check index \"%s\"",
296296
RelationGetRelationName(rel)),
297-
errdetail("Index is not valid")));
297+
errdetail("Index is not valid.")));
298298
}
299299

300300
/*

src/backend/commands/tablecmds.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -11382,7 +11382,7 @@ ATExecAddInherit(Relation child_rel, RangeVar *parent, LOCKMODE lockmode)
1138211382
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
1138311383
errmsg("trigger \"%s\" prevents table \"%s\" from becoming an inheritance child",
1138411384
trigger_name, RelationGetRelationName(child_rel)),
11385-
errdetail("ROW triggers with transition tables are not supported in inheritance hierarchies")));
11385+
errdetail("ROW triggers with transition tables are not supported in inheritance hierarchies.")));
1138611386

1138711387
/* OK to create inheritance */
1138811388
CreateInheritance(child_rel, parent_rel);

src/backend/utils/adt/jsonfuncs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -4993,7 +4993,7 @@ parse_jsonb_index_flags(Jsonb *jb)
49934993
ereport(ERROR,
49944994
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
49954995
errmsg("flag array element is not a string"),
4996-
errhint("Possible values are: \"string\", \"numeric\", \"boolean\", \"key\", and \"all\"")));
4996+
errhint("Possible values are: \"string\", \"numeric\", \"boolean\", \"key\", and \"all\".")));
49974997

49984998
if (v.val.string.len == 3 &&
49994999
pg_strncasecmp(v.val.string.val, "all", 3) == 0)
@@ -5015,7 +5015,7 @@ parse_jsonb_index_flags(Jsonb *jb)
50155015
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
50165016
errmsg("wrong flag in flag array: \"%s\"",
50175017
pnstrdup(v.val.string.val, v.val.string.len)),
5018-
errhint("Possible values are: \"string\", \"numeric\", \"boolean\", \"key\", and \"all\"")));
5018+
errhint("Possible values are: \"string\", \"numeric\", \"boolean\", \"key\", and \"all\".")));
50195019
}
50205020

50215021
/* expect end of array now */

src/backend/utils/misc/guc.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -10929,7 +10929,7 @@ check_effective_io_concurrency(int *newval, void **extra, GucSource source)
1092910929
#else
1093010930
if (*newval != 0)
1093110931
{
10932-
GUC_check_errdetail("effective_io_concurrency must be set to 0 on platforms that lack posix_fadvise()");
10932+
GUC_check_errdetail("effective_io_concurrency must be set to 0 on platforms that lack posix_fadvise().");
1093310933
return false;
1093410934
}
1093510935
return true;
@@ -11041,7 +11041,7 @@ check_recovery_target_timeline(char **newval, void **extra, GucSource source)
1104111041
strtoul(*newval, NULL, 0);
1104211042
if (errno == EINVAL || errno == ERANGE)
1104311043
{
11044-
GUC_check_errdetail("recovery_target_timeline is not a valid number");
11044+
GUC_check_errdetail("recovery_target_timeline is not a valid number.");
1104511045
return false;
1104611046
}
1104711047
rttg = RECOVERY_TARGET_TIMELINE_NUMERIC;
@@ -11219,7 +11219,7 @@ check_recovery_target_name(char **newval, void **extra, GucSource source)
1121911219
/* Use the value of newval directly */
1122011220
if (strlen(*newval) >= MAXFNAMELEN)
1122111221
{
11222-
GUC_check_errdetail("recovery_target_name is too long (maximum %d characters)",
11222+
GUC_check_errdetail("recovery_target_name is too long (maximum %d characters).",
1122311223
MAXFNAMELEN - 1);
1122411224
return false;
1122511225
}

src/pl/plpgsql/src/pl_exec.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4232,7 +4232,7 @@ exec_stmt_execsql(PLpgSQL_execstate *estate,
42324232
(errcode(ERRCODE_TOO_MANY_ROWS),
42334233
errmsg("query returned more than one row"),
42344234
errdetail ? errdetail_internal("parameters: %s", errdetail) : 0,
4235-
errhint("Make sure the query returns a single row, or use LIMIT 1")));
4235+
errhint("Make sure the query returns a single row, or use LIMIT 1.")));
42364236
}
42374237
/* Put the first result row into the target */
42384238
exec_move_row(estate, target, tuptab->vals[0], tuptab->tupdesc);

src/test/regress/expected/json.out

+3-3
Original file line numberDiff line numberDiff line change
@@ -2479,7 +2479,7 @@ select json_to_tsvector('null'::json, '"all"');
24792479

24802480
select json_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::json, '""');
24812481
ERROR: wrong flag in flag array: ""
2482-
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all"
2482+
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all".
24832483
select json_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::json, '{}');
24842484
ERROR: wrong flag type, only arrays and scalars are allowed
24852485
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":
24902490

24912491
select json_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::json, 'null');
24922492
ERROR: flag array element is not a string
2493-
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all"
2493+
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all".
24942494
select json_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::json, '["all", null]');
24952495
ERROR: flag array element is not a string
2496-
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all"
2496+
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all".
24972497
-- ts_headline for json
24982498
select ts_headline('{"a": "aaa bbb", "b": {"c": "ccc ddd fff", "c1": "ccc1 ddd1"}, "d": ["ggg hhh", "iii jjj"]}'::json, tsquery('bbb & ddd & hhh'));
24992499
ts_headline

src/test/regress/expected/jsonb.out

+3-3
Original file line numberDiff line numberDiff line change
@@ -4277,7 +4277,7 @@ select jsonb_to_tsvector('null'::jsonb, '"all"');
42774277

42784278
select jsonb_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::jsonb, '""');
42794279
ERROR: wrong flag in flag array: ""
4280-
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all"
4280+
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all".
42814281
select jsonb_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::jsonb, '{}');
42824282
ERROR: wrong flag type, only arrays and scalars are allowed
42834283
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"
42884288

42894289
select jsonb_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::jsonb, 'null');
42904290
ERROR: flag array element is not a string
4291-
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all"
4291+
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all".
42924292
select jsonb_to_tsvector('english', '{"a": "aaa in bbb", "b": 123, "c": 456, "d": true, "f": false, "g": null}'::jsonb, '["all", null]');
42934293
ERROR: flag array element is not a string
4294-
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all"
4294+
HINT: Possible values are: "string", "numeric", "boolean", "key", and "all".
42954295
-- ts_headline for jsonb
42964296
select ts_headline('{"a": "aaa bbb", "b": {"c": "ccc ddd fff", "c1": "ccc1 ddd1"}, "d": ["ggg hhh", "iii jjj"]}'::jsonb, tsquery('bbb & ddd & hhh'));
42974297
ts_headline

src/test/regress/expected/plpgsql.out

+8-8
Original file line numberDiff line numberDiff line change
@@ -2778,7 +2778,7 @@ begin
27782778
end$$ language plpgsql;
27792779
select stricttest();
27802780
ERROR: query returned more than one row
2781-
HINT: Make sure the query returns a single row, or use LIMIT 1
2781+
HINT: Make sure the query returns a single row, or use LIMIT 1.
27822782
CONTEXT: PL/pgSQL function stricttest() line 5 at SQL statement
27832783
create or replace function stricttest() returns void as $$
27842784
declare x record;
@@ -2852,7 +2852,7 @@ begin
28522852
end$$ language plpgsql;
28532853
select stricttest();
28542854
ERROR: query returned more than one row
2855-
HINT: Make sure the query returns a single row, or use LIMIT 1
2855+
HINT: Make sure the query returns a single row, or use LIMIT 1.
28562856
CONTEXT: PL/pgSQL function stricttest() line 5 at SQL statement
28572857
create or replace function stricttest() returns void as $$
28582858
declare x record;
@@ -2918,7 +2918,7 @@ end$$ language plpgsql;
29182918
select stricttest();
29192919
ERROR: query returned more than one row
29202920
DETAIL: parameters: p1 = '2', p3 = 'foo'
2921-
HINT: Make sure the query returns a single row, or use LIMIT 1
2921+
HINT: Make sure the query returns a single row, or use LIMIT 1.
29222922
CONTEXT: PL/pgSQL function stricttest() line 8 at SQL statement
29232923
create or replace function stricttest() returns void as $$
29242924
declare x record;
@@ -2929,7 +2929,7 @@ begin
29292929
end$$ language plpgsql;
29302930
select stricttest();
29312931
ERROR: query returned more than one row
2932-
HINT: Make sure the query returns a single row, or use LIMIT 1
2932+
HINT: Make sure the query returns a single row, or use LIMIT 1.
29332933
CONTEXT: PL/pgSQL function stricttest() line 5 at SQL statement
29342934
create or replace function stricttest() returns void as $$
29352935
declare x record;
@@ -2977,7 +2977,7 @@ begin
29772977
end$$ language plpgsql;
29782978
select stricttest();
29792979
ERROR: query returned more than one row
2980-
HINT: Make sure the query returns a single row, or use LIMIT 1
2980+
HINT: Make sure the query returns a single row, or use LIMIT 1.
29812981
CONTEXT: PL/pgSQL function stricttest() line 10 at SQL statement
29822982
reset plpgsql.print_strict_params;
29832983
create or replace function stricttest() returns void as $$
@@ -2995,7 +2995,7 @@ end$$ language plpgsql;
29952995
select stricttest();
29962996
ERROR: query returned more than one row
29972997
DETAIL: parameters: p1 = '2', p3 = 'foo'
2998-
HINT: Make sure the query returns a single row, or use LIMIT 1
2998+
HINT: Make sure the query returns a single row, or use LIMIT 1.
29992999
CONTEXT: PL/pgSQL function stricttest() line 10 at SQL statement
30003000
-- test warnings and errors
30013001
set plpgsql.extra_warnings to 'all';
@@ -3128,7 +3128,7 @@ begin
31283128
end;
31293129
$$;
31303130
WARNING: query returned more than one row
3131-
HINT: Make sure the query returns a single row, or use LIMIT 1
3131+
HINT: Make sure the query returns a single row, or use LIMIT 1.
31323132
set plpgsql.extra_errors to 'too_many_rows';
31333133
do $$
31343134
declare x int;
@@ -3137,7 +3137,7 @@ begin
31373137
end;
31383138
$$;
31393139
ERROR: query returned more than one row
3140-
HINT: Make sure the query returns a single row, or use LIMIT 1
3140+
HINT: Make sure the query returns a single row, or use LIMIT 1.
31413141
CONTEXT: PL/pgSQL function inline_code_block line 4 at SQL statement
31423142
reset plpgsql.extra_errors;
31433143
reset plpgsql.extra_warnings;

src/test/regress/expected/triggers.out

+1-1
Original file line numberDiff line numberDiff line change
@@ -2564,7 +2564,7 @@ create trigger child_row_trig
25642564
-- but now we're not allowed to make it inherit anymore
25652565
alter table child inherit parent;
25662566
ERROR: trigger "child_row_trig" prevents table "child" from becoming an inheritance child
2567-
DETAIL: ROW triggers with transition tables are not supported in inheritance hierarchies
2567+
DETAIL: ROW triggers with transition tables are not supported in inheritance hierarchies.
25682568
-- drop the trigger, and now we're allowed to make it inherit again
25692569
drop trigger child_row_trig on child;
25702570
alter table child inherit parent;

0 commit comments

Comments
 (0)