From d38228fe4029cce3af396bf5b1728d8000ab32c8 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 15 Jul 2014 08:25:27 -0400 Subject: [PATCH] Add missing serial commas Also update one place where the wal_level "logical" was not added to an error message. --- src/backend/access/transam/xlog.c | 4 ++-- src/backend/access/transam/xlogfuncs.c | 2 +- src/backend/postmaster/postmaster.c | 4 ++-- src/backend/utils/adt/json.c | 2 +- src/test/regress/expected/json.out | 6 +++--- src/test/regress/expected/json_1.out | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 9f417dee298..e4f9595ee5f 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -9663,7 +9663,7 @@ do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p, ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("WAL level not sufficient for making an online backup"), - errhint("wal_level must be set to \"archive\", \"hot_standby\" or \"logical\" at server start."))); + errhint("wal_level must be set to \"archive\", \"hot_standby\", or \"logical\" at server start."))); if (strlen(backupidstr) > MAXPGPATH) ereport(ERROR, @@ -9999,7 +9999,7 @@ do_pg_stop_backup(char *labelfile, bool waitforarchive, TimeLineID *stoptli_p) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("WAL level not sufficient for making an online backup"), - errhint("wal_level must be set to \"archive\", \"hot_standby\" or \"logical\" at server start."))); + errhint("wal_level must be set to \"archive\", \"hot_standby\", or \"logical\" at server start."))); /* * OK to update backup counters and forcePageWrites diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c index 8a87581e79c..f186468dd2c 100644 --- a/src/backend/access/transam/xlogfuncs.c +++ b/src/backend/access/transam/xlogfuncs.c @@ -144,7 +144,7 @@ pg_create_restore_point(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), errmsg("WAL level not sufficient for creating a restore point"), - errhint("wal_level must be set to \"archive\" or \"hot_standby\" at server start."))); + errhint("wal_level must be set to \"archive\", \"hot_standby\", or \"logical\" at server start."))); restore_name_str = text_to_cstring(restore_name); diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 5a406e12c24..198c97ecf5d 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -825,10 +825,10 @@ PostmasterMain(int argc, char *argv[]) } if (XLogArchiveMode && wal_level == WAL_LEVEL_MINIMAL) ereport(ERROR, - (errmsg("WAL archival (archive_mode=on) requires wal_level \"archive\", \"hot_standby\" or \"logical\""))); + (errmsg("WAL archival (archive_mode=on) requires wal_level \"archive\", \"hot_standby\", or \"logical\""))); if (max_wal_senders > 0 && wal_level == WAL_LEVEL_MINIMAL) ereport(ERROR, - (errmsg("WAL streaming (max_wal_senders > 0) requires wal_level \"archive\", \"hot_standby\" or \"logical\""))); + (errmsg("WAL streaming (max_wal_senders > 0) requires wal_level \"archive\", \"hot_standby\", or \"logical\""))); /* * Other one-time internal sanity checks can go here, if they are fast. diff --git a/src/backend/utils/adt/json.c b/src/backend/utils/adt/json.c index bc0c602fa3e..299b2a25ddb 100644 --- a/src/backend/utils/adt/json.c +++ b/src/backend/utils/adt/json.c @@ -1347,7 +1347,7 @@ datum_to_json(Datum val, bool is_null, StringInfo result, tcategory == JSONTYPE_CAST)) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("key value must be scalar, not array, composite or json"))); + errmsg("key value must be scalar, not array, composite, or json"))); switch (tcategory) { diff --git a/src/test/regress/expected/json.out b/src/test/regress/expected/json.out index 99036a23ca8..cd6ea5b12d5 100644 --- a/src/test/regress/expected/json.out +++ b/src/test/regress/expected/json.out @@ -1152,11 +1152,11 @@ SELECT json_build_object(1,2); SELECT json_build_object(null,2); ERROR: arg 1: key cannot be null SELECT json_build_object(r,2) FROM (SELECT 1 AS a, 2 AS b) r; -ERROR: key value must be scalar, not array, composite or json +ERROR: key value must be scalar, not array, composite, or json SELECT json_build_object(json '{"a":1,"b":2}', 3); -ERROR: key value must be scalar, not array, composite or json +ERROR: key value must be scalar, not array, composite, or json SELECT json_build_object('{1,2,3}'::int[], 3); -ERROR: key value must be scalar, not array, composite or json +ERROR: key value must be scalar, not array, composite, or json CREATE TEMP TABLE foo (serial_num int, name text, type text); INSERT INTO foo VALUES (847001,'t15','GE1043'); INSERT INTO foo VALUES (847002,'t16','GE1043'); diff --git a/src/test/regress/expected/json_1.out b/src/test/regress/expected/json_1.out index e74aabec8a1..51657a8d70f 100644 --- a/src/test/regress/expected/json_1.out +++ b/src/test/regress/expected/json_1.out @@ -1148,11 +1148,11 @@ SELECT json_build_object(1,2); SELECT json_build_object(null,2); ERROR: arg 1: key cannot be null SELECT json_build_object(r,2) FROM (SELECT 1 AS a, 2 AS b) r; -ERROR: key value must be scalar, not array, composite or json +ERROR: key value must be scalar, not array, composite, or json SELECT json_build_object(json '{"a":1,"b":2}', 3); -ERROR: key value must be scalar, not array, composite or json +ERROR: key value must be scalar, not array, composite, or json SELECT json_build_object('{1,2,3}'::int[], 3); -ERROR: key value must be scalar, not array, composite or json +ERROR: key value must be scalar, not array, composite, or json CREATE TEMP TABLE foo (serial_num int, name text, type text); INSERT INTO foo VALUES (847001,'t15','GE1043'); INSERT INTO foo VALUES (847002,'t16','GE1043');