Skip to content

Commit feb4f44

Browse files
committed
Message editing: remove gratuitous variations in message wording, standardize
terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
1 parent 42013ca commit feb4f44

File tree

159 files changed

+1418
-1408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+1418
-1408
lines changed

src/backend/access/common/heaptuple.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.86 2003/08/04 02:39:56 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.87 2003/09/25 06:57:56 petere Exp $
1313
*
1414
* NOTES
1515
* The old interface functions have been converted to macros
@@ -581,7 +581,7 @@ heap_formtuple(TupleDesc tupleDescriptor,
581581
if (numberOfAttributes > MaxTupleAttributeNumber)
582582
ereport(ERROR,
583583
(errcode(ERRCODE_TOO_MANY_COLUMNS),
584-
errmsg("number of attributes %d exceeds limit, %d",
584+
errmsg("number of columns (%d) exceeds limit (%d)",
585585
numberOfAttributes, MaxTupleAttributeNumber)));
586586

587587
for (i = 0; i < numberOfAttributes; i++)

src/backend/access/common/indextuple.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.67 2003/08/04 02:39:56 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.68 2003/09/25 06:57:56 petere Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -54,7 +54,7 @@ index_formtuple(TupleDesc tupleDescriptor,
5454
if (numberOfAttributes > INDEX_MAX_KEYS)
5555
ereport(ERROR,
5656
(errcode(ERRCODE_TOO_MANY_COLUMNS),
57-
errmsg("number of index attributes %d exceeds limit, %d",
57+
errmsg("number of index columns (%d) exceeds limit (%d)",
5858
numberOfAttributes, INDEX_MAX_KEYS)));
5959

6060
#ifdef TOAST_INDEX_HACK
@@ -162,7 +162,7 @@ index_formtuple(TupleDesc tupleDescriptor,
162162
if ((size & INDEX_SIZE_MASK) != size)
163163
ereport(ERROR,
164164
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
165-
errmsg("index tuple requires %lu bytes, maximum size is %lu",
165+
errmsg("index row requires %lu bytes, maximum size is %lu",
166166
(unsigned long) size,
167167
(unsigned long) INDEX_SIZE_MASK)));
168168

src/backend/access/common/tupdesc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.99 2003/08/11 23:04:49 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.100 2003/09/25 06:57:56 petere Exp $
1212
*
1313
* NOTES
1414
* some of the executor utility code such as "ExecTypeFromTL" should be
@@ -657,7 +657,7 @@ TypeGetTupleDesc(Oid typeoid, List *colaliases)
657657
if (length(colaliases) != natts)
658658
ereport(ERROR,
659659
(errcode(ERRCODE_DATATYPE_MISMATCH),
660-
errmsg("number of aliases does not match number of attributes")));
660+
errmsg("number of aliases does not match number of columns")));
661661

662662
/* OK, use the aliases instead */
663663
for (varattno = 0; varattno < natts; varattno++)
@@ -684,7 +684,7 @@ TypeGetTupleDesc(Oid typeoid, List *colaliases)
684684
if (length(colaliases) != 1)
685685
ereport(ERROR,
686686
(errcode(ERRCODE_DATATYPE_MISMATCH),
687-
errmsg("number of aliases does not match number of attributes")));
687+
errmsg("number of aliases does not match number of columns")));
688688

689689
/* OK, get the column alias */
690690
attname = strVal(lfirst(colaliases));
@@ -701,7 +701,7 @@ TypeGetTupleDesc(Oid typeoid, List *colaliases)
701701
else if (functyptype == 'p' && typeoid == RECORDOID)
702702
ereport(ERROR,
703703
(errcode(ERRCODE_DATATYPE_MISMATCH),
704-
errmsg("could not determine tuple description for function returning record")));
704+
errmsg("could not determine row description for function returning record")));
705705
else
706706
{
707707
/* crummy error message, but parser should have caught this */

src/backend/access/hash/hashinsert.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.30 2003/09/04 22:06:27 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.31 2003/09/25 06:57:56 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -87,7 +87,7 @@ _hash_doinsert(Relation rel, HashItem hitem)
8787
if (itemsz > HashMaxItemSize((Page) metap))
8888
ereport(ERROR,
8989
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
90-
errmsg("index tuple size %lu exceeds hash maximum, %lu",
90+
errmsg("index row size %lu exceeds hash maximum %lu",
9191
(unsigned long) itemsz,
9292
(unsigned long) HashMaxItemSize((Page) metap))));
9393

src/backend/access/hash/hashutil.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.36 2003/09/04 22:06:27 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.37 2003/09/25 06:57:56 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -43,7 +43,7 @@ _hash_formitem(IndexTuple itup)
4343
if (IndexTupleHasNulls(itup))
4444
ereport(ERROR,
4545
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
46-
errmsg("hash indexes cannot include null keys")));
46+
errmsg("hash indexes cannot contain null keys")));
4747

