Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 689eb53

Browse files
committed
Error message editing in backend/utils (except /adt).
1 parent 9fecf30 commit 689eb53

File tree

29 files changed

+739
-521
lines changed

29 files changed

+739
-521
lines changed

doc/src/sgml/xfunc.sgml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.69 2003/06/22 22:04:54 tgl Exp $
2+
$Header: /cvsroot/pgsql/doc/src/sgml/xfunc.sgml,v 1.70 2003/07/25 20:17:49 tgl Exp $
33
-->
44

55
<sect1 id="xfunc">
@@ -2162,7 +2162,6 @@ CREATE FUNCTION test(int, int) RETURNS int
21622162
#include "postgres.h"
21632163
#include "executor/spi.h"
21642164
#include "commands/trigger.h"
2165-
#include "utils/elog.h"
21662165
#include "fmgr.h"
21672166
#include "access/heapam.h"
21682167
#include "utils/syscache.h"

src/backend/utils/cache/catcache.c

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.104 2003/06/22 22:04:54 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.105 2003/07/25 20:17:52 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -158,8 +158,7 @@ GetCCHashEqFuncs(Oid keytype, PGFunction *hashfunc, RegProcedure *eqfunc)
158158
*eqfunc = F_OIDVECTOREQ;
159159
break;
160160
default:
161-
elog(FATAL, "GetCCHashEqFuncs: type %u unsupported as catcache key",
162-
keytype);
161+
elog(FATAL, "type %u not supported as catcache key", keytype);
163162
break;
164163
}
165164
}
@@ -202,7 +201,7 @@ CatalogCacheComputeHashValue(CatCache *cache, int nkeys, ScanKey cur_skey)
202201
cur_skey[0].sk_argument));
203202
break;
204203
default:
205-
elog(FATAL, "CCComputeHashValue: %d nkeys", nkeys);
204+
elog(FATAL, "wrong number of hash keys: %d", nkeys);
206205
break;
207206
}
208207

@@ -267,8 +266,7 @@ CatalogCacheComputeTupleHashValue(CatCache *cache, HeapTuple tuple)
267266
Assert(!isNull);
268267
break;
269268
default:
270-
elog(FATAL, "CCComputeTupleHashValue: %d cc_nkeys",
271-
cache->cc_nkeys);
269+
elog(FATAL, "wrong number of hash keys: %d", cache->cc_nkeys);
272270
break;
273271
}
274272

@@ -291,14 +289,14 @@ CatCachePrintStats(void)
291289
long cc_lsearches = 0;
292290
long cc_lhits = 0;
293291

294-
elog(DEBUG2, "Catcache stats dump: %d/%d tuples in catcaches",
292+
elog(DEBUG2, "catcache stats dump: %d/%d tuples in catcaches",
295293
CacheHdr->ch_ntup, CacheHdr->ch_maxtup);
296294

297295
for (cache = CacheHdr->ch_caches; cache; cache = cache->cc_next)
298296
{
299297
if (cache->cc_ntup == 0 && cache->cc_searches == 0)
300298
continue; /* don't print unused caches */
301-
elog(DEBUG2, "Catcache %s/%s: %d tup, %ld srch, %ld+%ld=%ld hits, %ld+%ld=%ld loads, %ld invals, %ld discards, %ld lsrch, %ld lhits",
299+
elog(DEBUG2, "catcache %s/%s: %d tup, %ld srch, %ld+%ld=%ld hits, %ld+%ld=%ld loads, %ld invals, %ld discards, %ld lsrch, %ld lhits",
302300
cache->cc_relname,
303301
cache->cc_indname,
304302
cache->cc_ntup,
@@ -322,7 +320,7 @@ CatCachePrintStats(void)
322320
cc_lsearches += cache->cc_lsearches;
323321
cc_lhits += cache->cc_lhits;
324322
}
325-
elog(DEBUG2, "Catcache totals: %d tup, %ld srch, %ld+%ld=%ld hits, %ld+%ld=%ld loads, %ld invals, %ld discards, %ld lsrch, %ld lhits",
323+
elog(DEBUG2, "catcache totals: %d tup, %ld srch, %ld+%ld=%ld hits, %ld+%ld=%ld loads, %ld invals, %ld discards, %ld lsrch, %ld lhits",
326324
CacheHdr->ch_ntup,
327325
cc_searches,
328326
cc_hits,
@@ -557,7 +555,7 @@ AtEOXact_CatCache(bool isCommit)
557555
if (cl->refcount != 0)
558556
{
559557
if (isCommit)
560-
elog(WARNING, "Cache reference leak: cache %s (%d), list %p has count %d",
558+
elog(WARNING, "cache reference leak: cache %s (%d), list %p has count %d",
561559
ccp->cc_relname, ccp->id, cl, cl->refcount);
562560
cl->refcount = 0;
563561
}
@@ -580,7 +578,7 @@ AtEOXact_CatCache(bool isCommit)
580578
if (ct->refcount != 0)
581579
{
582580
if (isCommit)
583-
elog(WARNING, "Cache reference leak: cache %s (%d), tuple %u has count %d",
581+
elog(WARNING, "cache reference leak: cache %s (%d), tuple %u has count %d",
584582
ct->my_cache->cc_relname, ct->my_cache->id,
585583
HeapTupleGetOid(&ct->tuple),
586584
ct->refcount);
@@ -947,7 +945,7 @@ CatalogCacheInitializeCache(CatCache *cache)
947945
else
948946
{
949947
if (cache->cc_key[i] != ObjectIdAttributeNumber)
950-
elog(FATAL, "CatalogCacheInit: only sys attr supported is OID");
948+
elog(FATAL, "only sys attr supported in caches is OID");
951949
keytype = OIDOID;
952950
}
953951

src/backend/utils/cache/inval.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
* Portions Copyright (c) 1994, Regents of the University of California
7575
*
7676
* IDENTIFICATION
77-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.55 2002/09/04 20:31:29 momjian Exp $
77+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.56 2003/07/25 20:17:52 tgl Exp $
7878
*
7979
*-------------------------------------------------------------------------
8080
*/
@@ -450,8 +450,7 @@ LocalExecuteInvalidationMessage(SharedInvalidationMessage *msg)
450450
}
451451
else
452452
{
453-
elog(FATAL, "ExecuteInvalidationMessage: bogus message id %d",
454-
msg->id);
453+
elog(FATAL, "unrecognized SI message id: %d", msg->id);
455454
}
456455
}
457456

@@ -705,7 +704,7 @@ CacheRegisterSyscacheCallback(int cacheid,
705704
Datum arg)
706705
{
707706
if (cache_callback_count >= MAX_CACHE_CALLBACKS)
708-
elog(FATAL, "Out of cache_callback_list slots");
707+
elog(FATAL, "out of cache_callback_list slots");
709708

710709
cache_callback_list[cache_callback_count].id = cacheid;
711710
cache_callback_list[cache_callback_count].function = func;
@@ -728,7 +727,7 @@ CacheRegisterRelcacheCallback(CacheCallbackFunction func,
728727
Datum arg)
729728
{
730729
if (cache_callback_count >= MAX_CACHE_CALLBACKS)
731-
elog(FATAL, "Out of cache_callback_list slots");
730+
elog(FATAL, "out of cache_callback_list slots");
732731

733732
cache_callback_list[cache_callback_count].id = SHAREDINVALRELCACHE_ID;
734733
cache_callback_list[cache_callback_count].function = func;

0 commit comments

Comments
 (0)