diff --git a/contrib/cube/cubeparse.y b/contrib/cube/cubeparse.y
index 94ffb260c051f5bd6dc14b0af0d63ef3c4a3550f..470045e90773ff4a09b1f03a3e0428e39c390049 100644
--- a/contrib/cube/cubeparse.y
+++ b/contrib/cube/cubeparse.y
@@ -44,7 +44,7 @@ box:
           ereport(ERROR,
                   (errcode(ERRCODE_SYNTAX_ERROR),
                    errmsg("bad cube representation"),
-                   errdetail("different point dimensions in (%s) and (%s)",
+                   errdetail("Different point dimensions in (%s) and (%s).",
                              $2, $4)));
 	      YYABORT;
 	    }
@@ -52,8 +52,8 @@ box:
               ereport(ERROR,
                       (errcode(ERRCODE_SYNTAX_ERROR),
                        errmsg("bad cube representation"),
-                       errdetail("more than %d dimensions",
-                                 CUBE_MAX_DIM)));
+                       errdetail("A cube cannot have more than %d dimensions.",
+								 CUBE_MAX_DIM)));
               YYABORT;
             }
 	    
@@ -70,7 +70,7 @@ box:
           ereport(ERROR,
                   (errcode(ERRCODE_SYNTAX_ERROR),
                    errmsg("bad cube representation"),
-                   errdetail("different point dimensions in (%s) and (%s)",
+                   errdetail("Different point dimensions in (%s) and (%s).",
                              $1, $3)));
 	      YYABORT;
 	    }
@@ -78,7 +78,7 @@ box:
               ereport(ERROR,
                       (errcode(ERRCODE_SYNTAX_ERROR),
                        errmsg("bad cube representation"),
-                       errdetail("more than %d dimensions",
+                       errdetail("A cube cannot have more than %d dimensions.",
                                  CUBE_MAX_DIM)));
               YYABORT;
             }
@@ -95,7 +95,7 @@ box:
               ereport(ERROR,
                       (errcode(ERRCODE_SYNTAX_ERROR),
                        errmsg("bad cube representation"),
-                       errdetail("more than %d dimensions",
+                       errdetail("A cube cannot have more than %d dimensions.",
                                  CUBE_MAX_DIM)));
               YYABORT;
             }
@@ -113,7 +113,7 @@ box:
               ereport(ERROR,
                       (errcode(ERRCODE_SYNTAX_ERROR),
                        errmsg("bad cube representation"),
-                       errdetail("more than %d dimensions",
+                       errdetail("A cube cannot have more than %d dimensions.",
                                  CUBE_MAX_DIM)));
               YYABORT;
             }
@@ -187,7 +187,8 @@ write_box(unsigned int dim, char *str1, char *str2)
 }
 
 
-static NDBOX * write_point_as_box(char *str, int dim)
+static NDBOX *
+write_point_as_box(char *str, int dim)
 {
   NDBOX * bp;
   int i, size;
diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c
index 8f6dab69fe14436a13d00cd1e812101d33ff8db7..246d56698736773d39cada3e0045563cfed0f9a2 100644
--- a/contrib/intarray/_int_gist.c
+++ b/contrib/intarray/_int_gist.c
@@ -144,7 +144,7 @@ g_int_compress(PG_FUNCTION_ARGS)
 		PREPAREARR(r);
 
 		if (ARRNELEMS(r) >= 2 * MAXNUMRANGE)
-			elog(NOTICE, "Input array is too big (%d maximum allowed, %d current), use gist__intbig_ops opclass instead",
+			elog(NOTICE, "input array is too big (%d maximum allowed, %d current), use gist__intbig_ops opclass instead",
 				 2 * MAXNUMRANGE - 1, ARRNELEMS(r));
 
 		retval = palloc(sizeof(GISTENTRY));
diff --git a/contrib/isbn_issn/isbn_issn.c b/contrib/isbn_issn/isbn_issn.c
index 1e5ba3d73e450df6db6317a86d1255dddcf3a0f9..ed8707e05ff4d3a785f6969fc7fa629f7642a812 100644
--- a/contrib/isbn_issn/isbn_issn.c
+++ b/contrib/isbn_issn/isbn_issn.c
@@ -1,7 +1,7 @@
 /*
  *	PostgreSQL type definitions for ISBNs.
  *
- *	$PostgreSQL: pgsql/contrib/isbn_issn/isbn_issn.c,v 1.7 2003/11/29 22:39:20 pgsql Exp $
+ *	$PostgreSQL: pgsql/contrib/isbn_issn/isbn_issn.c,v 1.8 2006/03/01 06:30:31 neilc Exp $
  */
 
 #include "postgres.h"
@@ -45,28 +45,23 @@ isbn *
 isbn_in(char *str)
 {
 	isbn	   *result;
+	int			len;
 
-	if (strlen(str) != 13)
-	{
+	len = strlen(str);
+	if (len != 13)
 		ereport(ERROR,
 				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
 				 errmsg("invalid ISBN: \"%s\"", str),
-				 errdetail("incorrect length")));
+				 errdetail("ISBNs must be 13 characters in length.")));
 
-		return (NULL);
-	}
 	if (isbn_sum(str) != 0)
-	{
 		ereport(ERROR,
 				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
 				 errmsg("invalid ISBN: \"%s\"", str),
-				 errdetail("failed checksum")));
-		return (NULL);
-	}
+				 errdetail("ISBN failed checksum.")));
 
 	result = (isbn *) palloc(sizeof(isbn));
-
-	strncpy(result->num, str, 13);
+	memcpy(result->num, str, len);
 	memset(result->pad, ' ', 3);
 	return (result);
 }
@@ -239,28 +234,23 @@ issn *
 issn_in(char *str)
 {
 	issn	   *result;
+	int			len;
 
-	if (strlen(str) != 9)
-	{
+	len = strlen(str);
+	if (len != 9)
 		ereport(ERROR,
 				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
 				 errmsg("invalid ISSN: \"%s\"", str),
-				 errdetail("incorrect length")));
+				 errdetail("ISSNs must be 9 characters in length.")));
 
-		return (NULL);
-	}
 	if (issn_sum(str) != 0)
-	{
 		ereport(ERROR,
 				(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
 				 errmsg("invalid ISSN: \"%s\"", str),
-				 errdetail("failed checksum")));
-		return (NULL);
-	}
+				 errdetail("ISSN failed checksum.")));
 
 	result = (issn *) palloc(sizeof(issn));
-
-	strncpy(result->num, str, 9);
+	memcpy(result->num, str, len);
 	memset(result->pad, ' ', 7);
 	return (result);
 }