4848
/*
4949
* make a copy of the index tuple (XXX do we still need to copy?)
@@ -129,8 +129,8 @@ _hash_checkpage(Relation rel, Page page, int flags)
129129
if (metap->hashm_version != HASH_VERSION)
130130
ereport(ERROR,
131131
(errcode(ERRCODE_INDEX_CORRUPTED),
132-
errmsg("index \"%s\" has wrong hash version, please REINDEX it",
133-
RelationGetRelationName(rel))));
132+
errmsg("index \"%s\" has wrong hash version", RelationGetRelationName(rel)),
133+
errhint("Please REINDEX it.")));
134134
}
135135

136136
/*

src/backend/access/heap/heapam.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.155 2003/09/15 23:33:38 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.156 2003/09/25 06:57:56 petere Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -577,7 +577,7 @@ heap_open(Oid relationId, LOCKMODE lockmode)
577577
if (r->rd_rel->relkind == RELKIND_INDEX)
578578
ereport(ERROR,
579579
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
580-
errmsg("\"%s\" is an index relation",
580+
errmsg("\"%s\" is an index",
581581
RelationGetRelationName(r))));
582582
else if (r->rd_rel->relkind == RELKIND_SPECIAL)
583583
ereport(ERROR,
@@ -612,7 +612,7 @@ heap_openrv(const RangeVar *relation, LOCKMODE lockmode)
612612
if (r->rd_rel->relkind == RELKIND_INDEX)
613613
ereport(ERROR,
614614
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
615-
errmsg("\"%s\" is an index relation",
615+
errmsg("\"%s\" is an index",
616616
RelationGetRelationName(r))));
617617
else if (r->rd_rel->relkind == RELKIND_SPECIAL)
618618
ereport(ERROR,
@@ -647,7 +647,7 @@ heap_openr(const char *sysRelationName, LOCKMODE lockmode)
647647
if (r->rd_rel->relkind == RELKIND_INDEX)
648648
ereport(ERROR,
649649
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
650-
errmsg("\"%s\" is an index relation",
650+
errmsg("\"%s\" is an index",
651651
RelationGetRelationName(r))));
652652
else if (r->rd_rel->relkind == RELKIND_SPECIAL)
653653
ereport(ERROR,

src/backend/access/heap/hio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Id: hio.c,v 1.49 2003/08/04 02:39:57 momjian Exp $
11+
* $Id: hio.c,v 1.50 2003/09/25 06:57:57 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -106,7 +106,7 @@ RelationGetBufferForTuple(Relation relation, Size len,
106106
if (len > MaxTupleSize)
107107
ereport(ERROR,
108108
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
109-
errmsg("tuple is too big: size %lu, maximum size %lu",
109+
errmsg("row is too big: size %lu, maximum size %lu",
110110
(unsigned long) len,
111111
(unsigned long) MaxTupleSize)));
112112

src/backend/access/index/indexam.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.70 2003/08/08 21:41:25 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.71 2003/09/25 06:57:57 petere Exp $
1212
*
1313
* INTERFACE ROUTINES
1414
* index_open - open an index relation by relation OID
@@ -131,7 +131,7 @@ index_open(Oid relationId)
131131
if (r->rd_rel->relkind != RELKIND_INDEX)
132132
ereport(ERROR,
133133
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
134-
errmsg("\"%s\" is not an index relation",
134+
errmsg("\"%s\" is not an index",
135135
RelationGetRelationName(r))));
136136

137137
pgstat_initstats(&r->pgstat_info, r);
@@ -156,7 +156,7 @@ index_openrv(const RangeVar *relation)
156156
if (r->rd_rel->relkind != RELKIND_INDEX)
157157
ereport(ERROR,
158158
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
159-
errmsg("\"%s\" is not an index relation",
159+
errmsg("\"%s\" is not an index",
160160
RelationGetRelationName(r))));
161161

162162
pgstat_initstats(&r->pgstat_info, r);
@@ -181,7 +181,7 @@ index_openr(const char *sysRelationName)
181181
if (r->rd_rel->relkind != RELKIND_INDEX)
182182
ereport(ERROR,
183183
(errcode(ERRCODE_WRONG_OBJECT_TYPE),
184-
errmsg("\"%s\" is not an index relation",
184+
errmsg("\"%s\" is not an index",
185185
RelationGetRelationName(r))));
186186

187187
pgstat_initstats(&r->pgstat_info, r);

src/backend/access/nbtree/nbtinsert.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.105 2003/09/02 22:10:16 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.106 2003/09/25 06:57:57 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -251,7 +251,7 @@ _bt_check_unique(Relation rel, BTItem btitem, Relation heapRel,
251251
*/
252252
ereport(ERROR,
253253
(errcode(ERRCODE_UNIQUE_VIOLATION),
254-
errmsg("duplicate key violates UNIQUE constraint \"%s\"",
254+
errmsg("duplicate key violates unique constraint \"%s\"",
255255
RelationGetRelationName(rel))));
256256
}
257257
else if (htup.t_data != NULL)
@@ -403,7 +403,7 @@ _bt_insertonpg(Relation rel,
403403
if (itemsz > BTMaxItemSize(page))
404404
ereport(ERROR,
405405
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
406-
errmsg("index tuple size %lu exceeds btree maximum, %lu",
406+
errmsg("index row size %lu exceeds btree maximum, %lu",
407407
(unsigned long) itemsz,
408408
(unsigned long) BTMaxItemSize(page))));
409409

src/backend/access/nbtree/nbtpage.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.70 2003/08/10 19:48:08 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.71 2003/09/25 06:57:57 petere Exp $
1313
*
1414
* NOTES
1515
* Postgres btree pages look like ordinary relation pages. The opaque
@@ -153,7 +153,7 @@ _bt_getroot(Relation rel, int access)
153153
if (metad->btm_version != BTREE_VERSION)
154154
ereport(ERROR,
155155
(errcode(ERRCODE_INDEX_CORRUPTED),
156-
errmsg("version mismatch in \"%s\": file version %d, code version %d",
156+
errmsg("version mismatch in index \"%s\": file version %d, code version %d",
157157
RelationGetRelationName(rel),
158158
metad->btm_version, BTREE_VERSION)));
159159

@@ -332,7 +332,7 @@ _bt_gettrueroot(Relation rel)
332332
if (metad->btm_version != BTREE_VERSION)
333333
ereport(ERROR,
334334
(errcode(ERRCODE_INDEX_CORRUPTED),
335-
errmsg("version mismatch in \"%s\": file version %d, code version %d",
335+
errmsg("version mismatch in index \"%s\": file version %d, code version %d",
336336
RelationGetRelationName(rel),
337337
metad->btm_version, BTREE_VERSION)));
338338

src/backend/access/nbtree/nbtsort.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* Portions Copyright (c) 1994, Regents of the University of California
3737
*
3838
* IDENTIFICATION
39-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsort.c,v 1.75 2003/08/04 02:39:57 momjian Exp $
39+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsort.c,v 1.76 2003/09/25 06:57:57 petere Exp $
4040
*
4141
*-------------------------------------------------------------------------
4242
*/
@@ -399,7 +399,7 @@ _bt_buildadd(Relation index, BTPageState *state, BTItem bti)
399399
if (btisz > BTMaxItemSize(npage))
400400
ereport(ERROR,
401401
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
402-
errmsg("index tuple size %lu exceeds btree maximum, %lu",
402+
errmsg("index row size %lu exceeds btree maximum, %lu",
403403
(unsigned long) btisz,
404404
(unsigned long) BTMaxItemSize(npage))));
405405

src/backend/access/rtree/rtree.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.79 2003/08/04 02:39:57 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.80 2003/09/25 06:57:57 petere Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -782,7 +782,7 @@ rtpicksplit(Relation r,
782782
if (newitemsz > RTPageAvailSpace)
783783
ereport(ERROR,
784784
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
785-
errmsg("index tuple size %lu exceeds rtree maximum, %lu",
785+
errmsg("index row size %lu exceeds rtree maximum, %lu",
786786
(unsigned long) newitemsz,
787787
(unsigned long) RTPageAvailSpace)));
788788

src/backend/access/transam/slru.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Header: /cvsroot/pgsql/src/backend/access/transam/slru.c,v 1.6 2003/08/08 21:41:27 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/access/transam/slru.c,v 1.7 2003/09/25 06:57:57 petere Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -611,35 +611,35 @@ SlruReportIOError(SlruCtl ctl, int pageno, TransactionId xid)
611611
ereport(ERROR,
612612
(errcode_for_file_access(),
613613
errmsg("could not access status of transaction %u", xid),
614-
errdetail("open of file \"%s\" failed: %m",
614+
errdetail("could not open file \"%s\": %m",
615615
path)));
616616
break;
617617
case SLRU_CREATE_FAILED:
618618
ereport(ERROR,
619619
(errcode_for_file_access(),
620620
errmsg("could not access status of transaction %u", xid),
621-
errdetail("creation of file \"%s\" failed: %m",
621+
errdetail("could not create file \"%s\": %m",
622622
path)));
623623
break;
624624
case SLRU_SEEK_FAILED:
625625
ereport(ERROR,
626626
(errcode_for_file_access(),
627627
errmsg("could not access status of transaction %u", xid),
628-
errdetail("lseek of file \"%s\", offset %u failed: %m",
628+
errdetail("could not seek in file \"%s\" to offset %u: %m",
629629
path, offset)));
630630
break;
631631
case SLRU_READ_FAILED:
632632
ereport(ERROR,
633633
(errcode_for_file_access(),
634634
errmsg("could not access status of transaction %u", xid),
635-
errdetail("read of file \"%s\", offset %u failed: %m",
635+
errdetail("could not read from file \"%s\" at offset %u: %m",
636636
path, offset)));
637637
break;
638638
case SLRU_WRITE_FAILED:
639639
ereport(ERROR,
640640
(errcode_for_file_access(),
641641
errmsg("could not access status of transaction %u", xid),
642-
errdetail("write of file \"%s\", offset %u failed: %m",
642+
errdetail("could not write to file \"%s\" at offset %u: %m",
643643
path, offset)));
644644
break;
645645
default:
@@ -817,7 +817,7 @@ restart:;
817817
{
818818
LWLockRelease(ctl->locks->ControlLock);
819819
ereport(LOG,
820-
(errmsg("could not truncate \"%s\": apparent wraparound",
820+
(errmsg("could not truncate directory \"%s\": apparent wraparound",
821821
ctl->Dir)));
822822
return;
823823
}

src/backend/access/transam/xact.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.153 2003/09/24 18:54:01 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.154 2003/09/25 06:57:57 petere Exp $
1212
*
1313
* NOTES
1414
* Transaction aborts can now occur two ways:
@@ -1425,7 +1425,7 @@ RequireTransactionChain(void *stmtNode, const char *stmtType)
14251425
ereport(ERROR,
14261426
(errcode(ERRCODE_NO_ACTIVE_SQL_TRANSACTION),
14271427
/* translator: %s represents an SQL statement name */
1428-
errmsg("%s may only be used in BEGIN/END transaction blocks",
1428+
errmsg("%s may only be used in transaction blocks",
14291429
stmtType)));
14301430
}
14311431

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy