From bcf63a51e3dbf7cdb70af03ed13e6984dee41ec0 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Sat, 21 May 2011 00:50:35 +0300 Subject: [PATCH] Message style improvements --- src/backend/utils/adt/arrayfuncs.c | 4 ++-- src/pl/plpgsql/src/pl_exec.c | 2 +- src/pl/plpython/plpython.c | 2 +- src/test/regress/expected/arrays.out | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index f5218111db..a8af6f0953 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -4805,7 +4805,7 @@ array_fill_with_lower_bounds(PG_FUNCTION_ARGS) if (PG_ARGISNULL(1) || PG_ARGISNULL(2)) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("dimension array or low bound array cannot be NULL"))); + errmsg("dimension array or low bound array cannot be null"))); dims = PG_GETARG_ARRAYTYPE_P(1); lbs = PG_GETARG_ARRAYTYPE_P(2); @@ -4845,7 +4845,7 @@ array_fill(PG_FUNCTION_ARGS) if (PG_ARGISNULL(1)) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("dimension array or low bound array cannot be NULL"))); + errmsg("dimension array or low bound array cannot be null"))); dims = PG_GETARG_ARRAYTYPE_P(1); diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index 1da5095507..8ca9689efc 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -2060,7 +2060,7 @@ exec_stmt_foreach_a(PLpgSQL_execstate *estate, PLpgSQL_stmt_foreach_a *stmt) if (isnull) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("FOREACH expression must not be NULL"))); + errmsg("FOREACH expression must not be null"))); /* check the type of the expression - must be an array */ if (!OidIsValid(get_element_type(arrtype))) diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c index fe44a1a16a..e81f62542f 100644 --- a/src/pl/plpython/plpython.c +++ b/src/pl/plpython/plpython.c @@ -3937,7 +3937,7 @@ PLy_add_exceptions(PyObject *plpy) excmod = PyModule_Create(&PLy_exc_module); #endif if (PyModule_AddObject(plpy, "spiexceptions", excmod) < 0) - PLy_elog(ERROR, "failed to add the spiexceptions module"); + PLy_elog(ERROR, "could not add the spiexceptions module"); /* * XXX it appears that in some circumstances the reference count of the diff --git a/src/test/regress/expected/arrays.out b/src/test/regress/expected/arrays.out index 7b05ce3354..6e5534995d 100644 --- a/src/test/regress/expected/arrays.out +++ b/src/test/regress/expected/arrays.out @@ -1292,9 +1292,9 @@ select array_fill('juhu'::text, array[3,3]); -- raise exception select array_fill(1, null, array[2,2]); -ERROR: dimension array or low bound array cannot be NULL +ERROR: dimension array or low bound array cannot be null select array_fill(1, array[2,2], null); -ERROR: dimension array or low bound array cannot be NULL +ERROR: dimension array or low bound array cannot be null select array_fill(1, array[3,3], array[1,1,1]); ERROR: wrong number of array subscripts DETAIL: Low bound array has different size than dimensions array.