diff --git a/contrib/ltree/lquery_op.c b/contrib/ltree/lquery_op.c
index 6d5a937bebba152587a75f368c2a1894c9a51a21..9d43b6444d452378ea2693e0bbe1fd9a16df137c 100644
--- a/contrib/ltree/lquery_op.c
+++ b/contrib/ltree/lquery_op.c
@@ -26,7 +26,7 @@ typedef struct
 }	FieldNot;
 
 static char *
-getlexem(char *start, char *end, int *len)
+getlexeme(char *start, char *end, int *len)
 {
 	char	   *ptr;
 
@@ -45,7 +45,7 @@ getlexem(char *start, char *end, int *len)
 }
 
 bool
-			compare_subnode(ltree_level * t, char *qn, int len, int (*cmpptr) (const char *, const char *, size_t), bool anyend)
+compare_subnode(ltree_level * t, char *qn, int len, int (*cmpptr) (const char *, const char *, size_t), bool anyend)
 {
 	char	   *endt = t->name + t->len;
 	char	   *endq = qn + len;
@@ -54,11 +54,11 @@ bool
 				lenq;
 	bool		isok;
 
-	while ((qn = getlexem(qn, endq, &lenq)) != NULL)
+	while ((qn = getlexeme(qn, endq, &lenq)) != NULL)
 	{
 		tn = t->name;
 		isok = false;
-		while ((tn = getlexem(tn, endt, &lent)) != NULL)
+		while ((tn = getlexeme(tn, endt, &lent)) != NULL)
 		{
 			if (
 				(
@@ -93,7 +93,7 @@ checkLevel(lquery_level * curq, ltree_level * curt)
 	{
 		cmpptr = (curvar->flag & LVAR_INCASE) ? pg_strncasecmp : strncmp;
 
-		if (curvar->flag & LVAR_SUBLEXEM)
+		if (curvar->flag & LVAR_SUBLEXEME)
 		{
 			if (compare_subnode(curt, curvar->name, curvar->len, cmpptr, (curvar->flag & LVAR_ANYEND)))
 				return true;
diff --git a/contrib/ltree/ltree.h b/contrib/ltree/ltree.h
index 8f9ba4074ffa212452dbfed42e778f92454e2ddf..3281afefa16faf05990f0cb92a6b8516a0b41aca 100644
--- a/contrib/ltree/ltree.h
+++ b/contrib/ltree/ltree.h
@@ -40,7 +40,7 @@ typedef struct
 
 #define LVAR_ANYEND 0x01
 #define LVAR_INCASE 0x02
-#define LVAR_SUBLEXEM	0x04
+#define LVAR_SUBLEXEME	0x04
 
 typedef struct
 {
@@ -58,9 +58,9 @@ typedef struct
 
 #define LQL_NOT		0x10
 #ifdef LOWER_NODE
-#define FLG_CANLOOKSIGN(x) ( ( (x) & ( LQL_NOT | LVAR_ANYEND | LVAR_SUBLEXEM ) ) == 0 )
+#define FLG_CANLOOKSIGN(x) ( ( (x) & ( LQL_NOT | LVAR_ANYEND | LVAR_SUBLEXEME ) ) == 0 )
 #else
-#define FLG_CANLOOKSIGN(x) ( ( (x) & ( LQL_NOT | LVAR_ANYEND | LVAR_SUBLEXEM | LVAR_INCASE ) ) == 0 )
+#define FLG_CANLOOKSIGN(x) ( ( (x) & ( LQL_NOT | LVAR_ANYEND | LVAR_SUBLEXEME | LVAR_INCASE ) ) == 0 )
 #endif
 #define LQL_CANLOOKSIGN(x) FLG_CANLOOKSIGN( ((lquery_level*)(x))->flag )
 
diff --git a/contrib/ltree/ltree_io.c b/contrib/ltree/ltree_io.c
index ccc6fc8ff71576f6e9382afb8be6fad014ebf201..a44a5a71ddb42253b65f50ae085acfc6512f7871 100644
--- a/contrib/ltree/ltree_io.c
+++ b/contrib/ltree/ltree_io.c
@@ -80,8 +80,8 @@ ltree_in(PG_FUNCTION_ARGS)
 					ereport(ERROR,
 							(errcode(ERRCODE_NAME_TOO_LONG),
 							 errmsg("name of level is too long"),
-							 errdetail("name length is %d, must " \
-									   "be < 256, in position %d",
+							 errdetail("Name length is %d, must "
+									   "be < 256, in position %d.",
 									 lptr->len, (int) (lptr->start - buf))));
 
 				totallen += MAXALIGN(lptr->len + LEVEL_HDRSIZE);
@@ -104,8 +104,8 @@ ltree_in(PG_FUNCTION_ARGS)
 			ereport(ERROR,
 					(errcode(ERRCODE_NAME_TOO_LONG),
 					 errmsg("name of level is too long"),
-					 errdetail("name length is %d, must " \
-							   "be < 256, in position %d",
+					 errdetail("Name length is %d, must "
+							   "be < 256, in position %d.",
 							   lptr->len, (int) (lptr->start - buf))));
 
 		totallen += MAXALIGN(lptr->len + LEVEL_HDRSIZE);
@@ -269,21 +269,21 @@ lquery_in(PG_FUNCTION_ARGS)
 			{
 				if (lptr->start == ptr)
 					UNCHAR;
-				lptr->flag |= LVAR_SUBLEXEM;
-				curqlevel->flag |= LVAR_SUBLEXEM;
+				lptr->flag |= LVAR_SUBLEXEME;
+				curqlevel->flag |= LVAR_SUBLEXEME;
 			}
 			else if (*ptr == '|')
 			{
 				lptr->len = ptr - lptr->start -
-					((lptr->flag & LVAR_SUBLEXEM) ? 1 : 0) -
+					((lptr->flag & LVAR_SUBLEXEME) ? 1 : 0) -
 					((lptr->flag & LVAR_INCASE) ? 1 : 0) -
 					((lptr->flag & LVAR_ANYEND) ? 1 : 0);
 				if (lptr->len > 255)
 					ereport(ERROR,
 							(errcode(ERRCODE_NAME_TOO_LONG),
 							 errmsg("name of level is too long"),
-							 errdetail("name length is %d, must " \
-									   "be < 256, in position %d",
+							 errdetail("Name length is %d, must "
+									   "be < 256, in position %d.",
 									 lptr->len, (int) (lptr->start - buf))));
 
 				state = LQPRS_WAITVAR;
@@ -291,15 +291,15 @@ lquery_in(PG_FUNCTION_ARGS)
 			else if (*ptr == '.')
 			{
 				lptr->len = ptr - lptr->start -
-					((lptr->flag & LVAR_SUBLEXEM) ? 1 : 0) -
+					((lptr->flag & LVAR_SUBLEXEME) ? 1 : 0) -
 					((lptr->flag & LVAR_INCASE) ? 1 : 0) -
 					((lptr->flag & LVAR_ANYEND) ? 1 : 0);
 				if (lptr->len > 255)
 					ereport(ERROR,
 							(errcode(ERRCODE_NAME_TOO_LONG),
 							 errmsg("name of level is too long"),
-							 errdetail("name length is %d, must " \
-									   "be < 256, in position %d",
+							 errdetail("Name length is %d, must "
+									   "be < 256, in position %d.",
 									 lptr->len, (int) (lptr->start - buf))));
 
 				state = LQPRS_WAITLEVEL;
@@ -398,7 +398,7 @@ lquery_in(PG_FUNCTION_ARGS)
 					 errdetail("Unexpected end of line.")));
 
 		lptr->len = ptr - lptr->start -
-			((lptr->flag & LVAR_SUBLEXEM) ? 1 : 0) -
+			((lptr->flag & LVAR_SUBLEXEME) ? 1 : 0) -
 			((lptr->flag & LVAR_INCASE) ? 1 : 0) -
 			((lptr->flag & LVAR_ANYEND) ? 1 : 0);
 		if (lptr->len == 0)
@@ -411,8 +411,8 @@ lquery_in(PG_FUNCTION_ARGS)
 			ereport(ERROR,
 					(errcode(ERRCODE_NAME_TOO_LONG),
 					 errmsg("name of level is too long"),
-					 errdetail("name length is %d, must " \
-							   "be < 256, in position %d",
+					 errdetail("Name length is %d, must "
+							   "be < 256, in position %d.",
 							   lptr->len, (int) (lptr->start - buf))));
 	}
 	else if (state == LQPRS_WAITOPEN)
@@ -539,7 +539,7 @@ lquery_out(PG_FUNCTION_ARGS)
 				}
 				memcpy(ptr, curtlevel->name, curtlevel->len);
 				ptr += curtlevel->len;
-				if ((curtlevel->flag & LVAR_SUBLEXEM))
+				if ((curtlevel->flag & LVAR_SUBLEXEME))
 				{
 					*ptr = '%';
 					ptr++;
diff --git a/contrib/ltree/ltxtquery_io.c b/contrib/ltree/ltxtquery_io.c
index 1f72e7197021a9e97c628e927a1fb8464afadfdc..1a7117c15ff562d55596d270a1b36007452580e2 100644
--- a/contrib/ltree/ltxtquery_io.c
+++ b/contrib/ltree/ltxtquery_io.c
@@ -95,7 +95,7 @@ gettoken_query(QPRS_STATE * state, int4 *val, int4 *lenval, char **strval, uint1
 					(*lenval)++;
 				}
 				else if (*(state->buf) == '%')
-					*flag |= LVAR_SUBLEXEM;
+					*flag |= LVAR_SUBLEXEME;
 				else if (*(state->buf) == '@')
 					*flag |= LVAR_INCASE;
 				else if (*(state->buf) == '*')
@@ -412,7 +412,7 @@ infix(INFIX * in, bool first)
 			op++;
 			in->cur++;
 		}
-		if (in->curpol->flag & LVAR_SUBLEXEM)
+		if (in->curpol->flag & LVAR_SUBLEXEME)
 		{
 			*(in->cur) = '%';
 			in->cur++;
diff --git a/contrib/ltree/ltxtquery_op.c b/contrib/ltree/ltxtquery_op.c
index 1bba66954b5bb20da5863cbd9f5d347b57cde73b..34e711eacad1cfb80d3674187ca9a94dc4f83112 100644
--- a/contrib/ltree/ltxtquery_op.c
+++ b/contrib/ltree/ltxtquery_op.c
@@ -57,7 +57,7 @@ checkcondition_str(void *checkval, ITEM * val)
 	cmpptr = (val->flag & LVAR_INCASE) ? pg_strncasecmp : strncmp;
 	while (tlen > 0)
 	{
-		if (val->flag & LVAR_SUBLEXEM)
+		if (val->flag & LVAR_SUBLEXEME)
 		{
 			if (compare_subnode(level, op, val->length, cmpptr, (val->flag & LVAR_ANYEND)))
 				return true;
diff --git a/contrib/pg_trgm/trgm_gist.c b/contrib/pg_trgm/trgm_gist.c
index e7c21a435b3820a8708817e0b26ecd7e32232f63..4c33a45a22921bce095bbc067dbe252b7c2336f6 100644
--- a/contrib/pg_trgm/trgm_gist.c
+++ b/contrib/pg_trgm/trgm_gist.c
@@ -60,14 +60,14 @@ static const uint8 number_of_ones[256] = {
 Datum
 gtrgm_in(PG_FUNCTION_ARGS)
 {
-	elog(ERROR, "Not implemented");
+	elog(ERROR, "not implemented");
 	PG_RETURN_DATUM(0);
 }
 
 Datum
 gtrgm_out(PG_FUNCTION_ARGS)
 {
-	elog(ERROR, "Not implemented");
+	elog(ERROR, "not implemented");
 	PG_RETURN_DATUM(0);
 }
 
diff --git a/contrib/pg_trgm/trgm_op.c b/contrib/pg_trgm/trgm_op.c
index 407b317f28c7522b8a126e55e3778dc84c23585b..b7043c1b8c86f095c526ca12de6834a3667dd3b5 100644
--- a/contrib/pg_trgm/trgm_op.c
+++ b/contrib/pg_trgm/trgm_op.c
@@ -13,7 +13,7 @@ set_limit(PG_FUNCTION_ARGS)
 	float4		nlimit = PG_GETARG_FLOAT4(0);
 
 	if (nlimit < 0 || nlimit > 1.0)
-		elog(ERROR, "Wrong limit, should be between 0 and 1");
+		elog(ERROR, "wrong limit, should be between 0 and 1");
 	trgm_limit = nlimit;
 	PG_RETURN_FLOAT4(trgm_limit);
 }
diff --git a/contrib/tablefunc/tablefunc.c b/contrib/tablefunc/tablefunc.c
index 0d8a17ea619e4825a28dae4484543fe96e912262..0beb44f584570f2ad9dec2bed9efeb3d0dca80d4 100644
--- a/contrib/tablefunc/tablefunc.c
+++ b/contrib/tablefunc/tablefunc.c
@@ -894,9 +894,9 @@ get_crosstab_tuplestore(char *sql,
 			ereport(ERROR,
 					(errcode(ERRCODE_SYNTAX_ERROR),
 					 errmsg("invalid return type"),
-					 errdetail("query-specified return " \
+					 errdetail("Query-specified return " \
 							   "tuple has %d columns but crosstab " \
-							   "returns %d", tupdesc->natts, result_ncols)));
+							   "returns %d.", tupdesc->natts, result_ncols)));
 
 		/* allocate space */
 		values = (char **) palloc(result_ncols * sizeof(char *));
@@ -1531,12 +1531,12 @@ validateConnectbyTupleDesc(TupleDesc tupdesc, bool show_branch, bool show_serial
 
 	/* check that the type of the fifth column is INT4 */
 	if (show_branch && show_serial && tupdesc->attrs[4]->atttypid != INT4OID)
-		elog(ERROR, "Query-specified return tuple not valid for Connectby: "
+		elog(ERROR, "query-specified return tuple not valid for Connectby: "
 			 "fifth column must be type %s", format_type_be(INT4OID));
 
 	/* check that the type of the fifth column is INT4 */
 	if (!show_branch && show_serial && tupdesc->attrs[3]->atttypid != INT4OID)
-		elog(ERROR, "Query-specified return tuple not valid for Connectby: "
+		elog(ERROR, "query-specified return tuple not valid for Connectby: "
 			 "fourth column must be type %s", format_type_be(INT4OID));
 
 	/* OK, the tupdesc is valid for our purposes */
diff --git a/contrib/tsearch2/docs/tsearch-V2-intro.html b/contrib/tsearch2/docs/tsearch-V2-intro.html
index fb36f2c28a79dfcf99ce1e7e6025606b74e6a60c..b9cb80574e3cb31928656721f48311929651c1cf 100644
--- a/contrib/tsearch2/docs/tsearch-V2-intro.html
+++ b/contrib/tsearch2/docs/tsearch-V2-intro.html
@@ -322,7 +322,7 @@ result, and a NOTICE like this:</p>
 <pre>
         SELECT to_tsquery('default', 'a|is&amp;not|!the');
         NOTICE:  Query contains only stopword(s)
-                 or doesn't contain lexem(s), ignored
+                 or doesn't contain lexeme(s), ignored
          to_tsquery
         -----------
         (1 row)
@@ -730,7 +730,7 @@ the ISpell sources, and you can use them to integrate into
 tsearch2. This is not complicated, but is not very obvious to begin
 with. The tsearch2 ISpell interface needs only the listing of
 dictionary words, it will parse and load those words, and use the
-ISpell dictionary for lexem processing.</p>
+ISpell dictionary for lexeme processing.</p>
 
 <p>I found the ISPell make system to be very finicky. Their
 documentation actually states this to be the case. So I just did
@@ -769,7 +769,7 @@ to the stored procedures from the row where the dict_name =
                 WHERE dict_name = 'ispell_template');
 </pre>
 <p>Now that we have a dictionary we can specify it's use in a query
-to get a lexem. For this we will use the lexize function. The
+to get a lexeme. For this we will use the lexize function. The
 lexize function takes the name of the dictionary to use as an
 argument. Just as the other tsearch2 functions operate. You will
 need to stop your psql session and start it again in order for this
@@ -788,8 +788,8 @@ dictionary.</p>
 <pre>
   SELECT set_curdict('en_ispell');
 </pre>
-<p>Lexize is meant to turn a word into a lexem. It is possible to
-receive more than one lexem returned for a single word.</p>
+<p>Lexize is meant to turn a word into a lexeme. It is possible to
+receive more than one lexeme returned for a single word.</p>
 <pre>
  SELECT lexize('en_ispell', 'conditionally');
            lexize
@@ -798,7 +798,7 @@ receive more than one lexem returned for a single word.</p>
         (1 row)
 </pre>
 <p>The lexize function is not meant to take a full string as an
-argument to return lexems for. If you passed in an entire sentence,
+argument to return lexemes for. If you passed in an entire sentence,
 it attempts to find that entire sentence in the dictionary. Since
 the dictionary contains only words, you will receive an empty
 result set back.</p>
@@ -809,7 +809,7 @@ result set back.</p>
         
         (1 row)
         
-If you parse a lexem from a word not in the dictionary, then you will receive an empty result. This makes sense because the word "tsearch" is not in the english dictionary. You can create your own additions to the dictionary if you like. This may be useful for scientific or technical glossaries that need to be indexed. SELECT lexize('en_ispell', 'tsearch'); lexize -------- (1 row)
+If you parse a lexeme from a word not in the dictionary, then you will receive an empty result. This makes sense because the word "tsearch" is not in the english dictionary. You can create your own additions to the dictionary if you like. This may be useful for scientific or technical glossaries that need to be indexed. SELECT lexize('en_ispell', 'tsearch'); lexize -------- (1 row)
 
 </pre>
 <p>This is not to say that tsearch will be ignored when adding text
@@ -830,11 +830,11 @@ concerned with forcing the use of the ISpell dictionary.</p>
                VALUES ('default_english', 'lword', '{en_ispell,en_stem}');
 </pre>
 <p>We have just inserted 3 records to the configuration mapping,
-specifying that the lexem types for "lhword, lpart_hword and lword"
+specifying that the lexeme types for "lhword, lpart_hword and lword"
 are to be stemmed using the 'en_ispell' dictionary we added into
 pg_ts_dict, when using the configuration ' default_english' which
 we added to pg_ts_cfg.</p>
-<p>There are several other lexem types used that we do not need to
+<p>There are several other lexeme types used that we do not need to
 specify as using the ISpell dictionary. We can simply insert values
 using the 'simple' stemming process dictionary.</p>
 <pre>
@@ -889,10 +889,10 @@ configuration to be our default for en_US locale.</p>
         (1 row)
 </pre>
 <p>Notice here that words like "tsearch" are still parsed and
-indexed in the tsvector column. There is a lexem returned for the
+indexed in the tsvector column. There is a lexeme returned for the
 word becuase in the configuration mapping table, we specify words
 to be used from the 'en_ispell' dictionary first, but as a fallback
-to use the 'en_stem' dictionary. Therefore a lexem is not returned
+to use the 'en_stem' dictionary. Therefore a lexeme is not returned
 from en_ispell, but is returned from en_stem, and added to the
 tsvector.</p>
 <pre>
@@ -905,7 +905,7 @@ tsvector.</p>
 <p>Notice in this last example I added the word "computer" to the
 text to be converted into a tsvector. Because we have setup our
 default configuration to use the ISpell english dictionary, the
-words are lexized, and computer returns 2 lexems at the same
+words are lexized, and computer returns 2 lexemes at the same
 position. 'compute':7 and 'computer':7 are now both indexed for the
 word computer.</p>
 <p>You can create additional dictionary lists, or use the extra
diff --git a/contrib/tsearch2/docs/tsearch2-guide.html b/contrib/tsearch2/docs/tsearch2-guide.html
index 2529480a53a310257b6806de01a0e8627e118ad1..5540e5d323c6632f69369282814ba8e042769caf 100644
--- a/contrib/tsearch2/docs/tsearch2-guide.html
+++ b/contrib/tsearch2/docs/tsearch2-guide.html
@@ -251,7 +251,7 @@ and give you an error to prevent this mistake:
 
 <pre>
 =# <b>SELECT to_tsquery('the')</b>
-NOTICE:  Query contains only stopword(s) or doesn't contain lexem(s), ignored
+NOTICE:  Query contains only stopword(s) or doesn't contain lexeme(s), ignored
  to_tsquery 
 ------------
  
diff --git a/contrib/tsearch2/ispell/spell.c b/contrib/tsearch2/ispell/spell.c
index 1960f9510bde52efe9ba479f62ba93cac254bcd5..223ae4a9ada90fc4e90ef23122b6caf12eac6644 100644
--- a/contrib/tsearch2/ispell/spell.c
+++ b/contrib/tsearch2/ispell/spell.c
@@ -869,7 +869,7 @@ CheckAffix(const char *word, size_t len, AFFIX * Affix, char flagflags, char *ne
 				char		regerrstr[ERRSTRSIZE];
 
 				pg_regerror(err, &(Affix->reg.regex), regerrstr, ERRSTRSIZE);
-				elog(ERROR, "Regex error in '%s': %s", Affix->mask, regerrstr);
+				elog(ERROR, "regex error in '%s': %s", Affix->mask, regerrstr);
 			}
 			Affix->compile = 0;
 		}
diff --git a/contrib/tsearch2/prs_dcfg.c b/contrib/tsearch2/prs_dcfg.c
index c54ca11803c0bfd1ba602be15eba3176d517bf87..42fd6712e6d835b9a96a2ef434857407fd6a8670 100644
--- a/contrib/tsearch2/prs_dcfg.c
+++ b/contrib/tsearch2/prs_dcfg.c
@@ -74,7 +74,7 @@ parse_cfgdict(text *in, Map ** m)
 				ereport(ERROR,
 						(errcode(ERRCODE_SYNTAX_ERROR),
 						 errmsg("syntax error"),
-						 errdetail("Syntax error in position %d",
+						 errdetail("Syntax error in position %d.",
 								   (int) (ptr - VARDATA(in)))));
 		}
 		else if (state == CS_INKEY)
@@ -93,7 +93,7 @@ parse_cfgdict(text *in, Map ** m)
 				ereport(ERROR,
 						(errcode(ERRCODE_SYNTAX_ERROR),
 						 errmsg("syntax error"),
-						 errdetail("Syntax error in position %d",
+						 errdetail("Syntax error in position %d.",
 								   (int) (ptr - VARDATA(in)))));
 		}
 		else if (state == CS_WAITEQ)
@@ -104,7 +104,7 @@ parse_cfgdict(text *in, Map ** m)
 				ereport(ERROR,
 						(errcode(ERRCODE_SYNTAX_ERROR),
 						 errmsg("syntax error"),
-						 errdetail("Syntax error in position %d",
+						 errdetail("Syntax error in position %d.",
 								   (int) (ptr - VARDATA(in)))));
 		}
 		else if (state == CS_WAITVALUE)
@@ -150,7 +150,7 @@ parse_cfgdict(text *in, Map ** m)
 				ereport(ERROR,
 						(errcode(ERRCODE_SYNTAX_ERROR),
 						 errmsg("syntax error"),
-						 errdetail("Syntax error in position %d",
+						 errdetail("Syntax error in position %d.",
 								   (int) (ptr - VARDATA(in)))));
 		}
 		else if (state == CS_INESC)
@@ -161,7 +161,7 @@ parse_cfgdict(text *in, Map ** m)
 			ereport(ERROR,
 					(errcode(ERRCODE_SYNTAX_ERROR),
 					 errmsg("bad parser state"),
-					 errdetail("%d at position %d",
+					 errdetail("%d at position %d.",
 							   state, (int) (ptr - VARDATA(in)))));
 		ptr+=pg_mblen(ptr);
 	}
diff --git a/contrib/tsearch2/query.c b/contrib/tsearch2/query.c
index e6285fd9d2ec4b3e8d41b6352c5242ddacc9fc91..9be5f451fa8658e6dc92e8be029a0bd24915f492 100644
--- a/contrib/tsearch2/query.c
+++ b/contrib/tsearch2/query.c
@@ -643,7 +643,7 @@ static QUERYTYPE *
 	pfree(state.valstate.word);
 	if (!state.num)
 	{
-		elog(NOTICE, "Query doesn't contain lexem(s)");
+		elog(NOTICE, "query doesn't contain lexeme(s)");
 		query = (QUERYTYPE *) palloc(HDRSIZEQT);
 		query->len = HDRSIZEQT;
 		query->size = 0;
diff --git a/contrib/tsearch2/query_cleanup.c b/contrib/tsearch2/query_cleanup.c
index f56f7fbea3e4ee49dfe94177570b5e76a819d406..08d3ff219b5125094438b7596239e838f21a5415 100644
--- a/contrib/tsearch2/query_cleanup.c
+++ b/contrib/tsearch2/query_cleanup.c
@@ -246,7 +246,7 @@ clean_fakeval_v2(ITEM * ptr, int4 *len)
 	resroot = clean_fakeval_intree(root, &result);
 	if (result != V_UNKNOWN)
 	{
-		elog(NOTICE, "Query contains only stopword(s) or doesn't contain lexem(s), ignored");
+		elog(NOTICE, "query contains only stopword(s) or doesn't contain lexeme(s), ignored");
 		*len = 0;
 		return NULL;
 	}
diff --git a/contrib/tsearch2/query_gist.c b/contrib/tsearch2/query_gist.c
index b3a5b50111624da29c3d820a50fd3b87e3e5eaac..5941be3a55b23cc9c8c94a841b37035ffa607e83 100644
--- a/contrib/tsearch2/query_gist.c
+++ b/contrib/tsearch2/query_gist.c
@@ -138,14 +138,14 @@ Datum		gtsq_picksplit(PG_FUNCTION_ARGS);
 Datum
 gtsq_in(PG_FUNCTION_ARGS)
 {
-	elog(ERROR, "Not implemented");
+	elog(ERROR, "not implemented");
 	PG_RETURN_DATUM(0);
 }
 
 Datum
 gtsq_out(PG_FUNCTION_ARGS)
 {
-	elog(ERROR, "Not implemented");
+	elog(ERROR, "not implemented");
 	PG_RETURN_DATUM(0);
 }
 
diff --git a/contrib/tsearch2/query_rewrite.c b/contrib/tsearch2/query_rewrite.c
index f1faaf87786ed7d9353e56367f3850c7224ce6e1..1c3121aa8506ec9c9121d854787c80992adc7701 100644
--- a/contrib/tsearch2/query_rewrite.c
+++ b/contrib/tsearch2/query_rewrite.c
@@ -220,7 +220,7 @@ get_tsq_Oid(void)
 
 	if (SPI_processed < 0)
 		/* internal error */
-		elog(ERROR, "There is no tsvector type");
+		elog(ERROR, "there is no tsvector type");
 	tsqOid = DatumGetObjectId(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull));
 	if (tsqOid == InvalidOid)
 		/* internal error */
diff --git a/contrib/tsearch2/ts_cfg.c b/contrib/tsearch2/ts_cfg.c
index 50a355e464a1b49c4933e33b5db219aff30f7237..3bc39a87378701410272bdd45fe1fb8b1f0d7640 100644
--- a/contrib/tsearch2/ts_cfg.c
+++ b/contrib/tsearch2/ts_cfg.c
@@ -318,7 +318,7 @@ parsetext_v2(TSCfgInfo * cfg, PRSTEXT * prs, char *buf, int4 buflen)
 #endif
 		}
 
-		if (type >= cfg->len)	/* skip this type of lexem */
+		if (type >= cfg->len)	/* skip this type of lexeme */
 			continue;
 
 		for (i = 0; i < cfg->map[type].len; i++)
@@ -335,7 +335,7 @@ parsetext_v2(TSCfgInfo * cfg, PRSTEXT * prs, char *buf, int4 buflen)
 													 PointerGetDatum(lenlemm)
 																	 )
 				);
-			if (!norms)			/* dictionary doesn't know this lexem */
+			if (!norms)			/* dictionary doesn't know this lexeme */
 				continue;
 
 			prs->pos++;			/* set pos */
@@ -357,7 +357,7 @@ parsetext_v2(TSCfgInfo * cfg, PRSTEXT * prs, char *buf, int4 buflen)
 				prs->curwords++;
 			}
 			pfree(norms);
-			break;				/* lexem already normalized or is stop word */
+			break;				/* lexeme already normalized or is stop word */
 		}
 	}
 
@@ -472,7 +472,7 @@ hlparsetext(TSCfgInfo * cfg, HLPRSTEXT * prs, QUERYTYPE * query, char *buf, int4
 													 PointerGetDatum(lenlemm)
 																	 )
 				);
-			if (!norms)			/* dictionary doesn't know this lexem */
+			if (!norms)			/* dictionary doesn't know this lexeme */
 				continue;
 
 			while (ptr->lexeme)
@@ -482,7 +482,7 @@ hlparsetext(TSCfgInfo * cfg, HLPRSTEXT * prs, QUERYTYPE * query, char *buf, int4
 				ptr++;
 			}
 			pfree(norms);
-			break;				/* lexem already normalized or is stop word */
+			break;				/* lexeme already normalized or is stop word */
 		}
 	}
 
diff --git a/contrib/tsearch2/ts_stat.c b/contrib/tsearch2/ts_stat.c
index ae9575b35322a1c4ebfbbfa67101f7c8b56a4efe..3a90fe5a192db9f8241bdd18655e4ab3f6348e12 100644
--- a/contrib/tsearch2/ts_stat.c
+++ b/contrib/tsearch2/ts_stat.c
@@ -426,7 +426,7 @@ get_ti_Oid(void)
 
 	if (SPI_processed < 1)
 		/* internal error */
-		elog(ERROR, "There is no tsvector type");
+		elog(ERROR, "there is no tsvector type");
 	tiOid = DatumGetObjectId(SPI_getbinval(SPI_tuptable->vals[0], SPI_tuptable->tupdesc, 1, &isnull));
 	if (tiOid == InvalidOid)
 		/* internal error */
diff --git a/contrib/tsearch2/tsvector.c b/contrib/tsearch2/tsvector.c
index dd895ff38ab0eb6a420edfa40d05302c530b8cba..0f369bdcb7e88b56b883d1355e4ba78d03030f79 100644
--- a/contrib/tsearch2/tsvector.c
+++ b/contrib/tsearch2/tsvector.c
@@ -1,7 +1,7 @@
 /*
  * In/Out definitions for tsvector type
  * Internal structure:
- * string of values, array of position lexem in string and it's length
+ * string of values, array of position lexeme in string and it's length
  * Teodor Sigaev <teodor@sigaev.ru>
  */
 #include "postgres.h"
diff --git a/contrib/tsearch2/wparser.c b/contrib/tsearch2/wparser.c
index 725020e23decdece36f745a751c6caf04cc51453..eb9908173017d30ec1e81ce8acb4f15ccd405ca8 100644
--- a/contrib/tsearch2/wparser.c
+++ b/contrib/tsearch2/wparser.c
@@ -342,14 +342,14 @@ set_curprs_byname(PG_FUNCTION_ARGS)
 typedef struct
 {
 	int			type;
-	char	   *lexem;
-}	LexemEntry;
+	char	   *lexeme;
+}	LexemeEntry;
 
 typedef struct
 {
-	int			cur;
-	int			len;
-	LexemEntry *list;
+	int			 cur;
+	int			 len;
+	LexemeEntry *list;
 }	PrsStorage;
 
 
@@ -370,7 +370,7 @@ prs_setup_firstcall(FunctionCallInfo fcinfo, FuncCallContext *funcctx,
 	st = (PrsStorage *) palloc(sizeof(PrsStorage));
 	st->cur = 0;
 	st->len = 16;
-	st->list = (LexemEntry *) palloc(sizeof(LexemEntry) * st->len);
+	st->list = (LexemeEntry *) palloc(sizeof(LexemeEntry) * st->len);
 
 	prs->prs = (void *) DatumGetPointer(
 										FunctionCall2(
@@ -390,11 +390,11 @@ prs_setup_firstcall(FunctionCallInfo fcinfo, FuncCallContext *funcctx,
 		if (st->cur >= st->len)
 		{
 			st->len = 2 * st->len;
-			st->list = (LexemEntry *) repalloc(st->list, sizeof(LexemEntry) * st->len);
+			st->list = (LexemeEntry *) repalloc(st->list, sizeof(LexemeEntry) * st->len);
 		}
-		st->list[st->cur].lexem = palloc(llen + 1);
-		memcpy(st->list[st->cur].lexem, lex, llen);
-		st->list[st->cur].lexem[llen] = '\0';
+		st->list[st->cur].lexeme = palloc(llen + 1);
+		memcpy(st->list[st->cur].lexeme, lex, llen);
+		st->list[st->cur].lexeme[llen] = '\0';
 		st->list[st->cur].type = type;
 		st->cur++;
 	}
@@ -430,7 +430,7 @@ prs_process_call(FuncCallContext *funcctx)
 
 		values[0] = tid;
 		sprintf(tid, "%d", st->list[st->cur].type);
-		values[1] = st->list[st->cur].lexem;
+		values[1] = st->list[st->cur].lexeme;
 		tuple = BuildTupleFromCStrings(funcctx->attinmeta, values);
 		result = HeapTupleGetDatum(tuple);
 
diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c
index b4b06a039d78656481ad90bf7411815a14ebe84b..662731b5c04c63bfe9fb5d6e095d6898c43d389d 100644
--- a/contrib/xml2/xpath.c
+++ b/contrib/xml2/xpath.c
@@ -600,7 +600,7 @@ pgxml_result_to_text(xmlXPathObjectPtr res,
 			break;
 
 		default:
-			elog(NOTICE, "Unsupported XQuery result: %d", res->type);
+			elog(NOTICE, "unsupported XQuery result: %d", res->type);
 			xpresstr = xmlStrdup("<unsupported/>");
 	}
 
@@ -781,8 +781,8 @@ xpath_table(PG_FUNCTION_ARGS)
 	if (spi_tupdesc->natts != 2)
 	{
 		ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
-						errmsg("Expression returning multiple columns is not valid in parameter list"),
-						errdetail("Expected two columns in SPI result, got %d", spi_tupdesc->natts)));
+						errmsg("expression returning multiple columns is not valid in parameter list"),
+						errdetail("Expected two columns in SPI result, got %d.", spi_tupdesc->natts)));
 	}
 
 /* Setup the parser. Beware that this must happen in the same context as the
@@ -890,7 +890,7 @@ xpath_table(PG_FUNCTION_ARGS)
 								break;
 
 							default:
-								elog(NOTICE, "Unsupported XQuery result: %d", res->type);
+								elog(NOTICE, "unsupported XQuery result: %d", res->type);
 								resstr = xmlStrdup("<unsupported/>");
 						}
 
diff --git a/contrib/xml2/xslt_proc.c b/contrib/xml2/xslt_proc.c
index ff2ab8d045635c7aea05ee3275f17af17051abaa..433030ead96f5002fb3f7dcfa8ae79867d429a84 100644
--- a/contrib/xml2/xslt_proc.c
+++ b/contrib/xml2/xslt_proc.c
@@ -81,7 +81,7 @@ xslt_process(PG_FUNCTION_ARGS)
 	if (doctree == NULL)
 	{
 		xmlCleanupParser();
-		elog_error(ERROR, "Error parsing XML document", 0);
+		elog_error(ERROR, "error parsing XML document", 0);
 
 		PG_RETURN_NULL();
 	}
@@ -95,7 +95,7 @@ xslt_process(PG_FUNCTION_ARGS)
 		{
 			xmlFreeDoc(doctree);
 			xmlCleanupParser();
-			elog_error(ERROR, "Error parsing stylesheet as XML document", 0);
+			elog_error(ERROR, "error parsing stylesheet as XML document", 0);
 			PG_RETURN_NULL();
 		}
 
@@ -110,7 +110,7 @@ xslt_process(PG_FUNCTION_ARGS)
 		xmlFreeDoc(doctree);
 		xsltCleanupGlobals();
 		xmlCleanupParser();
-		elog_error(ERROR, "Failed to parse stylesheet", 0);
+		elog_error(ERROR, "failed to parse stylesheet", 0);
 		PG_RETURN_NULL();
 	}
 
diff --git a/doc/src/sgml/plperl.sgml b/doc/src/sgml/plperl.sgml
index 46d180bdc701048862045633b2c56f2079b90c79..0bde2450737a72f945378ceee8a743191de5a8de 100644
--- a/doc/src/sgml/plperl.sgml
+++ b/doc/src/sgml/plperl.sgml
@@ -1,5 +1,5 @@
 <!--
-$PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.49 2005/11/04 23:14:00 petere Exp $
+$PostgreSQL: pgsql/doc/src/sgml/plperl.sgml,v 2.50 2006/03/01 06:30:32 neilc Exp $
 -->
 
  <chapter id="plperl">
@@ -399,7 +399,7 @@ CREATE OR REPLACE FUNCTION lotsa_md5 (INTEGER) RETURNS SETOF foo_type AS $$
     my $t = localtime;
     elog(NOTICE, "opening file $file at $t" );
     open my $fh, '&lt;', $file # ooh, it's a file access!
-        or elog(ERROR, "Can't open $file for reading: $!");
+        or elog(ERROR, "can't open $file for reading: $!");
     my @words = &lt;$fh&gt;;
     close $fh;
     $t = localtime;
@@ -556,9 +556,9 @@ $$ LANGUAGE plperl;
 CREATE FUNCTION badfunc() RETURNS integer AS $$
     my $tmpfile = "/tmp/badfile";
     open my $fh, '&gt;', $tmpfile
-        or elog(ERROR, qq{Could not open the file "$tmpfile": $!});
+        or elog(ERROR, qq{could not open the file "$tmpfile": $!});
     print $fh "Testing writing to a file\n";
-    close $fh or elog(ERROR, qq{Could not close the file "$tmpfile": $!});
+    close $fh or elog(ERROR, qq{could not close the file "$tmpfile": $!});
     return 1;
 $$ LANGUAGE plperl;
 </programlisting>
diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c
index 2079d08b1e6ac7545e7edc8caab5ac33ebd9628b..5ab4c2b940e169dbcc3438ff9ec80610fdb43947 100644
--- a/src/backend/access/transam/slru.c
+++ b/src/backend/access/transam/slru.c
@@ -41,7 +41,7 @@
  * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/backend/access/transam/slru.c,v 1.34 2006/01/21 04:38:21 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/transam/slru.c,v 1.35 2006/03/01 06:30:32 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -752,42 +752,41 @@ SlruReportIOError(SlruCtl ctl, int pageno, TransactionId xid)
 			ereport(ERROR,
 					(errcode_for_file_access(),
 					 errmsg("could not access status of transaction %u", xid),
-					 errdetail("could not open file \"%s\": %m",
-							   path)));
+					 errdetail("Could not open file \"%s\": %m.", path)));
 			break;
 		case SLRU_SEEK_FAILED:
 			ereport(ERROR,
 					(errcode_for_file_access(),
 					 errmsg("could not access status of transaction %u", xid),
-				  errdetail("could not seek in file \"%s\" to offset %u: %m",
+				  errdetail("Could not seek in file \"%s\" to offset %u: %m.",
 							path, offset)));
 			break;
 		case SLRU_READ_FAILED:
 			ereport(ERROR,
 					(errcode_for_file_access(),
 					 errmsg("could not access status of transaction %u", xid),
-				errdetail("could not read from file \"%s\" at offset %u: %m",
+				errdetail("Could not read from file \"%s\" at offset %u: %m.",
 						  path, offset)));
 			break;
 		case SLRU_WRITE_FAILED:
 			ereport(ERROR,
 					(errcode_for_file_access(),
 					 errmsg("could not access status of transaction %u", xid),
-				 errdetail("could not write to file \"%s\" at offset %u: %m",
+				 errdetail("Could not write to file \"%s\" at offset %u: %m.",
 						   path, offset)));
 			break;
 		case SLRU_FSYNC_FAILED:
 			ereport(ERROR,
 					(errcode_for_file_access(),
 					 errmsg("could not access status of transaction %u", xid),
-					 errdetail("could not fsync file \"%s\": %m",
+					 errdetail("Could not fsync file \"%s\": %m.",
 							   path)));
 			break;
 		case SLRU_CLOSE_FAILED:
 			ereport(ERROR,
 					(errcode_for_file_access(),
 					 errmsg("could not access status of transaction %u", xid),
-					 errdetail("could not close file \"%s\": %m",
+					 errdetail("Could not close file \"%s\": %m.",
 							   path)));
 			break;
 		default:
diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c
index 3092ca2a377e291a0ffdd5e12d29797325d4ae97..a2ea0433b7898a0ec064367337e1453c0f511184 100644
--- a/src/backend/port/sysv_shmem.c
+++ b/src/backend/port/sysv_shmem.c
@@ -10,7 +10,7 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/backend/port/sysv_shmem.c,v 1.44 2005/10/15 02:49:22 momjian Exp $
+ *	  $PostgreSQL: pgsql/src/backend/port/sysv_shmem.c,v 1.45 2006/03/01 06:30:32 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -426,7 +426,7 @@ PGSharedMemoryReAttach(void)
 	UsedShmemSegAddr = origUsedShmemSegAddr;
 #endif
 
-	elog(DEBUG3, "Attaching to %p", UsedShmemSegAddr);
+	elog(DEBUG3, "attaching to %p", UsedShmemSegAddr);
 	hdr = (void *) PGSharedMemoryAttach((IpcMemoryKey) UsedShmemSegID, &shmid);
 	if (hdr == NULL)
 		elog(FATAL, "could not reattach to shared memory (key=%d, addr=%p): %m",
diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index cea843f343ae369b5096c363e9e344539e87f47c..9c834584a9019a4bac3ce538c65f24454d699476 100644
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -29,7 +29,7 @@
  * MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  *
  * IDENTIFICATION
- *	$PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.73 2006/02/28 20:56:14 neilc Exp $
+ *	$PostgreSQL: pgsql/src/pl/plpython/plpython.c,v 1.74 2006/03/01 06:30:32 neilc Exp $
  *
  *********************************************************************
  */
@@ -404,7 +404,7 @@ PLy_trigger_handler(FunctionCallInfo fcinfo, PLyProcedure * proc)
 				ereport(ERROR,
 						(errcode(ERRCODE_DATA_EXCEPTION),
 						 errmsg("unexpected return value from trigger procedure"),
-						 errdetail("expected None or a String")));
+						 errdetail("Expected None or a String.")));
 
 			srv = PyString_AsString(plrv);
 			if (pg_strcasecmp(srv, "SKIP") == 0)
@@ -428,7 +428,7 @@ PLy_trigger_handler(FunctionCallInfo fcinfo, PLyProcedure * proc)
 				ereport(ERROR,
 						(errcode(ERRCODE_DATA_EXCEPTION),
 						 errmsg("unexpected return value from trigger procedure"),
-						 errdetail("expected None, \"OK\", \"SKIP\", or \"MODIFY\"")));
+						 errdetail("Expected None, \"OK\", \"SKIP\", or \"MODIFY\".")));
 			}
 		}
 	}
@@ -770,7 +770,7 @@ PLy_function_handler(FunctionCallInfo fcinfo, PLyProcedure * proc)
 				ereport(ERROR,
 						(errcode(ERRCODE_DATATYPE_MISMATCH),
 						 errmsg("invalid return value from plpython function"),
-						 errdetail("Functions returning type \"void\" must return \"None\".")));
+						 errdetail("Functions returning type \"void\" must return None.")));
 
 			fcinfo->isnull = false;
 			rv = (Datum) 0;
diff --git a/src/tutorial/beard.c b/src/tutorial/beard.c
index f31a11977096dec3bb2611c746ebbd0354a3ef80..9048b2f77b1848deac472481ee7994893184ff73 100644
--- a/src/tutorial/beard.c
+++ b/src/tutorial/beard.c
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *	  $PostgreSQL: pgsql/src/tutorial/beard.c,v 1.13 2005/10/15 02:49:52 momjian Exp $
+ *	  $PostgreSQL: pgsql/src/tutorial/beard.c,v 1.14 2006/03/01 06:30:32 neilc Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -38,10 +38,10 @@ beard(Oid picture)
 											   ObjectIdGetDatum(picture),
 											   Int32GetDatum(INV_READ)));
 	if (pic_fd < 0)
-		elog(ERROR, "Cannot access picture large object");
+		elog(ERROR, "could not access picture large object");
 
 	if (lo_read(pic_fd, (char *) &ihdr, sizeof(ihdr)) != sizeof(ihdr))
-		elog(ERROR, "Picture large object corrupted");
+		elog(ERROR, "picture large object corrupted");
 
 	beardOffset = (ihdr.size / 3) * 2;
 
@@ -51,19 +51,19 @@ beard(Oid picture)
 	beard = DatumGetObjectId(DirectFunctionCall1(lo_creat,
 												 Int32GetDatum(INV_MD)));
 	if (beard == InvalidOid)
-		elog(ERROR, "Cannot create new large object");
+		elog(ERROR, "could not create new large object");
 
 	beard_fd = DatumGetInt32(DirectFunctionCall2(lo_open,
 												 ObjectIdGetDatum(beard),
 												 Int32GetDatum(INV_WRITE)));
 	if (beard_fd < 0)
-		elog(ERROR, "Cannot access beard large object");
+		elog(ERROR, "could not access beard large object");
 
 	if (DatumGetInt32(DirectFunctionCall3(lo_lseek,
 										  Int32GetDatum(pic_fd),
 										  Int32GetDatum(beardOffset),
 										  Int32GetDatum(SEEK_SET))) < 0)
-		elog(ERROR, "Cannot seek in picture large object");
+		elog(ERROR, "could not seek in picture large object");
 
 	while ((cc = lo_read(pic_fd, buf, BUFSIZE)) > 0)
 	{