From: Neil Conway
SELECT to_tsquery('default', 'a|is¬|!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. +ISpell dictionary for lexeme processing.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');
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.
SELECT set_curdict('en_ispell');-
Lexize is meant to turn a word into a lexem. It is possible to -receive more than one lexem returned for a single word.
+Lexize is meant to turn a word into a lexeme. It is possible to +receive more than one lexeme returned for a single word.
SELECT lexize('en_ispell', 'conditionally'); lexize @@ -798,7 +798,7 @@ receive more than one lexem returned for a single word. (1 row)
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.
@@ -809,7 +809,7 @@ result set back. (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)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.
VALUES ('default_english', 'lword', '{en_ispell,en_stem}');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.
-There are several other lexem types used that we do not need to +
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.
@@ -889,10 +889,10 @@ configuration to be our default for en_US locale. (1 row)
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.
@@ -905,7 +905,7 @@ tsvector.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.
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 2529480a53a..5540e5d323c 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:
=# SELECT to_tsquery('the') -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 1960f9510bd..223ae4a9ada 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 c54ca11803c..42fd6712e6d 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 e6285fd9d2e..9be5f451fa8 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 f56f7fbea3e..08d3ff219b5 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 b3a5b501116..5941be3a55b 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 f1faaf87786..1c3121aa850 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 50a355e464a..3bc39a87378 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 ae9575b3532..3a90fe5a192 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 dd895ff38ab..0f369bdcb7e 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*/ #include "postgres.h" diff --git a/contrib/tsearch2/wparser.c b/contrib/tsearch2/wparser.c index 725020e23de..eb990817301 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 b4b06a039d7..662731b5c04 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(" "); } @@ -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(" "); } diff --git a/contrib/xml2/xslt_proc.c b/contrib/xml2/xslt_proc.c index ff2ab8d0456..433030ead96 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 46d180bdc70..0bde2450737 100644 --- a/doc/src/sgml/plperl.sgml +++ b/doc/src/sgml/plperl.sgml @@ -1,5 +1,5 @@ @@ -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, '<', $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 = <$fh>; close $fh; $t = localtime; @@ -556,9 +556,9 @@ $$ LANGUAGE plperl; CREATE FUNCTION badfunc() RETURNS integer AS $$ my $tmpfile = "/tmp/badfile"; open my $fh, '>', $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; diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c index 2079d08b1e6..5ab4c2b940e 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 3092ca2a377..a2ea0433b78 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 cea843f343a..9c834584a90 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 f31a1197709..9048b2f77b1 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) {