From: Peter Eisentraut Date: Thu, 25 Sep 2003 06:58:07 +0000 (+0000) Subject: Message editing: remove gratuitous variations in message wording, standardize X-Git-Tag: REL7_4_BETA4~82 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=feb4f44d296b88b7f0723f4a4f3945a371276e0b;p=postgresql Message editing: remove gratuitous variations in message wording, standardize terms, add some clarifications, fix some untranslatable attempts at dynamic message building. --- diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c index ae2fd2e15b..dad99b0059 100644 --- a/src/backend/access/common/heaptuple.c +++ b/src/backend/access/common/heaptuple.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.86 2003/08/04 02:39:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.87 2003/09/25 06:57:56 petere Exp $ * * NOTES * The old interface functions have been converted to macros @@ -581,7 +581,7 @@ heap_formtuple(TupleDesc tupleDescriptor, if (numberOfAttributes > MaxTupleAttributeNumber) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_COLUMNS), - errmsg("number of attributes %d exceeds limit, %d", + errmsg("number of columns (%d) exceeds limit (%d)", numberOfAttributes, MaxTupleAttributeNumber))); for (i = 0; i < numberOfAttributes; i++) diff --git a/src/backend/access/common/indextuple.c b/src/backend/access/common/indextuple.c index 9c51ea33dc..3f7a2ae22e 100644 --- a/src/backend/access/common/indextuple.c +++ b/src/backend/access/common/indextuple.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.67 2003/08/04 02:39:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.68 2003/09/25 06:57:56 petere Exp $ * *------------------------------------------------------------------------- */ @@ -54,7 +54,7 @@ index_formtuple(TupleDesc tupleDescriptor, if (numberOfAttributes > INDEX_MAX_KEYS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_COLUMNS), - errmsg("number of index attributes %d exceeds limit, %d", + errmsg("number of index columns (%d) exceeds limit (%d)", numberOfAttributes, INDEX_MAX_KEYS))); #ifdef TOAST_INDEX_HACK @@ -162,7 +162,7 @@ index_formtuple(TupleDesc tupleDescriptor, if ((size & INDEX_SIZE_MASK) != size) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index tuple requires %lu bytes, maximum size is %lu", + errmsg("index row requires %lu bytes, maximum size is %lu", (unsigned long) size, (unsigned long) INDEX_SIZE_MASK))); diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c index 9a40c08ca9..180cdcb359 100644 --- a/src/backend/access/common/tupdesc.c +++ b/src/backend/access/common/tupdesc.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.99 2003/08/11 23:04:49 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.100 2003/09/25 06:57:56 petere Exp $ * * NOTES * some of the executor utility code such as "ExecTypeFromTL" should be @@ -657,7 +657,7 @@ TypeGetTupleDesc(Oid typeoid, List *colaliases) if (length(colaliases) != natts) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("number of aliases does not match number of attributes"))); + errmsg("number of aliases does not match number of columns"))); /* OK, use the aliases instead */ for (varattno = 0; varattno < natts; varattno++) @@ -684,7 +684,7 @@ TypeGetTupleDesc(Oid typeoid, List *colaliases) if (length(colaliases) != 1) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("number of aliases does not match number of attributes"))); + errmsg("number of aliases does not match number of columns"))); /* OK, get the column alias */ attname = strVal(lfirst(colaliases)); @@ -701,7 +701,7 @@ TypeGetTupleDesc(Oid typeoid, List *colaliases) else if (functyptype == 'p' && typeoid == RECORDOID) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("could not determine tuple description for function returning record"))); + errmsg("could not determine row description for function returning record"))); else { /* crummy error message, but parser should have caught this */ diff --git a/src/backend/access/hash/hashinsert.c b/src/backend/access/hash/hashinsert.c index 00b3d60b28..5c10a74ad7 100644 --- a/src/backend/access/hash/hashinsert.c +++ b/src/backend/access/hash/hashinsert.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.30 2003/09/04 22:06:27 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.31 2003/09/25 06:57:56 petere Exp $ * *------------------------------------------------------------------------- */ @@ -87,7 +87,7 @@ _hash_doinsert(Relation rel, HashItem hitem) if (itemsz > HashMaxItemSize((Page) metap)) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index tuple size %lu exceeds hash maximum, %lu", + errmsg("index row size %lu exceeds hash maximum %lu", (unsigned long) itemsz, (unsigned long) HashMaxItemSize((Page) metap)))); diff --git a/src/backend/access/hash/hashutil.c b/src/backend/access/hash/hashutil.c index 0cfbe5e7a1..931f8d8087 100644 --- a/src/backend/access/hash/hashutil.c +++ b/src/backend/access/hash/hashutil.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.36 2003/09/04 22:06:27 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/hash/hashutil.c,v 1.37 2003/09/25 06:57:56 petere Exp $ * *------------------------------------------------------------------------- */ @@ -43,7 +43,7 @@ _hash_formitem(IndexTuple itup) if (IndexTupleHasNulls(itup)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("hash indexes cannot include null keys"))); + errmsg("hash indexes cannot contain null keys"))); /* * 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) if (metap->hashm_version != HASH_VERSION) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("index \"%s\" has wrong hash version, please REINDEX it", - RelationGetRelationName(rel)))); + errmsg("index \"%s\" has wrong hash version", RelationGetRelationName(rel)), + errhint("Please REINDEX it."))); } /* diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 3bcd8da1da..2ddab234b0 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.155 2003/09/15 23:33:38 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.156 2003/09/25 06:57:56 petere Exp $ * * * INTERFACE ROUTINES @@ -577,7 +577,7 @@ heap_open(Oid relationId, LOCKMODE lockmode) if (r->rd_rel->relkind == RELKIND_INDEX) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("\"%s\" is an index relation", + errmsg("\"%s\" is an index", RelationGetRelationName(r)))); else if (r->rd_rel->relkind == RELKIND_SPECIAL) ereport(ERROR, @@ -612,7 +612,7 @@ heap_openrv(const RangeVar *relation, LOCKMODE lockmode) if (r->rd_rel->relkind == RELKIND_INDEX) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("\"%s\" is an index relation", + errmsg("\"%s\" is an index", RelationGetRelationName(r)))); else if (r->rd_rel->relkind == RELKIND_SPECIAL) ereport(ERROR, @@ -647,7 +647,7 @@ heap_openr(const char *sysRelationName, LOCKMODE lockmode) if (r->rd_rel->relkind == RELKIND_INDEX) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("\"%s\" is an index relation", + errmsg("\"%s\" is an index", RelationGetRelationName(r)))); else if (r->rd_rel->relkind == RELKIND_SPECIAL) ereport(ERROR, diff --git a/src/backend/access/heap/hio.c b/src/backend/access/heap/hio.c index 24c1a66b40..9c7d72a7e4 100644 --- a/src/backend/access/heap/hio.c +++ b/src/backend/access/heap/hio.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Id: hio.c,v 1.49 2003/08/04 02:39:57 momjian Exp $ + * $Id: hio.c,v 1.50 2003/09/25 06:57:57 petere Exp $ * *------------------------------------------------------------------------- */ @@ -106,7 +106,7 @@ RelationGetBufferForTuple(Relation relation, Size len, if (len > MaxTupleSize) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("tuple is too big: size %lu, maximum size %lu", + errmsg("row is too big: size %lu, maximum size %lu", (unsigned long) len, (unsigned long) MaxTupleSize))); diff --git a/src/backend/access/index/indexam.c b/src/backend/access/index/indexam.c index fb88535f0e..1f5d81d4b5 100644 --- a/src/backend/access/index/indexam.c +++ b/src/backend/access/index/indexam.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.70 2003/08/08 21:41:25 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.71 2003/09/25 06:57:57 petere Exp $ * * INTERFACE ROUTINES * index_open - open an index relation by relation OID @@ -131,7 +131,7 @@ index_open(Oid relationId) if (r->rd_rel->relkind != RELKIND_INDEX) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("\"%s\" is not an index relation", + errmsg("\"%s\" is not an index", RelationGetRelationName(r)))); pgstat_initstats(&r->pgstat_info, r); @@ -156,7 +156,7 @@ index_openrv(const RangeVar *relation) if (r->rd_rel->relkind != RELKIND_INDEX) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("\"%s\" is not an index relation", + errmsg("\"%s\" is not an index", RelationGetRelationName(r)))); pgstat_initstats(&r->pgstat_info, r); @@ -181,7 +181,7 @@ index_openr(const char *sysRelationName) if (r->rd_rel->relkind != RELKIND_INDEX) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("\"%s\" is not an index relation", + errmsg("\"%s\" is not an index", RelationGetRelationName(r)))); pgstat_initstats(&r->pgstat_info, r); diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index c8dbbfb041..27c833408d 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.105 2003/09/02 22:10:16 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.106 2003/09/25 06:57:57 petere Exp $ * *------------------------------------------------------------------------- */ @@ -251,7 +251,7 @@ _bt_check_unique(Relation rel, BTItem btitem, Relation heapRel, */ ereport(ERROR, (errcode(ERRCODE_UNIQUE_VIOLATION), - errmsg("duplicate key violates UNIQUE constraint \"%s\"", + errmsg("duplicate key violates unique constraint \"%s\"", RelationGetRelationName(rel)))); } else if (htup.t_data != NULL) @@ -403,7 +403,7 @@ _bt_insertonpg(Relation rel, if (itemsz > BTMaxItemSize(page)) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index tuple size %lu exceeds btree maximum, %lu", + errmsg("index row size %lu exceeds btree maximum, %lu", (unsigned long) itemsz, (unsigned long) BTMaxItemSize(page)))); diff --git a/src/backend/access/nbtree/nbtpage.c b/src/backend/access/nbtree/nbtpage.c index 23bc2fb062..2cb57aadc2 100644 --- a/src/backend/access/nbtree/nbtpage.c +++ b/src/backend/access/nbtree/nbtpage.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.70 2003/08/10 19:48:08 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.71 2003/09/25 06:57:57 petere Exp $ * * NOTES * Postgres btree pages look like ordinary relation pages. The opaque @@ -153,7 +153,7 @@ _bt_getroot(Relation rel, int access) if (metad->btm_version != BTREE_VERSION) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("version mismatch in \"%s\": file version %d, code version %d", + errmsg("version mismatch in index \"%s\": file version %d, code version %d", RelationGetRelationName(rel), metad->btm_version, BTREE_VERSION))); @@ -332,7 +332,7 @@ _bt_gettrueroot(Relation rel) if (metad->btm_version != BTREE_VERSION) ereport(ERROR, (errcode(ERRCODE_INDEX_CORRUPTED), - errmsg("version mismatch in \"%s\": file version %d, code version %d", + errmsg("version mismatch in index \"%s\": file version %d, code version %d", RelationGetRelationName(rel), metad->btm_version, BTREE_VERSION))); diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c index 63dd938774..d8ea19434f 100644 --- a/src/backend/access/nbtree/nbtsort.c +++ b/src/backend/access/nbtree/nbtsort.c @@ -36,7 +36,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsort.c,v 1.75 2003/08/04 02:39:57 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsort.c,v 1.76 2003/09/25 06:57:57 petere Exp $ * *------------------------------------------------------------------------- */ @@ -399,7 +399,7 @@ _bt_buildadd(Relation index, BTPageState *state, BTItem bti) if (btisz > BTMaxItemSize(npage)) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index tuple size %lu exceeds btree maximum, %lu", + errmsg("index row size %lu exceeds btree maximum, %lu", (unsigned long) btisz, (unsigned long) BTMaxItemSize(npage)))); diff --git a/src/backend/access/rtree/rtree.c b/src/backend/access/rtree/rtree.c index f672cc7fe1..e8c0cf32e9 100644 --- a/src/backend/access/rtree/rtree.c +++ b/src/backend/access/rtree/rtree.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.79 2003/08/04 02:39:57 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.80 2003/09/25 06:57:57 petere Exp $ * *------------------------------------------------------------------------- */ @@ -782,7 +782,7 @@ rtpicksplit(Relation r, if (newitemsz > RTPageAvailSpace) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("index tuple size %lu exceeds rtree maximum, %lu", + errmsg("index row size %lu exceeds rtree maximum, %lu", (unsigned long) newitemsz, (unsigned long) RTPageAvailSpace))); diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c index 3f0d387d44..f0ca7ffb76 100644 --- a/src/backend/access/transam/slru.c +++ b/src/backend/access/transam/slru.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/access/transam/slru.c,v 1.6 2003/08/08 21:41:27 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/slru.c,v 1.7 2003/09/25 06:57:57 petere Exp $ * *------------------------------------------------------------------------- */ @@ -611,35 +611,35 @@ SlruReportIOError(SlruCtl ctl, int pageno, TransactionId xid) ereport(ERROR, (errcode_for_file_access(), errmsg("could not access status of transaction %u", xid), - errdetail("open of file \"%s\" failed: %m", + errdetail("could not open file \"%s\": %m", path))); break; case SLRU_CREATE_FAILED: ereport(ERROR, (errcode_for_file_access(), errmsg("could not access status of transaction %u", xid), - errdetail("creation of file \"%s\" failed: %m", + errdetail("could not create 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("lseek of file \"%s\", offset %u failed: %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("read of file \"%s\", offset %u failed: %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("write of file \"%s\", offset %u failed: %m", + errdetail("could not write to file \"%s\" at offset %u: %m", path, offset))); break; default: @@ -817,7 +817,7 @@ restart:; { LWLockRelease(ctl->locks->ControlLock); ereport(LOG, - (errmsg("could not truncate \"%s\": apparent wraparound", + (errmsg("could not truncate directory \"%s\": apparent wraparound", ctl->Dir))); return; } diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index e17a3f3c37..86fe062030 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.153 2003/09/24 18:54:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.154 2003/09/25 06:57:57 petere Exp $ * * NOTES * Transaction aborts can now occur two ways: @@ -1425,7 +1425,7 @@ RequireTransactionChain(void *stmtNode, const char *stmtType) ereport(ERROR, (errcode(ERRCODE_NO_ACTIVE_SQL_TRANSACTION), /* translator: %s represents an SQL statement name */ - errmsg("%s may only be used in BEGIN/END transaction blocks", + errmsg("%s may only be used in transaction blocks", stmtType))); } diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index fd470c149b..32e7672945 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.122 2003/08/04 02:39:57 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.123 2003/09/25 06:57:57 petere Exp $ * *------------------------------------------------------------------------- */ @@ -1046,7 +1046,7 @@ XLogWrite(XLogwrtRqst WriteRqst) if (close(openLogFile) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("close of log file %u, segment %u failed: %m", + errmsg("could not close log file %u, segment %u: %m", openLogId, openLogSeg))); openLogFile = -1; } @@ -1102,7 +1102,7 @@ XLogWrite(XLogwrtRqst WriteRqst) if (lseek(openLogFile, (off_t) openLogOff, SEEK_SET) < 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("lseek of log file %u, segment %u, offset %u failed: %m", + errmsg("could not seek in log file %u, segment %u to offset %u: %m", openLogId, openLogSeg, openLogOff))); } @@ -1116,7 +1116,7 @@ XLogWrite(XLogwrtRqst WriteRqst) errno = ENOSPC; ereport(PANIC, (errcode_for_file_access(), - errmsg("write of log file %u, segment %u, offset %u failed: %m", + errmsg("could not write to log file %u, segment %u at offset %u: %m", openLogId, openLogSeg, openLogOff))); } openLogOff += BLCKSZ; @@ -1162,7 +1162,7 @@ XLogWrite(XLogwrtRqst WriteRqst) if (close(openLogFile) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("close of log file %u, segment %u failed: %m", + errmsg("could not close log file %u, segment %u: %m", openLogId, openLogSeg))); openLogFile = -1; } @@ -1360,7 +1360,7 @@ XLogFileInit(uint32 log, uint32 seg, if (errno != ENOENT) ereport(PANIC, (errcode_for_file_access(), - errmsg("open of \"%s\" (log file %u, segment %u) failed: %m", + errmsg("could not open file \"%s\" (log file %u, segment %u): %m", path, log, seg))); } else @@ -1384,7 +1384,7 @@ XLogFileInit(uint32 log, uint32 seg, if (fd < 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("creation of file \"%s\" failed: %m", tmppath))); + errmsg("could not create file \"%s\": %m", tmppath))); /* * Zero-fill the file. We have to do this the hard way to ensure that @@ -1413,14 +1413,14 @@ XLogFileInit(uint32 log, uint32 seg, ereport(PANIC, (errcode_for_file_access(), - errmsg("failed to write \"%s\": %m", tmppath))); + errmsg("could not write to file \"%s\": %m", tmppath))); } } if (pg_fsync(fd) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("fsync of file \"%s\" failed: %m", tmppath))); + errmsg("could not fsync file \"%s\": %m", tmppath))); close(fd); @@ -1449,7 +1449,7 @@ XLogFileInit(uint32 log, uint32 seg, if (fd < 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("open of \"%s\" (log file %u, segment %u) failed: %m", + errmsg("could not open file \"%s\" (log file %u, segment %u): %m", path, log, seg))); return (fd); @@ -1527,14 +1527,14 @@ InstallXLogFileSegment(uint32 log, uint32 seg, char *tmppath, if (link(tmppath, path) < 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("link from \"%s\" to \"%s\" (initialization of log file %u, segment %u) failed: %m", + errmsg("could not link file \"%s\" to \"%s\" (initialization of log file %u, segment %u): %m", tmppath, path, log, seg))); unlink(tmppath); #else if (rename(tmppath, path) < 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("rename from \"%s\" to \"%s\" (initialization of log file %u, segment %u) failed: %m", + errmsg("could not rename file \"%s\" to \"%s\" (initialization of log file %u, segment %u): %m", tmppath, path, log, seg))); #endif @@ -1563,13 +1563,13 @@ XLogFileOpen(uint32 log, uint32 seg, bool econt) { ereport(LOG, (errcode_for_file_access(), - errmsg("open of \"%s\" (log file %u, segment %u) failed: %m", + errmsg("could not open file \"%s\" (log file %u, segment %u): %m", path, log, seg))); return (fd); } ereport(PANIC, (errcode_for_file_access(), - errmsg("open of \"%s\" (log file %u, segment %u) failed: %m", + errmsg("could not open file \"%s\" (log file %u, segment %u): %m", path, log, seg))); } @@ -1746,7 +1746,7 @@ RecordIsValid(XLogRecord *record, XLogRecPtr recptr, int emode) if (!EQ_CRC64(record->xl_crc, crc)) { ereport(emode, - (errmsg("bad resource manager data checksum in record at %X/%X", + (errmsg("incorrect resource manager data checksum in record at %X/%X", recptr.xlogid, recptr.xrecoff))); return (false); } @@ -1769,7 +1769,7 @@ RecordIsValid(XLogRecord *record, XLogRecPtr recptr, int emode) if (!EQ_CRC64(cbuf, crc)) { ereport(emode, - (errmsg("bad checksum of backup block %d in record at %X/%X", + (errmsg("incorrect checksum of backup block %d in record at %X/%X", i + 1, recptr.xlogid, recptr.xrecoff))); return (false); } @@ -1864,7 +1864,7 @@ ReadRecord(XLogRecPtr *RecPtr, int emode, char *buffer) { ereport(emode, (errcode_for_file_access(), - errmsg("lseek of log file %u, segment %u, offset %u failed: %m", + errmsg("could not seek in log file %u, segment %u to offset %u: %m", readId, readSeg, readOff))); goto next_record_is_invalid; } @@ -1872,7 +1872,7 @@ ReadRecord(XLogRecPtr *RecPtr, int emode, char *buffer) { ereport(emode, (errcode_for_file_access(), - errmsg("read of log file %u, segment %u, offset %u failed: %m", + errmsg("could not read from log file %u, segment %u at offset %u: %m", readId, readSeg, readOff))); goto next_record_is_invalid; } @@ -1930,7 +1930,7 @@ got_record:; if (record->xl_rmid > RM_MAX_ID) { ereport(emode, - (errmsg("invalid resource manager id %u at %X/%X", + (errmsg("invalid resource manager ID %u at %X/%X", record->xl_rmid, RecPtr->xlogid, RecPtr->xrecoff))); goto next_record_is_invalid; } @@ -1962,7 +1962,7 @@ got_record:; { ereport(emode, (errcode_for_file_access(), - errmsg("read of log file %u, segment %u, offset %u failed: %m", + errmsg("could not read log file %u, segment %u, offset %u: %m", readId, readSeg, readOff))); goto next_record_is_invalid; } @@ -2191,13 +2191,13 @@ WriteControlFile(void) errno = ENOSPC; ereport(PANIC, (errcode_for_file_access(), - errmsg("write to control file failed: %m"))); + errmsg("could not write to control file: %m"))); } if (pg_fsync(fd) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("fsync of control file failed: %m"))); + errmsg("could not fsync of control file: %m"))); close(fd); } @@ -2221,7 +2221,7 @@ ReadControlFile(void) if (read(fd, ControlFile, sizeof(ControlFileData)) != sizeof(ControlFileData)) ereport(PANIC, (errcode_for_file_access(), - errmsg("read from control file failed: %m"))); + errmsg("could not read from control file: %m"))); close(fd); @@ -2247,7 +2247,7 @@ ReadControlFile(void) if (!EQ_CRC64(crc, ControlFile->crc)) ereport(FATAL, - (errmsg("invalid checksum in control file"))); + (errmsg("incorrect checksum in control file"))); /* * Do compatibility checking immediately. We do this here for 2 @@ -2368,13 +2368,13 @@ UpdateControlFile(void) errno = ENOSPC; ereport(PANIC, (errcode_for_file_access(), - errmsg("write to control file failed: %m"))); + errmsg("could not write to control file: %m"))); } if (pg_fsync(fd) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("fsync of control file failed: %m"))); + errmsg("could not fsync control file: %m"))); close(fd); } @@ -2516,13 +2516,13 @@ BootStrapXLOG(void) errno = ENOSPC; ereport(PANIC, (errcode_for_file_access(), - errmsg("failed to write bootstrap xlog file: %m"))); + errmsg("could not write bootstrap transaction log file: %m"))); } if (pg_fsync(openLogFile) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("failed to fsync bootstrap xlog file: %m"))); + errmsg("could not fsync bootstrap transaction log file: %m"))); close(openLogFile); openLogFile = -1; @@ -2654,11 +2654,11 @@ StartupXLOG(void) checkPoint.undo.xlogid, checkPoint.undo.xrecoff, wasShutdown ? "TRUE" : "FALSE"))); ereport(LOG, - (errmsg("next transaction id: %u; next oid: %u", + (errmsg("next transaction ID: %u; next OID: %u", checkPoint.nextXid, checkPoint.nextOid))); if (!TransactionIdIsNormal(checkPoint.nextXid)) ereport(PANIC, - (errmsg("invalid next transaction id"))); + (errmsg("invalid next transaction ID"))); ShmemVariableCache->nextXid = checkPoint.nextXid; ShmemVariableCache->nextOid = checkPoint.nextOid; @@ -2976,10 +2976,12 @@ ReadCheckpointRecord(XLogRecPtr RecPtr, if (!XRecOffIsValid(RecPtr.xrecoff)) { - ereport(LOG, - /* translator: %s is "primary" or "secondary" */ - (errmsg("invalid %s checkpoint link in control file", - (whichChkpt == 1) ? gettext("primary") : gettext("secondary")))); + if (whichChkpt == 1) + ereport(LOG, + (errmsg("invalid primary checkpoint link in control file"))); + else + ereport(LOG, + (errmsg("invalid secondary checkpoint link in control file"))); return NULL; } @@ -2987,35 +2989,43 @@ ReadCheckpointRecord(XLogRecPtr RecPtr, if (record == NULL) { - ereport(LOG, - /* translator: %s is "primary" or "secondary" */ - (errmsg("invalid %s checkpoint record", - (whichChkpt == 1) ? gettext("primary") : gettext("secondary")))); + if (whichChkpt == 1) + ereport(LOG, + (errmsg("invalid primary checkpoint record"))); + else + ereport(LOG, + (errmsg("invalid secondary checkpoint record"))); return NULL; } if (record->xl_rmid != RM_XLOG_ID) { - ereport(LOG, - /* translator: %s is "primary" or "secondary" */ - (errmsg("invalid resource manager id in %s checkpoint record", - (whichChkpt == 1) ? gettext("primary") : gettext("secondary")))); + if (whichChkpt == 1) + ereport(LOG, + (errmsg("invalid resource manager ID in primary checkpoint record"))); + else + ereport(LOG, + (errmsg("invalid resource manager ID in secondary checkpoint record"))); return NULL; } if (record->xl_info != XLOG_CHECKPOINT_SHUTDOWN && record->xl_info != XLOG_CHECKPOINT_ONLINE) { - ereport(LOG, - /* translator: %s is "primary" or "secondary" */ - (errmsg("invalid xl_info in %s checkpoint record", - (whichChkpt == 1) ? gettext("primary") : gettext("secondary")))); + if (whichChkpt == 1) + ereport(LOG, + (errmsg("invalid xl_info in primary checkpoint record"))); + else + ereport(LOG, + (errmsg("invalid xl_info in secondary checkpoint record"))); return NULL; } if (record->xl_len != sizeof(CheckPoint)) { - ereport(LOG, - /* translator: %s is "primary" or "secondary" */ - (errmsg("invalid length of %s checkpoint record", - (whichChkpt == 1) ? gettext("primary") : gettext("secondary")))); + if (whichChkpt == 1) + ereport(LOG, + (errmsg("invalid length of primary checkpoint record"))); + else + ereport(LOG, + (errmsg("invalid length of secondary checkpoint record"))); return NULL; } return record; @@ -3545,14 +3555,14 @@ assign_xlog_sync_method(const char *method, bool doit, bool interactive) if (pg_fsync(openLogFile) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("fsync of log file %u, segment %u failed: %m", + errmsg("could not fsync log file %u, segment %u: %m", openLogId, openLogSeg))); if (open_sync_bit != new_sync_bit) { if (close(openLogFile) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("close of log file %u, segment %u failed: %m", + errmsg("could not close log file %u, segment %u: %m", openLogId, openLogSeg))); openLogFile = -1; } @@ -3577,7 +3587,7 @@ issue_xlog_fsync(void) if (pg_fsync(openLogFile) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("fsync of log file %u, segment %u failed: %m", + errmsg("could not fsync log file %u, segment %u: %m", openLogId, openLogSeg))); break; #ifdef HAVE_FDATASYNC @@ -3585,7 +3595,7 @@ issue_xlog_fsync(void) if (pg_fdatasync(openLogFile) != 0) ereport(PANIC, (errcode_for_file_access(), - errmsg("fdatasync of log file %u, segment %u failed: %m", + errmsg("could not fdatasync log file %u, segment %u: %m", openLogId, openLogSeg))); break; #endif diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index ce189ff903..ada1d23f51 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.252 2003/09/19 21:04:19 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.253 2003/09/25 06:57:57 petere Exp $ * * * INTERFACE ROUTINES @@ -426,7 +426,7 @@ CheckAttributeType(const char *attname, Oid atttypid) if (atttypid == UNKNOWNOID) ereport(WARNING, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("attribute \"%s\" has type UNKNOWN", attname), + errmsg("column \"%s\" has type \"unknown\"", attname), errdetail("Proceeding with relation creation anyway."))); else if (att_typtype == 'p') { @@ -434,7 +434,7 @@ CheckAttributeType(const char *attname, Oid atttypid) if (atttypid != ANYARRAYOID || IsUnderPostmaster) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("attribute \"%s\" has pseudo-type %s", + errmsg("column \"%s\" has pseudo-type %s", attname, format_type_be(atttypid)))); } else if (att_typtype == 'c') @@ -444,7 +444,7 @@ CheckAttributeType(const char *attname, Oid atttypid) if (get_rel_relkind(typrelid) == RELKIND_COMPOSITE_TYPE) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("attribute \"%s\" has composite type %s", + errmsg("column \"%s\" has composite type %s", attname, format_type_be(atttypid)))); } } @@ -1569,7 +1569,7 @@ AddRelationRawConstraints(Relation rel, if (strcmp(cdef2->name, ccname) == 0) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("CHECK constraint \"%s\" already exists", + errmsg("check constraint \"%s\" already exists", ccname))); } } @@ -1631,7 +1631,7 @@ AddRelationRawConstraints(Relation rel, if (length(pstate->p_rtable) != 1) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("only relation \"%s\" can be referenced in CHECK constraint", + errmsg("only table \"%s\" can be referenced in check constraint", relname))); /* @@ -1640,11 +1640,11 @@ AddRelationRawConstraints(Relation rel, if (pstate->p_hasSubLinks) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use sub-select in CHECK constraint"))); + errmsg("cannot use subquery in check constraint"))); if (pstate->p_hasAggs) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), - errmsg("cannot use aggregate in CHECK constraint"))); + errmsg("cannot use aggregate function in check constraint"))); /* * Constraints are evaluated with execQual, which expects an @@ -1751,7 +1751,7 @@ cookDefault(ParseState *pstate, if (contain_var_clause(expr)) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("cannot use column references in DEFAULT clause"))); + errmsg("cannot use column references in default expression"))); /* * It can't return a set either. @@ -1759,7 +1759,7 @@ cookDefault(ParseState *pstate, if (expression_returns_set(expr)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("DEFAULT clause must not return a set"))); + errmsg("default expression must not return a set"))); /* * No subplans or aggregates, either... @@ -1767,11 +1767,11 @@ cookDefault(ParseState *pstate, if (pstate->p_hasSubLinks) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use sub-select in DEFAULT clause"))); + errmsg("cannot use subquery in default expression"))); if (pstate->p_hasAggs) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), - errmsg("cannot use aggregate in DEFAULT clause"))); + errmsg("cannot use aggregate function in default expression"))); /* * Coerce the expression to the correct type and typmod, if given. diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index ed560fb891..d8c2de188a 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.217 2003/09/24 18:54:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.218 2003/09/25 06:57:57 petere Exp $ * * * INTERFACE ROUTINES @@ -502,7 +502,7 @@ index_create(Oid heapRelationId, IsNormalProcessingMode()) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("user-defined indexes on system catalogs are not supported"))); + errmsg("user-defined indexes on system catalog tables are not supported"))); /* * We cannot allow indexing a shared relation after initdb (because diff --git a/src/backend/catalog/namespace.c b/src/backend/catalog/namespace.c index 281e50f1fc..8955de675f 100644 --- a/src/backend/catalog/namespace.c +++ b/src/backend/catalog/namespace.c @@ -13,7 +13,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.57 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/namespace.c,v 1.58 2003/09/25 06:57:57 petere Exp $ * *------------------------------------------------------------------------- */ @@ -226,7 +226,7 @@ RangeVarGetCreationNamespace(const RangeVar *newRelation) if (newRelation->schemaname) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("TEMP tables may not specify a schema name"))); + errmsg("temporary tables may not specify a schema name"))); /* Initialize temp namespace if first time through */ if (!OidIsValid(myTempNamespace)) InitTempTableNamespace(); @@ -1625,7 +1625,7 @@ InitTempTableNamespace(void) ACL_CREATE_TEMP) != ACLCHECK_OK) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to create temp tables in database \"%s\"", + errmsg("permission denied to create temporary tables in database \"%s\"", get_database_name(MyDatabaseId)))); snprintf(namespaceName, sizeof(namespaceName), "pg_temp_%d", MyBackendId); diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c index 42ac6c10d0..4a20b1e742 100644 --- a/src/backend/catalog/pg_aggregate.c +++ b/src/backend/catalog/pg_aggregate.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.63 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.64 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -77,9 +77,9 @@ AggregateCreate(const char *aggName, !(aggBaseType == ANYARRAYOID || aggBaseType == ANYELEMENTOID)) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("cannot determine transition datatype"), - errdetail("An aggregate using ANYARRAY or ANYELEMENT as " - "trans type must have one of them as its base type."))); + errmsg("cannot determine transition data type"), + errdetail("An aggregate using \"anyarray\" or \"anyelement\" as " + "transition type must have one of them as its base type."))); /* handle transfn */ MemSet(fnArgs, 0, FUNC_MAX_ARGS * sizeof(Oid)); @@ -129,7 +129,7 @@ AggregateCreate(const char *aggName, if (!IsBinaryCoercible(aggBaseType, aggTransType)) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("must not omit initval when transfn is strict and transtype is not compatible with input type"))); + errmsg("must not omit initial value when transition function is strict and transition type is not compatible with input type"))); } ReleaseSysCache(tup); @@ -162,8 +162,8 @@ AggregateCreate(const char *aggName, !(aggBaseType == ANYARRAYOID || aggBaseType == ANYELEMENTOID)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("cannot determine result datatype"), - errdetail("An aggregate returning ANYARRAY or ANYELEMENT " + errmsg("cannot determine result data type"), + errdetail("An aggregate returning \"anyarray\" or \"anyelement\" " "must have one of them as its base type."))); /* diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c index bf936c5138..c6703c26ce 100644 --- a/src/backend/catalog/pg_operator.c +++ b/src/backend/catalog/pg_operator.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.83 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.84 2003/09/25 06:57:58 petere Exp $ * * NOTES * these routines moved here from commands/define.c and somewhat cleaned up. @@ -429,7 +429,7 @@ OperatorCreate(const char *operatorName, if (leftSortName || rightSortName || ltCompareName || gtCompareName) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("only binary operators can mergejoin"))); + errmsg("only binary operators can merge join"))); } operatorObjectId = OperatorGet(operatorName, diff --git a/src/backend/catalog/pg_proc.c b/src/backend/catalog/pg_proc.c index 323fc8e68c..0734e479fc 100644 --- a/src/backend/catalog/pg_proc.c +++ b/src/backend/catalog/pg_proc.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.105 2003/08/11 20:46:46 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.106 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -109,8 +109,8 @@ ProcedureCreate(const char *procedureName, if (!genericParam) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("cannot determine result datatype"), - errdetail("A function returning ANYARRAY or ANYELEMENT must have at least one argument of either type."))); + errmsg("cannot determine result data type"), + errdetail("A function returning \"anyarray\" or \"anyelement\" must have at least one argument of either type."))); } /* Make sure we have a zero-padded param type array */ diff --git a/src/backend/commands/aggregatecmds.c b/src/backend/commands/aggregatecmds.c index 08715a1638..bad73c573f 100644 --- a/src/backend/commands/aggregatecmds.c +++ b/src/backend/commands/aggregatecmds.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/aggregatecmds.c,v 1.14 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/aggregatecmds.c,v 1.15 2003/09/25 06:57:58 petere Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -135,7 +135,7 @@ DefineAggregate(List *names, List *parameters) transTypeId != ANYELEMENTOID) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("aggregate transition datatype cannot be %s", + errmsg("aggregate transition data type cannot be %s", format_type_be(transTypeId)))); /* diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c index fd93badc55..2e9a7174a3 100644 --- a/src/backend/commands/analyze.c +++ b/src/backend/commands/analyze.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.62 2003/09/11 23:12:31 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.63 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -197,7 +197,7 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt) /* No need for a WARNING if we already complained during VACUUM */ if (!vacstmt->vacuum) ereport(WARNING, - (errmsg("skipping \"%s\" --- only table or database owner can ANALYZE it", + (errmsg("skipping \"%s\" --- only table or database owner can analyze it", RelationGetRelationName(onerel)))); relation_close(onerel, AccessShareLock); return; @@ -212,7 +212,7 @@ analyze_rel(Oid relid, VacuumStmt *vacstmt) /* No need for a WARNING if we already complained during VACUUM */ if (!vacstmt->vacuum) ereport(WARNING, - (errmsg("skipping \"%s\" --- cannot ANALYZE indexes, views or special system tables", + (errmsg("skipping \"%s\" --- cannot analyze indexes, views, or special system tables", RelationGetRelationName(onerel)))); relation_close(onerel, AccessShareLock); return; diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index 6056a195e7..a3f9ae8aac 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.115 2003/08/08 21:41:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.116 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -349,7 +349,7 @@ cluster_rel(RelToCluster *rvtc, bool recheck) if (!OldHeap->rd_att->attrs[colno - 1]->attnotnull) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot cluster when index access method does not handle nulls"), + errmsg("cannot cluster when index access method does not handle null values"), errhint("You may be able to work around this by marking column \"%s\" NOT NULL.", NameStr(OldHeap->rd_att->attrs[colno - 1]->attname)))); } @@ -362,7 +362,7 @@ cluster_rel(RelToCluster *rvtc, bool recheck) /* index expression, lose... */ ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot cluster on expressional index when index access method does not handle nulls"))); + errmsg("cannot cluster on expressional index when index access method does not handle null values"))); } } @@ -386,7 +386,7 @@ cluster_rel(RelToCluster *rvtc, bool recheck) if (isOtherTempNamespace(RelationGetNamespace(OldHeap))) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot cluster temp tables of other processes"))); + errmsg("cannot cluster temporary tables of other sessions"))); /* Drop relcache refcnt on OldIndex, but keep lock */ index_close(OldIndex); diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c index df09337d72..e133ef5dd2 100644 --- a/src/backend/commands/comment.c +++ b/src/backend/commands/comment.c @@ -7,7 +7,7 @@ * Copyright (c) 1996-2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.70 2003/08/11 20:46:46 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.71 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -306,28 +306,28 @@ CommentRelation(int objtype, List *relname, char *comment) if (relation->rd_rel->relkind != RELKIND_INDEX) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("relation \"%s\" is not an index", + errmsg("\"%s\" is not an index", RelationGetRelationName(relation)))); break; case OBJECT_SEQUENCE: if (relation->rd_rel->relkind != RELKIND_SEQUENCE) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("relation \"%s\" is not a sequence", + errmsg("\"%s\" is not a sequence", RelationGetRelationName(relation)))); break; case OBJECT_TABLE: if (relation->rd_rel->relkind != RELKIND_RELATION) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("relation \"%s\" is not a table", + errmsg("\"%s\" is not a table", RelationGetRelationName(relation)))); break; case OBJECT_VIEW: if (relation->rd_rel->relkind != RELKIND_VIEW) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("relation \"%s\" is not a view", + errmsg("\"%s\" is not a view", RelationGetRelationName(relation)))); break; } @@ -383,7 +383,7 @@ CommentAttribute(List *qualname, char *comment) if (attnum == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", attrname, RelationGetRelationName(relation)))); /* Create the comment using the relation's oid */ @@ -569,7 +569,7 @@ CommentRule(List *qualname, char *comment) ForwardScanDirection))) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("there are multiple rules \"%s\"", rulename), + errmsg("there are multiple rules named \"%s\"", rulename), errhint("Specify a relation name as well as a rule name."))); heap_endscan(scanDesc); @@ -812,7 +812,7 @@ CommentTrigger(List *qualname, char *comment) if (!HeapTupleIsValid(triggertuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("trigger \"%s\" for relation \"%s\" does not exist", + errmsg("trigger \"%s\" for table \"%s\" does not exist", trigname, RelationGetRelationName(relation)))); oid = HeapTupleGetOid(triggertuple); @@ -891,7 +891,7 @@ CommentConstraint(List *qualname, char *comment) if (OidIsValid(conOid)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("relation \"%s\" has multiple constraints named \"%s\"", + errmsg("table \"%s\" has multiple constraints named \"%s\"", RelationGetRelationName(relation), conName))); conOid = HeapTupleGetOid(tuple); } @@ -903,7 +903,7 @@ CommentConstraint(List *qualname, char *comment) if (!OidIsValid(conOid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("constraint \"%s\" for relation \"%s\" does not exist", + errmsg("constraint \"%s\" for table \"%s\" does not exist", conName, RelationGetRelationName(relation)))); /* Create the comment with the pg_constraint oid */ diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index aa50e1dec5..faf982167b 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.210 2003/08/28 13:52:34 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.211 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -282,7 +282,7 @@ CopySendData(void *databuf, int datasize) if (ferror(copy_file)) ereport(ERROR, (errcode_for_file_access(), - errmsg("failed to write COPY file: %m"))); + errmsg("could not write to COPY file: %m"))); break; case COPY_OLD_FE: if (pq_putbytes((char *) databuf, datasize)) @@ -2064,7 +2064,7 @@ CopyGetAttnums(Relation rel, List *attnamelist) if (intMember(attnum, attnums)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("attribute \"%s\" specified more than once", + errmsg("column \"%s\" specified more than once", name))); attnums = lappendi(attnums, attnum); } diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c index 3227e300d2..4710cec67a 100644 --- a/src/backend/commands/dbcommands.c +++ b/src/backend/commands/dbcommands.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.122 2003/09/10 20:24:09 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.123 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -228,7 +228,7 @@ createdb(const CreatedbStmt *stmt) src_dbpath)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_DATABASE), - errmsg("template \"%s\" does not exist", dbtemplate))); + errmsg("template database \"%s\" does not exist", dbtemplate))); /* * Permission check: to copy a DB that's not marked datistemplate, you @@ -271,7 +271,7 @@ createdb(const CreatedbStmt *stmt) if (!PG_VALID_BE_ENCODING(encoding)) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("invalid backend encoding %d", encoding))); + errmsg("invalid server encoding %d", encoding))); /* * Preassign OID for pg_database tuple, so that we can compute db @@ -339,7 +339,7 @@ createdb(const CreatedbStmt *stmt) if (rmdir(target_dir) != 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not remove temp directory \"%s\": %m", + errmsg("could not remove temporary directory \"%s\": %m", target_dir))); /* Make the symlink, if needed */ @@ -350,7 +350,7 @@ createdb(const CreatedbStmt *stmt) #endif ereport(ERROR, (errcode_for_file_access(), - errmsg("could not link \"%s\" to \"%s\": %m", + errmsg("could not link file \"%s\" to \"%s\": %m", nominal_loc, alt_loc))); } @@ -911,7 +911,7 @@ resolve_alt_dbpath(const char *dbpath, Oid dboid) if (len >= MAXPGPATH - 100) ereport(ERROR, (errcode(ERRCODE_INVALID_NAME), - errmsg("alternate path is too long"))); + errmsg("alternative path is too long"))); ret = palloc(len); snprintf(ret, len, "%s/base/%u", prefix, dboid); @@ -942,7 +942,7 @@ remove_dbdirs(const char *nominal_loc, const char *alt_loc) { ereport(WARNING, (errcode_for_file_access(), - errmsg("could not remove \"%s\": %m", nominal_loc))); + errmsg("could not remove file \"%s\": %m", nominal_loc))); success = false; } } diff --git a/src/backend/commands/functioncmds.c b/src/backend/commands/functioncmds.c index 328643c171..5843183512 100644 --- a/src/backend/commands/functioncmds.c +++ b/src/backend/commands/functioncmds.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.35 2003/09/24 18:54:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/functioncmds.c,v 1.36 2003/09/25 06:57:58 petere Exp $ * * DESCRIPTION * These routines take the parse tree and pick out the @@ -450,7 +450,7 @@ CreateFunction(CreateFunctionStmt *stmt) strcmp(languageName, "plsh") == 0 || strcmp(languageName, "pltcl") == 0 || strcmp(languageName, "pltclu") == 0) ? - errhint("You need to use 'createlang' to load the language into the database.") : 0)); + errhint("You need to use \"createlang\" to load the language into the database.") : 0)); languageOid = HeapTupleGetOid(languageTuple); languageStruct = (Form_pg_language) GETSTRUCT(languageTuple); diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index c8ccab8d4e..8ded744b67 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.109 2003/09/24 18:54:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.110 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -89,11 +89,11 @@ DefineIndex(RangeVar *heapRelation, if (numberOfAttributes <= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("must specify at least one attribute"))); + errmsg("must specify at least one column"))); if (numberOfAttributes > INDEX_MAX_KEYS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_COLUMNS), - errmsg("cannot use more than %d attributes in an index", + errmsg("cannot use more than %d columns in an index", INDEX_MAX_KEYS))); /* @@ -149,12 +149,12 @@ DefineIndex(RangeVar *heapRelation, if (unique && !accessMethodForm->amcanunique) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("access method \"%s\" does not support UNIQUE indexes", + errmsg("access method \"%s\" does not support unique indexes", accessMethodName))); if (numberOfAttributes > 1 && !accessMethodForm->amcanmulticol) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("access method \"%s\" does not support multi-column indexes", + errmsg("access method \"%s\" does not support multicolumn indexes", accessMethodName))); ReleaseSysCache(tuple); @@ -288,7 +288,7 @@ CheckPredicate(List *predList) if (contain_subplans((Node *) predList)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use sub-select in index predicate"))); + errmsg("cannot use subquery in index predicate"))); if (contain_agg_clause((Node *) predList)) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), @@ -334,7 +334,7 @@ ComputeIndexAttrs(IndexInfo *indexInfo, if (!HeapTupleIsValid(atttuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" does not exist", + errmsg("column \"%s\" does not exist", attribute->name))); attform = (Form_pg_attribute) GETSTRUCT(atttuple); indexInfo->ii_KeyAttrNumbers[attn] = attform->attnum; @@ -366,11 +366,11 @@ ComputeIndexAttrs(IndexInfo *indexInfo, if (contain_subplans(attribute->expr)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use sub-select in index expression"))); + errmsg("cannot use subquery in index expression"))); if (contain_agg_clause(attribute->expr)) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), - errmsg("cannot use aggregate in index expression"))); + errmsg("cannot use aggregate function in index expression"))); /* * A expression using mutable functions is probably wrong, @@ -572,7 +572,7 @@ RemoveIndex(RangeVar *relation, DropBehavior behavior) if (relkind != RELKIND_INDEX) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("relation \"%s\" is not an index", + errmsg("\"%s\" is not an index", relation->relname))); object.classId = RelOid_pg_class; @@ -602,7 +602,7 @@ ReindexIndex(RangeVar *indexRelation, bool force /* currently unused */ ) if (((Form_pg_class) GETSTRUCT(tuple))->relkind != RELKIND_INDEX) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("relation \"%s\" is not an index", + errmsg("\"%s\" is not an index", indexRelation->relname))); /* Check permissions */ diff --git a/src/backend/commands/opclasscmds.c b/src/backend/commands/opclasscmds.c index 8d38df1fbd..abccad1078 100644 --- a/src/backend/commands/opclasscmds.c +++ b/src/backend/commands/opclasscmds.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/opclasscmds.c,v 1.19 2003/09/11 02:40:13 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/opclasscmds.c,v 1.20 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -238,7 +238,7 @@ DefineOpClass(CreateOpClassStmt *stmt) if (amoid != GIST_AM_OID) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("storage type may not be different from datatype for access method \"%s\"", + errmsg("storage type may not be different from data type for access method \"%s\"", stmt->amname))); } } diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c index 772c10473a..475a76c78b 100644 --- a/src/backend/commands/proclang.c +++ b/src/backend/commands/proclang.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/proclang.c,v 1.49 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/proclang.c,v 1.50 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -93,14 +93,14 @@ CreateProceduralLanguage(CreatePLangStmt *stmt) { ereport(NOTICE, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("changing return type of function %s() from OPAQUE to LANGUAGE_HANDLER", + errmsg("changing return type of function %s from \"opaque\" to \"language_handler\"", NameListToString(stmt->plhandler)))); SetFunctionReturnType(procOid, LANGUAGE_HANDLEROID); } else ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("function %s() must return LANGUAGE_HANDLER", + errmsg("function %s must return type \"language_handler\"", NameListToString(stmt->plhandler)))); } diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c index c62f4a71c5..6bc59ca9fb 100644 --- a/src/backend/commands/sequence.c +++ b/src/backend/commands/sequence.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.102 2003/08/08 21:41:32 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.103 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -495,7 +495,7 @@ nextval(PG_FUNCTION_ARGS) snprintf(buf, sizeof(buf), INT64_FORMAT, maxv); ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("%s.nextval: reached MAXVALUE (%s)", + errmsg("nextval: reached maximum value of sequence \"%s\" (%s)", sequence->relname, buf))); } next = minv; @@ -518,7 +518,7 @@ nextval(PG_FUNCTION_ARGS) snprintf(buf, sizeof(buf), INT64_FORMAT, minv); ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("%s.nextval: reached MINVALUE (%s)", + errmsg("nextval: reached minimum value of sequence \"%s\" (%s)", sequence->relname, buf))); } next = maxv; @@ -616,7 +616,7 @@ currval(PG_FUNCTION_ARGS) if (elm->increment == 0) /* nextval/read_info were not called */ ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("%s.currval is not yet defined in this session", + errmsg("currval of sequence \"%s\" is not yet defined in this session", sequence->relname))); result = elm->last; @@ -670,8 +670,8 @@ do_setval(RangeVar *sequence, int64 next, bool iscalled) snprintf(bufx, sizeof(bufx), INT64_FORMAT, seq->max_value); ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("%s.setval: value %s is out of bounds (%s..%s)", - sequence->relname, bufv, bufm, bufx))); + errmsg("setval: value %s is out of bounds for sequence \"%s\" (%s..%s)", + bufv, sequence->relname, bufm, bufx))); } /* save info in local cache */ @@ -955,7 +955,7 @@ init_params(List *options, Form_pg_sequence new) if (new->increment_by == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("cannot increment by zero"))); + errmsg("INCREMENT must not be zero"))); } /* MAXVALUE */ diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index fc8a87123f..d223a5ba3e 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.82 2003/09/19 21:04:20 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.83 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -147,7 +147,7 @@ DefineRelation(CreateStmt *stmt, char relkind) if (stmt->oncommit != ONCOMMIT_NOOP && !stmt->relation->istemp) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("ON COMMIT can only be used on TEMP tables"))); + errmsg("ON COMMIT can only be used on temporary tables"))); /* * Look up the namespace in which we are supposed to create the @@ -207,7 +207,7 @@ DefineRelation(CreateStmt *stmt, char relkind) if (strcmp(check[i].ccname, cdef->name) == 0) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_OBJECT), - errmsg("duplicate CHECK constraint name \"%s\"", + errmsg("duplicate check constraint name \"%s\"", cdef->name))); } check[ncheck].ccname = cdef->name; @@ -394,7 +394,7 @@ TruncateRelation(const RangeVar *relation) if (isOtherTempNamespace(RelationGetNamespace(rel))) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot truncate temp tables of other processes"))); + errmsg("cannot truncate temporary tables of other sessions"))); /* * Don't allow truncate on tables which are referenced by foreign keys @@ -506,7 +506,7 @@ MergeAttributes(List *schema, List *supers, bool istemp, if (strcmp(coldef->colname, restdef->colname) == 0) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("attribute \"%s\" duplicated", + errmsg("column \"%s\" duplicated", coldef->colname))); } } @@ -608,14 +608,14 @@ MergeAttributes(List *schema, List *supers, bool istemp, * have the same type and typmod. */ ereport(NOTICE, - (errmsg("merging multiple inherited definitions of attribute \"%s\"", + (errmsg("merging multiple inherited definitions of column \"%s\"", attributeName))); def = (ColumnDef *) nth(exist_attno - 1, inhSchema); if (typenameTypeId(def->typename) != attribute->atttypid || def->typename->typmod != attribute->atttypmod) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("inherited attribute \"%s\" has a type conflict", + errmsg("inherited column \"%s\" has a type conflict", attributeName), errdetail("%s versus %s", TypeNameToString(def->typename), @@ -763,14 +763,14 @@ MergeAttributes(List *schema, List *supers, bool istemp, * have the same type and typmod. */ ereport(NOTICE, - (errmsg("merging attribute \"%s\" with inherited definition", + (errmsg("merging column \"%s\" with inherited definition", attributeName))); def = (ColumnDef *) nth(exist_attno - 1, inhSchema); if (typenameTypeId(def->typename) != typenameTypeId(newdef->typename) || def->typename->typmod != newdef->typename->typmod) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("attribute \"%s\" has a type conflict", + errmsg("column \"%s\" has a type conflict", attributeName), errdetail("%s versus %s", TypeNameToString(def->typename), @@ -811,7 +811,7 @@ MergeAttributes(List *schema, List *supers, bool istemp, if (def->cooked_default == bogus_marker) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_DEFINITION), - errmsg("attribute \"%s\" inherits conflicting default values", + errmsg("column \"%s\" inherits conflicting default values", def->colname), errhint("To resolve the conflict, specify a default explicitly."))); } @@ -1158,7 +1158,7 @@ renameatt(Oid myrelid, find_inheritance_children(myrelid) != NIL) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("inherited attribute \"%s\" must be renamed in child tables too", + errmsg("inherited column \"%s\" must be renamed in child tables too", oldattname))); } @@ -1168,7 +1168,7 @@ renameatt(Oid myrelid, if (!HeapTupleIsValid(atttup)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" does not exist", + errmsg("column \"%s\" does not exist", oldattname))); attform = (Form_pg_attribute) GETSTRUCT(atttup); @@ -1176,7 +1176,7 @@ renameatt(Oid myrelid, if (attnum < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot rename system attribute \"%s\"", + errmsg("cannot rename system column \"%s\"", oldattname))); /* @@ -1186,7 +1186,7 @@ renameatt(Oid myrelid, if (attform->attinhcount > 0 && !recursing) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("cannot rename inherited attribute \"%s\"", + errmsg("cannot rename inherited column \"%s\"", oldattname))); /* should not already exist */ @@ -1197,7 +1197,7 @@ renameatt(Oid myrelid, 0, 0)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" already exists", + errmsg("column \"%s\" of relation \"%s\" already exists", newattname, RelationGetRelationName(targetrelation)))); namestrcpy(&(attform->attname), newattname); @@ -1751,7 +1751,7 @@ AlterTableAddColumn(Oid myrelid, if (find_inheritance_children(myrelid) != NIL) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("attribute must be added to child tables too"))); + errmsg("column must be added to child tables too"))); } /* @@ -1798,7 +1798,7 @@ AlterTableAddColumn(Oid myrelid, 0, 0)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" already exists", + errmsg("column \"%s\" of relation \"%s\" already exists", colDef->colname, RelationGetRelationName(rel)))); minattnum = ((Form_pg_class) GETSTRUCT(reltup))->relnatts; @@ -1983,14 +1983,14 @@ AlterTableAlterColumnDropNotNull(Oid myrelid, bool recurse, if (attnum == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", colName, RelationGetRelationName(rel)))); /* Prevent them from altering a system attribute */ if (attnum < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot alter system attribute \"%s\"", + errmsg("cannot alter system column \"%s\"", colName))); /* @@ -2026,7 +2026,7 @@ AlterTableAlterColumnDropNotNull(Oid myrelid, bool recurse, if (indexStruct->indkey[i] == attnum) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("attribute \"%s\" is in a primary key", + errmsg("column \"%s\" is in a primary key", colName))); } } @@ -2127,14 +2127,14 @@ AlterTableAlterColumnSetNotNull(Oid myrelid, bool recurse, if (attnum == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", colName, RelationGetRelationName(rel)))); /* Prevent them from altering a system attribute */ if (attnum < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot alter system attribute \"%s\"", + errmsg("cannot alter system column \"%s\"", colName))); /* @@ -2155,7 +2155,7 @@ AlterTableAlterColumnSetNotNull(Oid myrelid, bool recurse, if (isnull) ereport(ERROR, (errcode(ERRCODE_NOT_NULL_VIOLATION), - errmsg("attribute \"%s\" contains NULL values", + errmsg("column \"%s\" contains null values", colName))); } @@ -2255,14 +2255,14 @@ AlterTableAlterColumnDefault(Oid myrelid, bool recurse, if (attnum == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", colName, RelationGetRelationName(rel)))); /* Prevent them from altering a system attribute */ if (attnum < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot alter system attribute \"%s\"", + errmsg("cannot alter system column \"%s\"", colName))); /* @@ -2419,14 +2419,14 @@ AlterTableAlterColumnFlags(Oid myrelid, bool recurse, if (!HeapTupleIsValid(tuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", colName, RelationGetRelationName(rel)))); attrtuple = (Form_pg_attribute) GETSTRUCT(tuple); if (attrtuple->attnum < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot alter system attribute \"%s\"", + errmsg("cannot alter system column \"%s\"", colName))); /* @@ -2445,7 +2445,7 @@ AlterTableAlterColumnFlags(Oid myrelid, bool recurse, else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("column datatype %s can only have storage \"plain\"", + errmsg("column data type %s can only have storage PLAIN", format_type_be(attrtuple->atttypid)))); } @@ -2624,7 +2624,7 @@ AlterTableDropColumn(Oid myrelid, bool recurse, bool recursing, if (attnum == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", colName, RelationGetRelationName(rel)))); /* Can't drop a system attribute */ @@ -2632,7 +2632,7 @@ AlterTableDropColumn(Oid myrelid, bool recurse, bool recursing, if (attnum < 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot drop system attribute \"%s\"", + errmsg("cannot drop system column \"%s\"", colName))); /* Don't drop inherited columns */ @@ -2640,7 +2640,7 @@ AlterTableDropColumn(Oid myrelid, bool recurse, bool recursing, if (tupleDesc->attrs[attnum - 1]->attinhcount > 0 && !recursing) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("cannot drop inherited attribute \"%s\"", + errmsg("cannot drop inherited column \"%s\"", colName))); /* @@ -2967,7 +2967,7 @@ AlterTableAddCheckConstraint(Relation rel, Constraint *constr) if (length(pstate->p_rtable) != 1) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("CHECK constraint may only reference relation \"%s\"", + errmsg("check constraint may only reference relation \"%s\"", RelationGetRelationName(rel)))); /* @@ -2976,11 +2976,11 @@ AlterTableAddCheckConstraint(Relation rel, Constraint *constr) if (pstate->p_hasSubLinks) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use sub-select in CHECK constraint"))); + errmsg("cannot use subquery in check constraint"))); if (pstate->p_hasAggs) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), - errmsg("cannot use aggregate in CHECK constraint"))); + errmsg("cannot use aggregate function in check constraint"))); /* * Might as well try to reduce any constant expressions, so as to @@ -3031,8 +3031,8 @@ AlterTableAddCheckConstraint(Relation rel, Constraint *constr) if (!successful) ereport(ERROR, (errcode(ERRCODE_CHECK_VIOLATION), - errmsg("CHECK constraint \"%s\" is violated at some row(s)", - constr->name))); + errmsg("check constraint \"%s\" is violated by some row", + constr->name))); /* * Call AddRelationRawConstraints to do the real adding -- It @@ -3165,7 +3165,7 @@ AlterTableAddForeignKeyConstraint(Relation rel, FkConstraint *fkconstraint) if (numfks != numpks) ereport(ERROR, (errcode(ERRCODE_INVALID_FOREIGN_KEY), - errmsg("number of referencing and referenced attributes for foreign key disagree"))); + errmsg("number of referencing and referenced columns for foreign key disagree"))); for (i = 0; i < numpks; i++) { @@ -3315,7 +3315,7 @@ transformFkeyGetPrimaryKey(Relation pkrel, Oid *indexOid, if (indexStruct == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("there is no PRIMARY KEY for referenced table \"%s\"", + errmsg("there is no primary key for referenced table \"%s\"", RelationGetRelationName(pkrel)))); /* @@ -3429,7 +3429,7 @@ transformFkeyCheckAttrs(Relation pkrel, if (!found) ereport(ERROR, (errcode(ERRCODE_INVALID_FOREIGN_KEY), - errmsg("there is no UNIQUE constraint matching given keys for referenced table \"%s\"", + errmsg("there is no unique constraint matching given keys for referenced table \"%s\"", RelationGetRelationName(pkrel)))); freeList(indexoidlist); @@ -3594,7 +3594,7 @@ createForeignKeyTriggers(Relation rel, FkConstraint *fkconstraint, if (length(fk_attr) != length(pk_attr)) ereport(ERROR, (errcode(ERRCODE_INVALID_FOREIGN_KEY), - errmsg("number of referencing and referenced attributes for foreign key disagree"))); + errmsg("number of referencing and referenced columns for foreign key disagree"))); while (fk_attr != NIL) { @@ -4090,7 +4090,7 @@ AlterTableCreateToastTable(Oid relOid, bool silent) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("relation \"%s\" already has a toast table", + errmsg("relation \"%s\" already has a TOAST table", RelationGetRelationName(rel)))); } @@ -4107,7 +4107,7 @@ AlterTableCreateToastTable(Oid relOid, bool silent) ereport(ERROR, (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("relation \"%s\" does not need a toast table", + errmsg("relation \"%s\" does not need a TOAST table", RelationGetRelationName(rel)))); } diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 3e49f5add3..d686881865 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.156 2003/08/08 21:41:32 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.157 2003/09/25 06:57:58 petere Exp $ * *------------------------------------------------------------------------- */ @@ -219,21 +219,21 @@ CreateTrigger(CreateTrigStmt *stmt, bool forConstraint) if (TRIGGER_FOR_INSERT(tgtype)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("double INSERT event specified"))); + errmsg("multiple INSERT events specified"))); TRIGGER_SETT_INSERT(tgtype); break; case 'd': if (TRIGGER_FOR_DELETE(tgtype)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("double DELETE event specified"))); + errmsg("multiple DELETE events specified"))); TRIGGER_SETT_DELETE(tgtype); break; case 'u': if (TRIGGER_FOR_UPDATE(tgtype)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("double UPDATE event specified"))); + errmsg("multiple UPDATE events specified"))); TRIGGER_SETT_UPDATE(tgtype); break; default: @@ -287,14 +287,14 @@ CreateTrigger(CreateTrigStmt *stmt, bool forConstraint) if (funcrettype == OPAQUEOID) { ereport(NOTICE, - (errmsg("changing return type of function %s() from OPAQUE to TRIGGER", + (errmsg("changing return type of function %s from \"opaque\" to \"trigger\"", NameListToString(stmt->funcname)))); SetFunctionReturnType(funcoid, TRIGGEROID); } else ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("function %s() must return TRIGGER", + errmsg("function %s must return type \"trigger\"", NameListToString(stmt->funcname)))); } @@ -481,7 +481,7 @@ DropTrigger(Oid relid, const char *trigname, DropBehavior behavior) if (!HeapTupleIsValid(tup)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("trigger \"%s\" for relation \"%s\" does not exist", + errmsg("trigger \"%s\" for table \"%s\" does not exist", trigname, get_rel_name(relid)))); if (!pg_class_ownercheck(relid, GetUserId())) @@ -694,7 +694,7 @@ renametrig(Oid relid, { ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("trigger \"%s\" for relation \"%s\" does not exist", + errmsg("trigger \"%s\" for table \"%s\" does not exist", oldname, RelationGetRelationName(targetrel)))); } @@ -1158,7 +1158,7 @@ ExecCallTriggerFunc(TriggerData *trigdata, if (fcinfo.isnull) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("trigger function %u returned NULL", + errmsg("trigger function %u returned null value", fcinfo.flinfo->fn_oid))); return (HeapTuple) DatumGetPointer(result); diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index deb24a779c..2c49ad3620 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.45 2003/09/15 00:26:31 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.46 2003/09/25 06:57:58 petere Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -272,14 +272,14 @@ DefineType(List *names, List *parameters) { /* backwards-compatibility hack */ ereport(NOTICE, - (errmsg("changing return type of function %s from OPAQUE to %s", + (errmsg("changing return type of function %s from \"opaque\" to %s", NameListToString(inputName), typeName))); SetFunctionReturnType(inputOid, typoid); } else ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("type input function %s must return %s", + errmsg("type input function %s must return type %s", NameListToString(inputName), typeName))); } resulttype = get_func_rettype(outputOid); @@ -289,14 +289,14 @@ DefineType(List *names, List *parameters) { /* backwards-compatibility hack */ ereport(NOTICE, - (errmsg("changing return type of function %s from OPAQUE to CSTRING", + (errmsg("changing return type of function %s from \"opaque\" to \"cstring\"", NameListToString(outputName)))); SetFunctionReturnType(outputOid, CSTRINGOID); } else ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("type output function %s must return cstring", + errmsg("type output function %s must return type \"cstring\"", NameListToString(outputName)))); } if (receiveOid) @@ -305,7 +305,7 @@ DefineType(List *names, List *parameters) if (resulttype != typoid) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("type receive function %s must return %s", + errmsg("type receive function %s must return type %s", NameListToString(receiveName), typeName))); } if (sendOid) @@ -314,7 +314,7 @@ DefineType(List *names, List *parameters) if (resulttype != BYTEAOID) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("type send function %s must return bytea", + errmsg("type send function %s must return type \"bytea\"", NameListToString(sendName)))); } @@ -615,7 +615,7 @@ DefineDomain(CreateDomainStmt *stmt) if (defaultExpr) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("multiple DEFAULT expressions"))); + errmsg("multiple default expressions"))); /* Create a dummy ParseState for transformExpr */ pstate = make_parsestate(NULL); @@ -875,7 +875,7 @@ findTypeInputFunction(List *procname, Oid typeOid) { /* Found, but must complain and fix the pg_proc entry */ ereport(NOTICE, - (errmsg("changing argument type of function %s from OPAQUE to CSTRING", + (errmsg("changing argument type of function %s from \"opaque\" to \"cstring\"", NameListToString(procname)))); SetFunctionArgType(procOid, 0, CSTRINGOID); @@ -945,7 +945,7 @@ findTypeOutputFunction(List *procname, Oid typeOid) { /* Found, but must complain and fix the pg_proc entry */ ereport(NOTICE, - (errmsg("changing argument type of function %s from OPAQUE to %s", + (errmsg("changing argument type of function %s from \"opaque\" to %s", NameListToString(procname), format_type_be(typeOid)))); SetFunctionArgType(procOid, 0, typeOid); @@ -1287,9 +1287,9 @@ AlterDomainNotNull(List *names, bool notNull) if (isNull) ereport(ERROR, (errcode(ERRCODE_NOT_NULL_VIOLATION), - errmsg("relation \"%s\" attribute \"%s\" contains NULL values", - RelationGetRelationName(testrel), - NameStr(tupdesc->attrs[attnum - 1]->attname)))); + errmsg("column \"%s\" of table \"%s\" contains null values", + NameStr(tupdesc->attrs[attnum - 1]->attname), + RelationGetRelationName(testrel)))); } } heap_endscan(scan); @@ -1554,7 +1554,7 @@ AlterDomainAddConstraint(List *names, Node *newConstraint) if (!isNull && !DatumGetBool(conResult)) ereport(ERROR, (errcode(ERRCODE_CHECK_VIOLATION), - errmsg("relation \"%s\" attribute \"%s\" contains values that violate the new constraint", + errmsg("relation \"%s\" column \"%s\" contains values that violate the new constraint", RelationGetRelationName(testrel), NameStr(tupdesc->attrs[attnum - 1]->attname)))); } @@ -1791,7 +1791,7 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, if (length(pstate->p_rtable) != 0) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("cannot use table references in domain CHECK constraint"))); + errmsg("cannot use table references in domain check constraint"))); /* * Domains don't allow var clauses (this should be redundant with the @@ -1800,7 +1800,7 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, if (contain_var_clause(expr)) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("cannot use table references in domain CHECK constraint"))); + errmsg("cannot use table references in domain check constraint"))); /* * No subplans or aggregates, either... @@ -1808,11 +1808,11 @@ domainAddConstraint(Oid domainOid, Oid domainNamespace, Oid baseTypeOid, if (pstate->p_hasSubLinks) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use sub-select in CHECK constraint"))); + errmsg("cannot use subquery in check constraint"))); if (pstate->p_hasAggs) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), - errmsg("cannot use aggregate in CHECK constraint"))); + errmsg("cannot use aggregate in check constraint"))); /* * Convert to string form for storage. diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index de6555e2c1..6135104360 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.125 2003/09/15 00:26:31 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.126 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -146,7 +146,7 @@ write_group_file(Relation grel) if (fp == NULL) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not write temp file \"%s\": %m", tempname))); + errmsg("could not write to temporary file \"%s\": %m", tempname))); /* * Read pg_group and write the file. Note we use SnapshotSelf to @@ -175,7 +175,7 @@ write_group_file(Relation grel) groname = NameStr(*DatumGetName(datum)); /* - * Check for illegal characters in the group name. + * Check for invalid characters in the group name. */ i = strcspn(groname, "\n"); if (groname[i] != '\0') @@ -245,7 +245,7 @@ write_group_file(Relation grel) if (ferror(fp)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not write temp file \"%s\": %m", tempname))); + errmsg("could not write to temporary file \"%s\": %m", tempname))); FreeFile(fp); /* @@ -255,7 +255,7 @@ write_group_file(Relation grel) if (rename(tempname, filename)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not rename \"%s\" to \"%s\": %m", + errmsg("could not rename file \"%s\" to \"%s\": %m", tempname, filename))); pfree((void *) tempname); @@ -294,7 +294,7 @@ write_user_file(Relation urel) if (fp == NULL) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not write temp file \"%s\": %m", tempname))); + errmsg("could not write to temporary file \"%s\": %m", tempname))); /* * Read pg_shadow and write the file. Note we use SnapshotSelf to @@ -376,7 +376,7 @@ write_user_file(Relation urel) if (ferror(fp)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not write temp file \"%s\": %m", tempname))); + errmsg("could not write to temporary file \"%s\": %m", tempname))); FreeFile(fp); /* @@ -386,7 +386,7 @@ write_user_file(Relation urel) if (rename(tempname, filename)) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not rename \"%s\" to \"%s\": %m", + errmsg("could not rename file \"%s\" to \"%s\": %m", tempname, filename))); pfree((void *) tempname); @@ -584,7 +584,7 @@ CreateUser(CreateUserStmt *stmt) if (sysid <= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("user id must be positive"))); + errmsg("user ID must be positive"))); havesysid = true; } if (dvalidUntil) @@ -1230,7 +1230,7 @@ CheckPgUserAclNotNull(void) errmsg("before using passwords you must revoke permissions on %s", ShadowRelationName), errdetail("This restriction is to prevent unprivileged users from reading the passwords."), - errhint("Try 'REVOKE ALL ON \"%s\" FROM PUBLIC'.", + errhint("Try REVOKE ALL ON \"%s\" FROM PUBLIC.", ShadowRelationName))); ReleaseSysCache(htup); @@ -1294,7 +1294,7 @@ CreateGroup(CreateGroupStmt *stmt) if (sysid <= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("group id must be positive"))); + errmsg("group ID must be positive"))); havesysid = true; } diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index e626848f12..b9ca4dfbf9 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -13,7 +13,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.260 2003/09/24 18:54:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.261 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -463,7 +463,7 @@ vacuum_set_xid_limits(VacuumStmt *vacstmt, bool sharedRel, if (TransactionIdFollows(limit, *oldestXmin)) { ereport(WARNING, - (errmsg("oldest Xmin is far in the past"), + (errmsg("oldest xmin is far in the past"), errhint("Close open transactions soon to avoid wraparound problems."))); limit = *oldestXmin; } @@ -782,7 +782,7 @@ vacuum_rel(Oid relid, VacuumStmt *vacstmt, char expected_relkind) (pg_database_ownercheck(MyDatabaseId, GetUserId()) && !onerel->rd_rel->relisshared))) { ereport(WARNING, - (errmsg("skipping \"%s\" --- only table or database owner can VACUUM it", + (errmsg("skipping \"%s\" --- only table or database owner can vacuum it", RelationGetRelationName(onerel)))); relation_close(onerel, lmode); CommitTransactionCommand(); @@ -796,7 +796,7 @@ vacuum_rel(Oid relid, VacuumStmt *vacstmt, char expected_relkind) if (onerel->rd_rel->relkind != expected_relkind) { ereport(WARNING, - (errmsg("skipping \"%s\" --- cannot VACUUM indexes, views or special system tables", + (errmsg("skipping \"%s\" --- cannot vacuum indexes, views, or special system tables", RelationGetRelationName(onerel)))); relation_close(onerel, lmode); CommitTransactionCommand(); @@ -1354,13 +1354,13 @@ scan_heap(VRelStats *vacrelstats, Relation onerel, } ereport(elevel, - (errmsg("\"%s\": found %.0f removable, %.0f nonremovable tuples in %u pages", + (errmsg("\"%s\": found %.0f removable, %.0f nonremovable row versions in %u pages", RelationGetRelationName(onerel), tups_vacuumed, num_tuples, nblocks), - errdetail("%.0f dead tuples cannot be removed yet.\n" - "Nonremovable tuples range from %lu to %lu bytes long.\n" + errdetail("%.0f dead row versions cannot be removed yet.\n" + "Nonremovable row versions range from %lu to %lu bytes long.\n" "There were %.0f unused item pointers.\n" - "Total free space (including removable tuples) is %.0f bytes.\n" + "Total free space (including removable row versions) is %.0f bytes.\n" "%u pages are or will become empty, including %u at the end of the table.\n" "%u pages containing %.0f free bytes are potential move destinations.\n" "%s", @@ -2360,7 +2360,7 @@ repair_frag(VRelStats *vacrelstats, Relation onerel, * processing that occurs below. */ ereport(elevel, - (errmsg("\"%s\": moved %u tuples, truncated %u to %u pages", + (errmsg("\"%s\": moved %u row versions, truncated %u to %u pages", RelationGetRelationName(onerel), num_moved, nblocks, blkno), errdetail("%s", @@ -2639,7 +2639,7 @@ scan_index(Relation indrel, double num_tuples) false); ereport(elevel, - (errmsg("index \"%s\" now contains %.0f tuples in %u pages", + (errmsg("index \"%s\" now contains %.0f row versions in %u pages", RelationGetRelationName(indrel), stats->num_index_tuples, stats->num_pages), @@ -2657,7 +2657,7 @@ scan_index(Relation indrel, double num_tuples) if (stats->num_index_tuples > num_tuples || !vac_is_partial_index(indrel)) ereport(WARNING, - (errmsg("index \"%s\" contains %.0f tuples, but table contains %.0f tuples", + (errmsg("index \"%s\" contains %.0f row versions, but table contains %.0f row versions", RelationGetRelationName(indrel), stats->num_index_tuples, num_tuples), errhint("Rebuild the index with REINDEX."))); @@ -2706,11 +2706,11 @@ vacuum_index(VacPageList vacpagelist, Relation indrel, false); ereport(elevel, - (errmsg("index \"%s\" now contains %.0f tuples in %u pages", + (errmsg("index \"%s\" now contains %.0f row versions in %u pages", RelationGetRelationName(indrel), stats->num_index_tuples, stats->num_pages), - errdetail("%.0f index tuples were removed.\n" + errdetail("%.0f index row versions were removed.\n" "%u index pages have been deleted, %u are currently reusable.\n" "%s", stats->tuples_removed, @@ -2726,7 +2726,7 @@ vacuum_index(VacPageList vacpagelist, Relation indrel, if (stats->num_index_tuples > num_tuples + keep_tuples || !vac_is_partial_index(indrel)) ereport(WARNING, - (errmsg("index \"%s\" contains %.0f tuples, but table contains %.0f tuples", + (errmsg("index \"%s\" contains %.0f row versions, but table contains %.0f tuples", RelationGetRelationName(indrel), stats->num_index_tuples, num_tuples + keep_tuples), errhint("Rebuild the index with REINDEX."))); diff --git a/src/backend/commands/vacuumlazy.c b/src/backend/commands/vacuumlazy.c index 9ac831a867..cc1852f65a 100644 --- a/src/backend/commands/vacuumlazy.c +++ b/src/backend/commands/vacuumlazy.c @@ -31,7 +31,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/vacuumlazy.c,v 1.31 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/vacuumlazy.c,v 1.32 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -425,10 +425,10 @@ lazy_scan_heap(Relation onerel, LVRelStats *vacrelstats, } ereport(elevel, - (errmsg("\"%s\": found %.0f removable, %.0f nonremovable tuples in %u pages", + (errmsg("\"%s\": found %.0f removable, %.0f nonremovable row versions in %u pages", RelationGetRelationName(onerel), tups_vacuumed, num_tuples, nblocks), - errdetail("%.0f dead tuples cannot be removed yet.\n" + errdetail("%.0f dead row versions cannot be removed yet.\n" "There were %.0f unused item pointers.\n" "%u pages are entirely empty.\n" "%s", @@ -483,7 +483,7 @@ lazy_vacuum_heap(Relation onerel, LVRelStats *vacrelstats) } ereport(elevel, - (errmsg("\"%s\": removed %d tuples in %d pages", + (errmsg("\"%s\": removed %d row versions in %d pages", RelationGetRelationName(onerel), tupindex, npages), errdetail("%s", @@ -594,7 +594,7 @@ lazy_scan_index(Relation indrel, LVRelStats *vacrelstats) false); ereport(elevel, - (errmsg("index \"%s\" now contains %.0f tuples in %u pages", + (errmsg("index \"%s\" now contains %.0f row versions in %u pages", RelationGetRelationName(indrel), stats->num_index_tuples, stats->num_pages), @@ -654,11 +654,11 @@ lazy_vacuum_index(Relation indrel, LVRelStats *vacrelstats) false); ereport(elevel, - (errmsg("index \"%s\" now contains %.0f tuples in %u pages", + (errmsg("index \"%s\" now contains %.0f row versions in %u pages", RelationGetRelationName(indrel), stats->num_index_tuples, stats->num_pages), - errdetail("%.0f index tuples were removed.\n" + errdetail("%.0f index row versions were removed.\n" "%u index pages have been deleted, %u are currently reusable.\n" "%s", stats->tuples_removed, diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c index ad39ccc467..7c862a5b3a 100644 --- a/src/backend/commands/variable.c +++ b/src/backend/commands/variable.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.87 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/variable.c,v 1.88 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -72,7 +72,7 @@ assign_datestyle(const char *value, bool doit, bool interactive) if (interactive) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid list syntax for datestyle"))); + errmsg("invalid list syntax for parameter \"datestyle\""))); return NULL; } @@ -158,7 +158,7 @@ assign_datestyle(const char *value, bool doit, bool interactive) if (interactive) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("unrecognized datestyle keyword: \"%s\"", + errmsg("unrecognized \"datestyle\" key word: \"%s\"", tok))); ok = false; break; @@ -176,7 +176,7 @@ assign_datestyle(const char *value, bool doit, bool interactive) if (interactive) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("conflicting datestyle specifications"))); + errmsg("conflicting \"datestyle\" specifications"))); return NULL; } @@ -447,7 +447,7 @@ assign_timezone(const char *value, bool doit, bool interactive) if (interactive) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid INTERVAL for time zone: month not allowed"))); + errmsg("invalid interval value for time zone: month not allowed"))); pfree(interval); return NULL; } @@ -554,7 +554,7 @@ assign_timezone(const char *value, bool doit, bool interactive) { ereport(interactive ? ERROR : LOG, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("unrecognized timezone name: \"%s\"", + errmsg("unrecognized time zone name: \"%s\"", value))); return NULL; } @@ -562,9 +562,9 @@ assign_timezone(const char *value, bool doit, bool interactive) { ereport(interactive ? ERROR : LOG, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("timezone \"%s\" appears to use leap seconds", + errmsg("time zone \"%s\" appears to use leap seconds", value), - errdetail("PostgreSQL does not support leap seconds"))); + errdetail("PostgreSQL does not support leap seconds."))); return NULL; } } diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index 4d0877dbcf..550ec0cf1f 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.77 2003/08/04 02:39:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.78 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -86,7 +86,7 @@ DefineVirtualRelation(const RangeVar *relation, List *tlist, bool replace) if (attrList == NIL) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("view must have at least one attribute"))); + errmsg("view must have at least one column"))); /* * Check to see if we want to replace an existing view. @@ -190,7 +190,7 @@ checkViewTupleDesc(TupleDesc newdesc, TupleDesc olddesc) newattr->atttypmod != oldattr->atttypmod) ereport(ERROR, (errcode(ERRCODE_INVALID_TABLE_DEFINITION), - errmsg("cannot change datatype of view column \"%s\"", + errmsg("cannot change data type of view column \"%s\"", NameStr(oldattr->attname)))); /* We can ignore the remaining attributes of an attribute... */ } diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index 1f78b1265b..5d904f15d3 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -26,7 +26,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.217 2003/09/15 23:33:43 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.218 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -841,19 +841,19 @@ initResultRelInfo(ResultRelInfo *resultRelInfo, case RELKIND_SEQUENCE: ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("cannot change sequence relation \"%s\"", + errmsg("cannot change sequence \"%s\"", RelationGetRelationName(resultRelationDesc)))); break; case RELKIND_TOASTVALUE: ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("cannot change toast relation \"%s\"", + errmsg("cannot change TOAST relation \"%s\"", RelationGetRelationName(resultRelationDesc)))); break; case RELKIND_VIEW: ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("cannot change view relation \"%s\"", + errmsg("cannot change view \"%s\"", RelationGetRelationName(resultRelationDesc)))); break; } @@ -1688,7 +1688,7 @@ ExecConstraints(ResultRelInfo *resultRelInfo, heap_attisnull(tuple, attrChk)) ereport(ERROR, (errcode(ERRCODE_NOT_NULL_VIOLATION), - errmsg("null value for attribute \"%s\" violates NOT NULL constraint", + errmsg("null value in column \"%s\" violates not-null constraint", NameStr(rel->rd_att->attrs[attrChk - 1]->attname)))); } } @@ -1700,7 +1700,7 @@ ExecConstraints(ResultRelInfo *resultRelInfo, if ((failed = ExecRelCheck(resultRelInfo, slot, estate)) != NULL) ereport(ERROR, (errcode(ERRCODE_CHECK_VIOLATION), - errmsg("new row for relation \"%s\" violates CHECK constraint \"%s\"", + errmsg("new row for relation \"%s\" violates check constraint \"%s\"", RelationGetRelationName(rel), failed))); } } diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c index c99d2e095d..923d418b3a 100644 --- a/src/backend/executor/execQual.c +++ b/src/backend/executor/execQual.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.144 2003/09/15 20:03:37 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.145 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -177,8 +177,8 @@ ExecEvalArrayRef(ArrayRefExprState *astate, if (i >= MAXDIM) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of array dimensions exceeds the maximum allowed, %d", - MAXDIM))); + errmsg("number of array dimensions (%d) exceeds the maximum allowed (%d)", + i, MAXDIM))); upper.indx[i++] = DatumGetInt32(ExecEvalExpr((ExprState *) lfirst(elt), econtext, @@ -201,8 +201,8 @@ ExecEvalArrayRef(ArrayRefExprState *astate, if (j >= MAXDIM) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of array dimensions exceeds the maximum allowed, %d", - MAXDIM))); + errmsg("number of array dimensions (%d) exceeds the maximum allowed (%d)", + i, MAXDIM))); lower.indx[j++] = DatumGetInt32(ExecEvalExpr((ExprState *) lfirst(elt), econtext, @@ -1056,12 +1056,12 @@ ExecMakeTableFunctionResult(ExprState *funcexpr, if (fcinfo.isnull || !slot) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("function returning tuple cannot return NULL"))); + errmsg("function returning row cannot return null value"))); if (!IsA(slot, TupleTableSlot) || !slot->ttc_tupleDescriptor) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("function returning tuple did not return a valid tuple slot"))); + errmsg("function returning row did not return a valid tuple slot"))); tupdesc = CreateTupleDescCopy(slot->ttc_tupleDescriptor); returnsTuple = true; } @@ -1097,7 +1097,7 @@ ExecMakeTableFunctionResult(ExprState *funcexpr, TupIsNull(slot)) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("function returning tuple cannot return NULL"))); + errmsg("function returning row cannot return null value"))); tuple = slot->val; } else @@ -1716,8 +1716,8 @@ ExecEvalArray(ArrayExprState *astate, ExprContext *econtext, if (ndims <= 0 || ndims > MAXDIM) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of array dimensions exceeds " \ - "the maximum allowed, %d", MAXDIM))); + errmsg("number of array dimensions (%d) exceeds " \ + "the maximum allowed (%d)", ndims, MAXDIM))); elem_dims = (int *) palloc(elem_ndims * sizeof(int)); memcpy(elem_dims, ARR_DIMS(array), elem_ndims * sizeof(int)); @@ -2027,7 +2027,7 @@ ExecEvalCoerceToDomain(CoerceToDomainState *cstate, ExprContext *econtext, if (*isNull) ereport(ERROR, (errcode(ERRCODE_NOT_NULL_VIOLATION), - errmsg("domain %s does not allow NULL values", + errmsg("domain %s does not allow null values", format_type_be(ctest->resulttype)))); break; case DOM_CONSTRAINT_CHECK: @@ -2057,7 +2057,7 @@ ExecEvalCoerceToDomain(CoerceToDomainState *cstate, ExprContext *econtext, !DatumGetBool(conResult)) ereport(ERROR, (errcode(ERRCODE_CHECK_VIOLATION), - errmsg("value for domain %s violates CHECK constraint \"%s\"", + errmsg("value for domain %s violates check constraint \"%s\"", format_type_be(ctest->resulttype), con->name))); econtext->domainValue_datum = save_datum; diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index 3c1ece3ed4..28276adc94 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.73 2003/09/15 20:03:37 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.74 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -180,7 +180,7 @@ init_sql_fcache(FmgrInfo *finfo) if (rettype == InvalidOid) /* this probably should not happen */ ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("could not determine actual result type for function declared %s", + errmsg("could not determine actual result type for function declared to return type %s", format_type_be(procedureStruct->prorettype)))); } @@ -670,7 +670,7 @@ sql_exec_error_callback(void *arg) { if (es->qd) { - errcontext("SQL function \"%s\" query %d", + errcontext("SQL function \"%s\" statement %d", fn_name, query_num); break; } diff --git a/src/backend/executor/nodeFunctionscan.c b/src/backend/executor/nodeFunctionscan.c index e9bfa9bfce..ca25774805 100644 --- a/src/backend/executor/nodeFunctionscan.c +++ b/src/backend/executor/nodeFunctionscan.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeFunctionscan.c,v 1.20 2003/08/04 02:39:59 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeFunctionscan.c,v 1.21 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -90,7 +90,7 @@ FunctionNext(FunctionScanState *node) tupledesc_mismatch(node->tupdesc, funcTupdesc)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("query-specified return tuple and actual function return tuple do not match"))); + errmsg("query-specified return row and actual function return row do not match"))); } /* diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c index 454b18e786..112155bdd3 100644 --- a/src/backend/executor/nodeHashjoin.c +++ b/src/backend/executor/nodeHashjoin.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.56 2003/08/08 21:41:42 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.57 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -558,7 +558,7 @@ ExecHashJoinGetSavedTuple(HashJoinState *hjstate, if (nread != sizeof(HeapTupleData)) ereport(ERROR, (errcode_for_file_access(), - errmsg("read from hashjoin temp file failed: %m"))); + errmsg("could not read from hash-join temporary file: %m"))); heapTuple = palloc(HEAPTUPLESIZE + htup.t_len); memcpy((char *) heapTuple, (char *) &htup, sizeof(HeapTupleData)); heapTuple->t_datamcxt = CurrentMemoryContext; @@ -568,7 +568,7 @@ ExecHashJoinGetSavedTuple(HashJoinState *hjstate, if (nread != (size_t) htup.t_len) ereport(ERROR, (errcode_for_file_access(), - errmsg("read from hashjoin temp file failed: %m"))); + errmsg("could not read from hash-join temporary file: %m"))); return ExecStoreTuple(heapTuple, tupleSlot, InvalidBuffer, true); } @@ -626,14 +626,14 @@ ExecHashJoinNewBatch(HashJoinState *hjstate) if (BufFileSeek(hashtable->outerBatchFile[newbatch - 1], 0, 0L, SEEK_SET)) ereport(ERROR, (errcode_for_file_access(), - errmsg("failed to rewind hashjoin temp file: %m"))); + errmsg("could not rewind hash-join temporary file: %m"))); innerFile = hashtable->innerBatchFile[newbatch - 1]; if (BufFileSeek(innerFile, 0, 0L, SEEK_SET)) ereport(ERROR, (errcode_for_file_access(), - errmsg("failed to rewind hashjoin temp file: %m"))); + errmsg("could not rewind hash-join temporary file: %m"))); /* * Reload the hash table with the new inner batch @@ -684,12 +684,12 @@ ExecHashJoinSaveTuple(HeapTuple heapTuple, if (written != sizeof(HeapTupleData)) ereport(ERROR, (errcode_for_file_access(), - errmsg("write to hashjoin temp file failed: %m"))); + errmsg("could not write to hash-join temporary file: %m"))); written = BufFileWrite(file, (void *) heapTuple->t_data, heapTuple->t_len); if (written != (size_t) heapTuple->t_len) ereport(ERROR, (errcode_for_file_access(), - errmsg("write to hashjoin temp file failed: %m"))); + errmsg("could not write to hash-join temporary file: %m"))); } void diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c index 0b383d24d1..36b8c45470 100644 --- a/src/backend/executor/nodeMergejoin.c +++ b/src/backend/executor/nodeMergejoin.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.61 2003/08/08 21:41:42 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.62 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -1476,7 +1476,7 @@ ExecInitMergeJoin(MergeJoin *node, EState *estate) if (node->join.joinqual != NIL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("RIGHT JOIN is only supported with mergejoinable join conditions"))); + errmsg("RIGHT JOIN is only supported with merge-joinable join conditions"))); break; case JOIN_FULL: mergestate->mj_NullOuterTupleSlot = @@ -1493,7 +1493,7 @@ ExecInitMergeJoin(MergeJoin *node, EState *estate) if (node->join.joinqual != NIL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("FULL JOIN is only supported with mergejoinable join conditions"))); + errmsg("FULL JOIN is only supported with merge-joinable join conditions"))); break; default: elog(ERROR, "unrecognized join type: %d", diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c index 23b0cd3bf3..f1b96ee5d8 100644 --- a/src/backend/executor/nodeSubplan.c +++ b/src/backend/executor/nodeSubplan.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeSubplan.c,v 1.55 2003/08/19 01:13:40 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeSubplan.c,v 1.56 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -287,7 +287,7 @@ ExecScanSubPlan(SubPlanState *node, if (found) ereport(ERROR, (errcode(ERRCODE_CARDINALITY_VIOLATION), - errmsg("more than one tuple returned by a subselect used as an expression"))); + errmsg("more than one row returned by a subquery used as an expression"))); found = true; /* @@ -329,7 +329,7 @@ ExecScanSubPlan(SubPlanState *node, if (subLinkType == MULTIEXPR_SUBLINK && found) ereport(ERROR, (errcode(ERRCODE_CARDINALITY_VIOLATION), - errmsg("more than one tuple returned by a subselect used as an expression"))); + errmsg("more than one row returned by a subquery used as an expression"))); found = true; @@ -963,7 +963,7 @@ ExecSetParamPlan(SubPlanState *node, ExprContext *econtext) subLinkType == MULTIEXPR_SUBLINK)) ereport(ERROR, (errcode(ERRCODE_CARDINALITY_VIOLATION), - errmsg("more than one tuple returned by a subselect used as an expression"))); + errmsg("more than one row returned by a subquery used as an expression"))); found = true; diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index d71f2b0a4c..dca08a3493 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.110 2003/08/04 02:39:59 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.111 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -110,20 +110,20 @@ pg_krb4_recvauth(Port *port) if (status != KSUCCESS) { ereport(LOG, - (errmsg("kerberos error: %s", krb_err_txt[status]))); + (errmsg("Kerberos error: %s", krb_err_txt[status]))); return STATUS_ERROR; } if (strncmp(version, PG_KRB4_VERSION, KRB_SENDAUTH_VLEN) != 0) { ereport(LOG, - (errmsg("kerberos protocol version \"%s\" != \"%s\"", + (errmsg("unexpected Kerberos protocol version received from client (received \"%s\", expected \"%s\")", version, PG_KRB4_VERSION))); return STATUS_ERROR; } if (strncmp(port->user_name, auth_data.pname, SM_DATABASE_USER) != 0) { ereport(LOG, - (errmsg("kerberos user name \"%s\" != \"%s\"", + (errmsg("unexpected Kerberos user name received from client (received \"%s\", expected \"%s\")", port->user_name, auth_data.pname))); return STATUS_ERROR; } @@ -137,7 +137,7 @@ pg_krb4_recvauth(Port *port) { ereport(LOG, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("kerberos v4 not implemented on this server"))); + errmsg("Kerberos 4 not implemented on this server"))); return STATUS_ERROR; } #endif /* KRB4 */ @@ -198,7 +198,7 @@ pg_krb5_init(void) if (retval) { ereport(LOG, - (errmsg("kerberos init returned error %d", + (errmsg("Kerberos initialization returned error %d", retval))); com_err("postgres", retval, "while initializing krb5"); return STATUS_ERROR; @@ -208,7 +208,7 @@ pg_krb5_init(void) if (retval) { ereport(LOG, - (errmsg("kerberos keytab resolve returned error %d", + (errmsg("Kerberos keytab resolving returned error %d", retval))); com_err("postgres", retval, "while resolving keytab file \"%s\"", pg_krb_server_keyfile); @@ -221,7 +221,7 @@ pg_krb5_init(void) if (retval) { ereport(LOG, - (errmsg("kerberos sname_to_principal(\"%s\") returned error %d", + (errmsg("Kerberos sname_to_principal(\"%s\") returned error %d", PG_KRB_SRVNAM, retval))); com_err("postgres", retval, "while getting server principal for service \"%s\"", @@ -266,7 +266,7 @@ pg_krb5_recvauth(Port *port) if (retval) { ereport(LOG, - (errmsg("kerberos recvauth returned error %d", + (errmsg("Kerberos recvauth returned error %d", retval))); com_err("postgres", retval, "from krb5_recvauth"); return STATUS_ERROR; @@ -291,7 +291,7 @@ pg_krb5_recvauth(Port *port) if (retval) { ereport(LOG, - (errmsg("kerberos unparse_name returned error %d", + (errmsg("Kerberos unparse_name returned error %d", retval))); com_err("postgres", retval, "while unparsing client name"); krb5_free_ticket(pg_krb5_context, ticket); @@ -303,7 +303,7 @@ pg_krb5_recvauth(Port *port) if (strncmp(port->user_name, kusername, SM_DATABASE_USER)) { ereport(LOG, - (errmsg("kerberos user name \"%s\" != \"%s\"", + (errmsg("unexpected Kerberos user name received from client (received \"%s\", expected \"%s\")", port->user_name, kusername))); ret = STATUS_ERROR; } @@ -324,7 +324,7 @@ pg_krb5_recvauth(Port *port) { ereport(LOG, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("kerberos v5 not implemented on this server"))); + errmsg("Kerberos 5 not implemented on this server"))); return STATUS_ERROR; } #endif /* KRB5 */ @@ -416,7 +416,7 @@ ClientAuthentication(Port *port) ereport(FATAL, (errcode(ERRCODE_CONFIG_FILE_ERROR), errmsg("missing or erroneous pg_hba.conf file"), - errhint("See postmaster log for details."))); + errhint("See server log for details."))); switch (port->auth_method) { @@ -460,7 +460,7 @@ ClientAuthentication(Port *port) || port->laddr.addr.ss_family != AF_INET) ereport(FATAL, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("kerberos 4 only supports IPv4 connections"))); + errmsg("Kerberos 4 only supports IPv4 connections"))); sendAuthRequest(port, AUTH_REQ_KRB4); status = pg_krb4_recvauth(port); break; @@ -676,7 +676,7 @@ CheckPAMAuth(Port *port, char *user, char *password) if (retval != PAM_SUCCESS) { ereport(LOG, - (errmsg("Failed to create PAM authenticator: %s", + (errmsg("could not create PAM authenticator: %s", pam_strerror(pamh, retval)))); pam_passwd = NULL; /* Unset pam_passwd */ return STATUS_ERROR; @@ -731,7 +731,7 @@ CheckPAMAuth(Port *port, char *user, char *password) if (retval != PAM_SUCCESS) { ereport(LOG, - (errmsg("failed to release PAM authenticator: %s", + (errmsg("could not release PAM authenticator: %s", pam_strerror(pamh, retval)))); } @@ -769,7 +769,7 @@ recv_password_packet(Port *port) if (mtype != EOF) ereport(COMMERROR, (errcode(ERRCODE_PROTOCOL_VIOLATION), - errmsg("expected password response, got msg type %d", + errmsg("expected password response, got message type %d", mtype))); return NULL; /* EOF or bad message type */ } diff --git a/src/backend/libpq/be-secure.c b/src/backend/libpq/be-secure.c index 953530cf32..216cf505b9 100644 --- a/src/backend/libpq/be-secure.c +++ b/src/backend/libpq/be-secure.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.41 2003/08/12 18:23:20 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.42 2003/09/25 06:57:59 petere Exp $ * * Since the server static private key ($DataDir/server.key) * will normally be stored unencrypted so that the database @@ -681,7 +681,7 @@ initialize_SSL(void) { /* Not fatal - we do not require client certificates */ ereport(LOG, - (errmsg("could not load root cert file \"%s\": %s", + (errmsg("could not load root certificate file \"%s\": %s", fnbuf, SSLerrmessage()), errdetail("Will not verify client certificates."))); return 0; @@ -742,7 +742,7 @@ open_server_SSL(Port *port) port->peer_cn[sizeof(port->peer_cn) - 1] = '\0'; } ereport(DEBUG2, - (errmsg("secure connection from \"%s\"", port->peer_cn))); + (errmsg("SSL connection from \"%s\"", port->peer_cn))); /* set up debugging/info callback */ SSL_CTX_set_info_callback(SSL_context, info_cb); diff --git a/src/backend/libpq/crypt.c b/src/backend/libpq/crypt.c index e1b225eee0..fb099fd25e 100644 --- a/src/backend/libpq/crypt.c +++ b/src/backend/libpq/crypt.c @@ -9,7 +9,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/libpq/crypt.c,v 1.56 2003/08/04 02:39:59 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/crypt.c,v 1.57 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -59,7 +59,7 @@ md5_crypt_verify(const Port *port, const char *user, char *client_pass) if (isMD5(shadow_pass) && port->auth_method == uaCrypt) { ereport(LOG, - (errmsg("cannot use CRYPT auth method because password is MD5-encrypted"))); + (errmsg("cannot use authentication method \"crypt\" because password is MD5-encrypted"))); return STATUS_ERROR; } diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 55d96e16ea..8c67138a67 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.114 2003/09/05 23:07:21 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.115 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -663,7 +663,7 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p) { ereport(LOG, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("could not interpret IP address \"%s\" in config file: %s", + errmsg("invalid IP address \"%s\" in pg_hba.conf file: %s", token, gai_strerror(ret)))); if (cidr_slash) *cidr_slash = '/'; @@ -815,7 +815,7 @@ group_openfile(void) if (groupfile == NULL && errno != ENOENT) ereport(LOG, (errcode_for_file_access(), - errmsg("could not open \"%s\": %m", filename))); + errmsg("could not open file \"%s\": %m", filename))); pfree(filename); @@ -839,7 +839,7 @@ user_openfile(void) if (pwdfile == NULL && errno != ENOENT) ereport(LOG, (errcode_for_file_access(), - errmsg("could not open \"%s\": %m", filename))); + errmsg("could not open file \"%s\": %m", filename))); pfree(filename); @@ -958,7 +958,7 @@ load_hba(void) if (file == NULL) ereport(FATAL, (errcode_for_file_access(), - errmsg("could not open config file \"%s\": %m", + errmsg("could not open configuration file \"%s\": %m", conf_file))); hba_lines = tokenize_file(file); @@ -1057,7 +1057,7 @@ check_ident_usermap(const char *usermap_name, { ereport(LOG, (errcode(ERRCODE_CONFIG_FILE_ERROR), - errmsg("cannot use IDENT authentication without usermap field"))); + errmsg("cannot use Ident authentication without usermap field"))); found_entry = false; } else if (strcmp(usermap_name, "sameuser") == 0) @@ -1105,7 +1105,7 @@ load_ident(void) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not open usermap file \"%s\": %m", + errmsg("could not open Ident usermap file \"%s\": %m", map_file))); } else @@ -1276,7 +1276,7 @@ ident_inet(const SockAddr remote_addr, { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not create socket for IDENT connection: %m"))); + errmsg("could not create socket for Ident connection: %m"))); ident_return = false; goto ident_inet_done; } @@ -1304,7 +1304,7 @@ ident_inet(const SockAddr remote_addr, { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not connect to IDENT server at address \"%s\", port %s: %m", + errmsg("could not connect to Ident server at address \"%s\", port %s: %m", remote_addr_s, ident_port))); ident_return = false; goto ident_inet_done; @@ -1324,7 +1324,7 @@ ident_inet(const SockAddr remote_addr, { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not send query to IDENT server at address \"%s\", port %s: %m", + errmsg("could not send query to Ident server at address \"%s\", port %s: %m", remote_addr_s, ident_port))); ident_return = false; goto ident_inet_done; @@ -1339,7 +1339,7 @@ ident_inet(const SockAddr remote_addr, { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not receive response from IDENT server at address \"%s\", port %s: %m", + errmsg("could not receive response from Ident server at address \"%s\", port %s: %m", remote_addr_s, ident_port))); ident_return = false; goto ident_inet_done; @@ -1380,7 +1380,7 @@ ident_unix(int sock, char *ident_user) /* We didn't get a valid credentials struct. */ ereport(LOG, (errcode_for_socket_access(), - errmsg("could not receive credentials: %m"))); + errmsg("could not get peer credentials: %m"))); return false; } @@ -1389,7 +1389,7 @@ ident_unix(int sock, char *ident_user) if (pass == NULL) { ereport(LOG, - (errmsg("local user with uid %d is not known to getpwuid", + (errmsg("local user with ID %d does not exist", (int) uid))); return false; } @@ -1411,7 +1411,7 @@ ident_unix(int sock, char *ident_user) /* We didn't get a valid credentials struct. */ ereport(LOG, (errcode_for_socket_access(), - errmsg("could not receive credentials: %m"))); + errmsg("could not get peer credentials: %m"))); return false; } @@ -1420,7 +1420,7 @@ ident_unix(int sock, char *ident_user) if (pass == NULL) { ereport(LOG, - (errmsg("local user with uid %d is not known to getpwuid", + (errmsg("local user with ID %d does not exist", (int) peercred.uid))); return false; } @@ -1479,7 +1479,7 @@ ident_unix(int sock, char *ident_user) { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not receive credentials: %m"))); + errmsg("could not get peer credentials: %m"))); return false; } @@ -1490,7 +1490,7 @@ ident_unix(int sock, char *ident_user) if (pw == NULL) { ereport(LOG, - (errmsg("local user with uid %d is not known to getpwuid", + (errmsg("local user with ID %d does not exist", (int) cred->cruid))); return false; } @@ -1502,7 +1502,7 @@ ident_unix(int sock, char *ident_user) #else ereport(LOG, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("IDENT auth is not supported on local connections on this platform"))); + errmsg("Ident authentication is not supported on local connections on this platform"))); return false; #endif diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index 6d4a4ea017..f0778e951e 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -30,7 +30,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.165 2003/08/12 22:42:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.166 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -245,7 +245,7 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, { if (hostName) ereport(LOG, - (errmsg("could not translate hostname \"%s\", service \"%s\" to address: %s", + (errmsg("could not translate host name \"%s\", service \"%s\" to address: %s", hostName, service, gai_strerror(ret)))); else ereport(LOG, @@ -356,7 +356,7 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber, familyDesc), (IS_AF_UNIX(addr->ai_family)) ? errhint("Is another postmaster already running on port %d?" - " If not, remove socket node \"%s\" and retry.", + " If not, remove socket file \"%s\" and retry.", (int) portNumber, sock_path) : errhint("Is another postmaster already running on port %d?" " If not, wait a few seconds and retry.", @@ -482,7 +482,7 @@ Setup_AF_UNIX(void) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not set group of \"%s\": %m", + errmsg("could not set group of file \"%s\": %m", sock_path))); return STATUS_ERROR; } @@ -493,7 +493,7 @@ Setup_AF_UNIX(void) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not set permissions of \"%s\": %m", + errmsg("could not set permissions of file \"%s\": %m", sock_path))); return STATUS_ERROR; } diff --git a/src/backend/main/main.c b/src/backend/main/main.c index 82dfe15270..53a2bc77cb 100644 --- a/src/backend/main/main.c +++ b/src/backend/main/main.c @@ -13,7 +13,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.62 2003/09/09 15:19:31 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.63 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -173,9 +173,9 @@ main(int argc, char *argv[]) { fprintf(stderr, gettext("\"root\" execution of the PostgreSQL server is not permitted.\n" - "The server must be started under an unprivileged user id to prevent\n" + "The server must be started under an unprivileged user ID to prevent\n" "possible system security compromise. See the documentation for\n" - "more information on how to properly start the server.\n" + "more information on how to properly start the server.\n" )); exit(1); } @@ -193,7 +193,7 @@ main(int argc, char *argv[]) if (getuid() != geteuid()) { fprintf(stderr, - gettext("%s: real and effective user ids must match\n"), + gettext("%s: real and effective user IDs must match\n"), argv[0]); exit(1); } @@ -238,7 +238,7 @@ main(int argc, char *argv[]) pw = getpwuid(geteuid()); if (pw == NULL) { - fprintf(stderr, gettext("%s: invalid effective uid: %d\n"), + fprintf(stderr, gettext("%s: invalid effective UID: %d\n"), new_argv[0], (int) geteuid()); exit(1); } @@ -251,7 +251,7 @@ main(int argc, char *argv[]) pw_name_persist = malloc(namesize); if (!GetUserName(pw_name_persist, &namesize)) { - fprintf(stderr, gettext("%s: GetUserName failed\n"), + fprintf(stderr, gettext("%s: could not determine user name (GetUserName failed)\n"), new_argv[0]); exit(1); } diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 1c53c8e9f5..2dcfc2e561 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.107 2003/08/11 20:46:46 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.108 2003/09/25 06:57:59 petere Exp $ * *------------------------------------------------------------------------- */ @@ -211,7 +211,7 @@ set_inherited_rel_pathlist(Query *root, RelOptInfo *rel, if (intMember(parentRTindex, root->rowMarks)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("SELECT FOR UPDATE is not supported for inherit queries"))); + errmsg("SELECT FOR UPDATE is not supported for inheritance queries"))); /* * The executor will check the parent table's access permissions when diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index 7547907594..174c83cd21 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.81 2003/08/04 02:40:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.82 2003/09/25 06:58:00 petere Exp $ * *------------------------------------------------------------------------- */ @@ -818,7 +818,7 @@ select_mergejoin_clauses(RelOptInfo *joinrel, restrictinfo->mergejoinoperator == InvalidOid) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("FULL JOIN is only supported with mergejoinable join conditions"))); + errmsg("FULL JOIN is only supported with merge-joinable join conditions"))); break; default: /* otherwise, it's OK to have nonmergeable join quals */ diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index 51064a0060..eec153b70d 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.90 2003/08/04 02:40:01 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.91 2003/09/25 06:58:00 petere Exp $ * *------------------------------------------------------------------------- */ @@ -287,7 +287,7 @@ distribute_quals_to_rels(Query *root, Node *jtnode) */ ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("UNION JOIN is not implemented yet"))); + errmsg("UNION JOIN is not implemented"))); break; default: elog(ERROR, "unrecognized join type: %d", @@ -344,7 +344,7 @@ mark_baserels_for_outer_join(Query *root, Relids rels, Relids outerrels) if (intMember(relno, root->rowMarks)) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("SELECT FOR UPDATE cannot be applied to the nullable side of an OUTER JOIN"))); + errmsg("SELECT FOR UPDATE cannot be applied to the nullable side of an outer join"))); } rel->outerjoinset = outerrels; @@ -773,7 +773,7 @@ process_implied_equality(Query *root, pgopform->oprresult != BOOLOID) ereport(ERROR, (errcode(ERRCODE_INVALID_FUNCTION_DEFINITION), - errmsg("equality operator for types %s and %s should be mergejoinable, but isn't", + errmsg("equality operator for types %s and %s should be merge-joinable, but isn't", format_type_be(ltype), format_type_be(rtype)))); clause = make_opclause(oprid(eq_operator), /* opno */ diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index c29d127acf..73010f2f37 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.160 2003/08/17 19:58:05 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.161 2003/09/25 06:58:00 petere Exp $ * *------------------------------------------------------------------------- */ @@ -654,7 +654,7 @@ grouping_planner(Query *parse, double tuple_fraction) if (PlannerQueryLevel > 1) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("SELECT FOR UPDATE is not allowed in subselects"))); + errmsg("SELECT FOR UPDATE is not allowed in subqueries"))); foreach(l, parse->rowMarks) { diff --git a/src/backend/optimizer/prep/prepjointree.c b/src/backend/optimizer/prep/prepjointree.c index 615d6af7e9..687a702c78 100644 --- a/src/backend/optimizer/prep/prepjointree.c +++ b/src/backend/optimizer/prep/prepjointree.c @@ -16,7 +16,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepjointree.c,v 1.11 2003/08/08 21:41:52 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepjointree.c,v 1.12 2003/09/25 06:58:00 petere Exp $ * *------------------------------------------------------------------------- */ @@ -337,7 +337,7 @@ pull_up_subqueries(Query *parse, Node *jtnode, bool below_outer_join) */ ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("UNION JOIN is not implemented yet"))); + errmsg("UNION JOIN is not implemented"))); break; default: elog(ERROR, "unrecognized join type: %d", diff --git a/src/backend/parser/analyze.c b/src/backend/parser/analyze.c index 832c98a1c1..37f543c1ea 100644 --- a/src/backend/parser/analyze.c +++ b/src/backend/parser/analyze.c @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.287 2003/08/11 23:04:49 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.288 2003/09/25 06:58:00 petere Exp $ * *------------------------------------------------------------------------- */ @@ -970,7 +970,7 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt, snamespace = get_namespace_name(RangeVarGetCreationNamespace(cxt->relation)); ereport(NOTICE, - (errmsg("%s will create implicit sequence \"%s\" for SERIAL column \"%s.%s\"", + (errmsg("%s will create implicit sequence \"%s\" for \"serial\" column \"%s.%s\"", cxt->stmtType, sname, cxt->relation->relname, column->colname))); @@ -1054,8 +1054,8 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt, if (saw_nullable && column->is_not_null) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("conflicting NULL/NOT NULL declarations for \"%s.%s\"", - cxt->relation->relname, column->colname))); + errmsg("conflicting NULL/NOT NULL declarations for column \"%s\" of table \"%s\"", + column->colname, cxt->relation->relname))); column->is_not_null = FALSE; saw_nullable = true; break; @@ -1064,8 +1064,8 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt, if (saw_nullable && !column->is_not_null) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("conflicting NULL/NOT NULL declarations for \"%s.%s\"", - cxt->relation->relname, column->colname))); + errmsg("conflicting NULL/NOT NULL declarations for column \"%s\" of table \"%s\"", + column->colname, cxt->relation->relname))); column->is_not_null = TRUE; saw_nullable = true; break; @@ -1074,8 +1074,8 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt, if (column->raw_default != NULL) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("multiple DEFAULT values specified for \"%s.%s\"", - cxt->relation->relname, column->colname))); + errmsg("multiple default values specified for column \"%s\" of table \"%s\"", + column->colname, cxt->relation->relname))); column->raw_default = constraint->raw_expr; Assert(constraint->cooked_expr == NULL); break; @@ -1390,7 +1390,7 @@ transformIndexConstraints(ParseState *pstate, CreateStmtContext *cxt) if (rel->rd_rel->relkind != RELKIND_RELATION) ereport(ERROR, (errcode(ERRCODE_WRONG_OBJECT_TYPE), - errmsg("inherited table \"%s\" is not a relation", + errmsg("inherited relation \"%s\" is not a table", inh->relname))); for (count = 0; count < rel->rd_att->natts; count++) { @@ -1447,12 +1447,18 @@ transformIndexConstraints(ParseState *pstate, CreateStmtContext *cxt) { iparam = (IndexElem *) lfirst(columns); if (iparam->name && strcmp(key, iparam->name) == 0) - ereport(ERROR, - (errcode(ERRCODE_DUPLICATE_COLUMN), - /* translator: second %s is PRIMARY KEY or UNIQUE */ - errmsg("column \"%s\" appears twice in %s constraint", - key, - index->primary ? "PRIMARY KEY" : "UNIQUE"))); + { + if (index->primary) + ereport(ERROR, + (errcode(ERRCODE_DUPLICATE_COLUMN), + errmsg("column \"%s\" appears twice in primary key constraint", + key))); + else + ereport(ERROR, + (errcode(ERRCODE_DUPLICATE_COLUMN), + errmsg("column \"%s\" appears twice in unique constraint", + key))); + } } /* OK, add it to the index definition */ @@ -1560,8 +1566,8 @@ transformFKConstraints(ParseState *pstate, CreateStmtContext *cxt, return; ereport(NOTICE, - (errmsg("%s will create implicit trigger(s) for FOREIGN KEY check(s)", - cxt->stmtType))); + (errmsg("%s will create implicit triggers for foreign-key checks", + cxt->stmtType))); /* * For ALTER TABLE ADD CONSTRAINT, nothing to do. For CREATE TABLE or @@ -2764,11 +2770,11 @@ transformExecuteStmt(ParseState *pstate, ExecuteStmt *stmt) if (pstate->p_hasSubLinks) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot use sub-select in EXECUTE parameter"))); + errmsg("cannot use subquery in EXECUTE parameter"))); if (pstate->p_hasAggs) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), - errmsg("cannot use aggregate in EXECUTE parameter"))); + errmsg("cannot use aggregate function in EXECUTE parameter"))); given_type_id = exprType(expr); expected_type_id = lfirsto(paramtypes); @@ -2816,7 +2822,7 @@ CheckSelectForUpdate(Query *qry) if (qry->hasAggs) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("SELECT FOR UPDATE is not allowed with AGGREGATE"))); + errmsg("SELECT FOR UPDATE is not allowed with aggregate functions"))); } static void @@ -2999,7 +3005,7 @@ transformConstraintAttrs(List *constraintList) ((FkConstraint *) lastprimarynode)->initdeferred) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("INITIALLY DEFERRED constraint must be DEFERRABLE"))); + errmsg("constraint declared INITIALLY DEFERRED must be DEFERRABLE"))); break; case CONSTR_ATTR_DEFERRED: if (lastprimarynode == NULL || @@ -3223,7 +3229,7 @@ check_parameter_resolution_walker(Node *node, if (param->paramtype != context->paramTypes[paramno - 1]) ereport(ERROR, (errcode(ERRCODE_AMBIGUOUS_PARAMETER), - errmsg("could not determine datatype of parameter $%d", + errmsg("could not determine data type of parameter $%d", paramno))); } return false; diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index f84c277ec3..914b715040 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.433 2003/09/15 22:28:57 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.434 2003/09/25 06:58:00 petere Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -1767,7 +1767,7 @@ key_match: MATCH FULL { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("FOREIGN KEY/MATCH PARTIAL is not yet implemented"))); + errmsg("MATCH PARTIAL not yet implemented"))); $$ = FKCONSTR_MATCH_PARTIAL; } | MATCH SIMPLE @@ -4762,7 +4762,7 @@ table_ref: relation_expr */ ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("sub-select in FROM must have an alias"), + errmsg("subquery in FROM must have an alias"), errhint("For example, FROM (SELECT ...) [AS] foo."))); $$ = NULL; } @@ -5190,7 +5190,7 @@ opt_float: '(' Iconst ')' if ($2 < 1) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("precision for FLOAT must be at least 1 bit"))); + errmsg("precision for type float must be at least 1 bit"))); else if ($2 <= 24) $$ = SystemTypeName("float4"); else if ($2 <= 53) @@ -5198,7 +5198,7 @@ opt_float: '(' Iconst ')' else ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("precision for FLOAT must be less than 54 bits"))); + errmsg("precision for type float must be less than 54 bits"))); } | /*EMPTY*/ { @@ -7632,7 +7632,7 @@ SpecialRuleRelation: else ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("OLD used in non-rule query"))); + errmsg("OLD used in query that is not in a rule"))); } | NEW { @@ -7641,7 +7641,7 @@ SpecialRuleRelation: else ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("NEW used in non-rule query"))); + errmsg("NEW used in query that is not in a rule"))); } ; diff --git a/src/backend/parser/parse_agg.c b/src/backend/parser/parse_agg.c index ee78e3df89..7250e5f4bc 100644 --- a/src/backend/parser/parse_agg.c +++ b/src/backend/parser/parse_agg.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.57 2003/08/04 02:40:01 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.58 2003/09/25 06:58:00 petere Exp $ * *------------------------------------------------------------------------- */ @@ -302,12 +302,12 @@ check_ungrouped_columns_walker(Node *node, if (context->sublevels_up == 0) ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), - errmsg("attribute \"%s.%s\" must be GROUPed or used in an aggregate function", + errmsg("column \"%s.%s\" must appear in GROUP BY clause or used in an aggregate function", rte->eref->aliasname, attname))); else ereport(ERROR, (errcode(ERRCODE_GROUPING_ERROR), - errmsg("sub-select uses un-GROUPed attribute \"%s.%s\" from outer query", + errmsg("subquery uses ungrouped column \"%s.%s\" from outer query", rte->eref->aliasname, attname))); } diff --git a/src/backend/parser/parse_clause.c b/src/backend/parser/parse_clause.c index b31e70205d..ac5543735e 100644 --- a/src/backend/parser/parse_clause.c +++ b/src/backend/parser/parse_clause.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.122 2003/08/17 19:58:05 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.123 2003/09/25 06:58:01 petere Exp $ * *------------------------------------------------------------------------- */ @@ -393,7 +393,7 @@ transformRangeSubselect(ParseState *pstate, RangeSubselect *r) if (r->alias == NULL) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("sub-select in FROM must have an alias"))); + errmsg("subquery in FROM must have an alias"))); /* * Analyze and transform the subquery. @@ -406,17 +406,17 @@ transformRangeSubselect(ParseState *pstate, RangeSubselect *r) * check 'em anyway. */ if (length(parsetrees) != 1) - elog(ERROR, "unexpected parse analysis result for sub-select in FROM"); + elog(ERROR, "unexpected parse analysis result for subquery in FROM"); query = (Query *) lfirst(parsetrees); if (query == NULL || !IsA(query, Query)) - elog(ERROR, "unexpected parse analysis result for sub-select in FROM"); + elog(ERROR, "unexpected parse analysis result for subquery in FROM"); if (query->commandType != CMD_SELECT) - elog(ERROR, "expected SELECT query from sub-select in FROM"); + elog(ERROR, "expected SELECT query from subquery in FROM"); if (query->resultRelation != 0 || query->into != NULL) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("sub-select in FROM may not have SELECT INTO"))); + errmsg("subquery in FROM may not have SELECT INTO"))); /* * The subquery cannot make use of any variables from FROM items @@ -438,7 +438,7 @@ transformRangeSubselect(ParseState *pstate, RangeSubselect *r) if (contain_vars_of_level((Node *) query, 1)) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("sub-select in FROM may not refer to other relations of same query level"))); + errmsg("subquery in FROM may not refer to other relations of same query level"))); } /* @@ -725,7 +725,7 @@ transformFromClauseItem(ParseState *pstate, Node *n, List **containedRels) if (strcmp(res_colname, u_colname) == 0) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("USING column name \"%s\" appears more than once", + errmsg("column name \"%s\" appears more than once in USING clause", u_colname))); } @@ -749,7 +749,7 @@ transformFromClauseItem(ParseState *pstate, Node *n, List **containedRels) if (l_index < 0) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("JOIN/USING column \"%s\" not found in left table", + errmsg("column \"%s\" specified in USING clause not found in left table", u_colname))); /* Find it in right input */ @@ -772,7 +772,7 @@ transformFromClauseItem(ParseState *pstate, Node *n, List **containedRels) if (r_index < 0) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("JOIN/USING column \"%s\" not found in right table", + errmsg("column \"%s\" specified in USING clause not found in right table", u_colname))); l_colvar = nth(l_index, l_colvars); @@ -1033,7 +1033,7 @@ transformLimitClause(ParseState *pstate, Node *clause, ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), /* translator: %s is name of a SQL construct, eg LIMIT */ - errmsg("argument of %s must not contain sub-selects", + errmsg("argument of %s must not contain subqueries", constructName))); } @@ -1134,11 +1134,7 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause) if (!equal(target_result->expr, tle->expr)) ereport(ERROR, (errcode(ERRCODE_AMBIGUOUS_COLUMN), - - /* - * translator: first %s is name of a SQL - * construct, eg ORDER BY - */ + /* translator: first %s is name of a SQL construct, eg ORDER BY */ errmsg("%s \"%s\" is ambiguous", clauseText[clause], name))); } @@ -1178,7 +1174,7 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), /* translator: %s is name of a SQL construct, eg ORDER BY */ - errmsg("%s position %d is not in target list", + errmsg("%s position %d is not in select list", clauseText[clause], target_pos))); } @@ -1363,7 +1359,7 @@ transformDistinctClause(ParseState *pstate, List *distinctlist, if (tle->resdom->resjunk) ereport(ERROR, (errcode(ERRCODE_INVALID_COLUMN_REFERENCE), - errmsg("for SELECT DISTINCT, ORDER BY expressions must appear in target list"))); + errmsg("for SELECT DISTINCT, ORDER BY expressions must appear in select list"))); else result = lappend(result, copyObject(scl)); } diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c index 474a2923be..9d11663a1e 100644 --- a/src/backend/parser/parse_coerce.c +++ b/src/backend/parser/parse_coerce.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.109 2003/09/23 17:12:53 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_coerce.c,v 2.110 2003/09/25 06:58:01 petere Exp $ * *------------------------------------------------------------------------- */ @@ -914,7 +914,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (OidIsValid(elem_typeid) && actual_type != elem_typeid) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("arguments declared ANYELEMENT are not all alike"), + errmsg("arguments declared \"anyelement\" are not all alike"), errdetail("%s versus %s", format_type_be(elem_typeid), format_type_be(actual_type)))); @@ -931,7 +931,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (OidIsValid(array_typeid) && actual_type != array_typeid) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("arguments declared ANYARRAY are not all alike"), + errmsg("arguments declared \"anyarray\" are not all alike"), errdetail("%s versus %s", format_type_be(array_typeid), format_type_be(actual_type)))); @@ -960,7 +960,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (!OidIsValid(array_typelem)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("argument declared ANYARRAY is not an array but %s", + errmsg("argument declared \"anyarray\" is not an array but %s", format_type_be(array_typeid)))); } @@ -977,7 +977,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, /* otherwise, they better match */ ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("argument declared ANYARRAY is not consistent with argument declared ANYELEMENT"), + errmsg("argument declared \"anyarray\" is not consistent with argument declared \"anyelement\""), errdetail("%s versus %s", format_type_be(array_typeid), format_type_be(elem_typeid)))); @@ -988,7 +988,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, /* Only way to get here is if all the generic args are UNKNOWN */ ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("could not determine ANYARRAY/ANYELEMENT type because input is UNKNOWN"))); + errmsg("could not determine anyarray/anyelement type because input has type \"unknown\""))); } /* @@ -1013,7 +1013,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (!OidIsValid(array_typeid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("could not find array type for datatype %s", + errmsg("could not find array type for data type %s", format_type_be(elem_typeid)))); } declared_arg_types[j] = array_typeid; @@ -1030,7 +1030,7 @@ enforce_generic_type_consistency(Oid *actual_arg_types, if (!OidIsValid(array_typeid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("could not find array type for datatype %s", + errmsg("could not find array type for data type %s", format_type_be(elem_typeid)))); } return array_typeid; @@ -1072,7 +1072,7 @@ resolve_generic_type(Oid declared_type, if (!OidIsValid(array_typelem)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("argument declared ANYARRAY is not an array but %s", + errmsg("argument declared \"anyarray\" is not an array but type %s", format_type_be(context_actual_type)))); return context_actual_type; } @@ -1084,7 +1084,7 @@ resolve_generic_type(Oid declared_type, if (!OidIsValid(array_typeid)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("could not find array type for datatype %s", + errmsg("could not find array type for data type %s", format_type_be(context_actual_type)))); return array_typeid; } @@ -1099,7 +1099,7 @@ resolve_generic_type(Oid declared_type, if (!OidIsValid(array_typelem)) ereport(ERROR, (errcode(ERRCODE_DATATYPE_MISMATCH), - errmsg("argument declared ANYARRAY is not an array but %s", + errmsg("argument declared \"anyarray\" is not an array but type %s", format_type_be(context_actual_type)))); return array_typelem; } diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 06f8917db6..88768b3b4e 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.161 2003/08/17 23:43:26 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.162 2003/09/25 06:58:01 petere Exp $ * *------------------------------------------------------------------------- */ @@ -103,8 +103,9 @@ transformExpr(ParseState *pstate, Node *expr) ereport(ERROR, (errcode(ERRCODE_STATEMENT_TOO_COMPLEX), errmsg("expression too complex"), - errdetail("Nesting depth exceeds MAX_EXPR_DEPTH = %d.", - max_expr_depth))); + errdetail("Nesting depth exceeds maximum expression depth %d.", + max_expr_depth), + errhint("Increase the configuration parameter \"max_expr_depth\"."))); switch (nodeTag(expr)) { @@ -493,13 +494,13 @@ transformExpr(ParseState *pstate, Node *expr) ((TargetEntry *) lfirst(tlist))->resdom->resjunk) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("sub-select must return a column"))); + errmsg("subquery must return a column"))); while ((tlist = lnext(tlist)) != NIL) { if (!((TargetEntry *) lfirst(tlist))->resdom->resjunk) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("sub-select must return only one column"))); + errmsg("subquery must return only one column"))); } /* @@ -582,7 +583,7 @@ transformExpr(ParseState *pstate, Node *expr) if (left_list == NIL) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("sub-select has too many columns"))); + errmsg("subquery has too many columns"))); lexpr = lfirst(left_list); left_list = lnext(left_list); @@ -620,7 +621,7 @@ transformExpr(ParseState *pstate, Node *expr) if (left_list != NIL) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("sub-select has too few columns"))); + errmsg("subquery has too few columns"))); if (needNot) { @@ -792,7 +793,7 @@ transformExpr(ParseState *pstate, Node *expr) if (!OidIsValid(element_type)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("could not find array type for datatype %s", + errmsg("could not find array type for data type %s", format_type_be(array_type)))); } @@ -1030,7 +1031,7 @@ transformColumnRef(ParseState *pstate, ColumnRef *cref) else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" not found", name))); + errmsg("column \"%s\" does not exist", name))); } break; } @@ -1224,7 +1225,7 @@ exprType(Node *expr) if (!OidIsValid(type)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("could not find array type for datatype %s", + errmsg("could not find array type for data type %s", format_type_be(tent->resdom->restype)))); } } @@ -1263,7 +1264,7 @@ exprType(Node *expr) if (!OidIsValid(type)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("could not find array type for datatype %s", + errmsg("could not find array type for data type %s", format_type_be(tent->resdom->restype)))); } } diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index f836f19fb5..e3691716f1 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.159 2003/08/04 02:40:02 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.160 2003/09/25 06:58:01 petere Exp $ * *------------------------------------------------------------------------- */ @@ -221,7 +221,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot pass result of sub-select or join %s to a function", + errmsg("cannot pass result of subquery or join %s to a function", relname))); toid = InvalidOid; /* keep compiler quiet */ break; @@ -298,7 +298,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" not found in datatype %s", + errmsg("attribute \"%s\" not found in data type %s", colname, format_type_be(relTypeId)))); } @@ -312,7 +312,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, func_signature_string(funcname, nargs, actual_arg_types)), errhint("Could not choose a best candidate function. " - "You may need to add explicit typecasts."))); + "You may need to add explicit type casts."))); else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), @@ -320,7 +320,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs, func_signature_string(funcname, nargs, actual_arg_types)), errhint("No function matches the given name and argument types. " - "You may need to add explicit typecasts."))); + "You may need to add explicit type casts."))); } /* @@ -1267,7 +1267,7 @@ setup_field_select(Node *input, char *attname, Oid relid) if (attno == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", attname, get_rel_name(relid)))); fselect->arg = (Expr *) input; @@ -1341,7 +1341,7 @@ ParseComplexProjection(char *funcname, Node *first_arg) } /* - * Simple helper routine for delivering "no such attribute" error message + * Simple helper routine for delivering "column does not exist" error message */ static void unknown_attribute(const char *schemaname, const char *relname, @@ -1350,12 +1350,12 @@ unknown_attribute(const char *schemaname, const char *relname, if (schemaname) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("no such attribute %s.%s.%s", + errmsg("column %s.%s.%s does not exist", schemaname, relname, attname))); else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("no such attribute %s.%s", + errmsg("column %s.%s does not exist", relname, attname))); } diff --git a/src/backend/parser/parse_oper.c b/src/backend/parser/parse_oper.c index 244cd76964..e973e88d52 100644 --- a/src/backend/parser/parse_oper.c +++ b/src/backend/parser/parse_oper.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.74 2003/08/17 19:58:05 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.75 2003/09/25 06:58:01 petere Exp $ * *------------------------------------------------------------------------- */ @@ -754,14 +754,14 @@ op_error(List *op, char oprkind, Oid arg1, Oid arg2, FuncDetailCode fdresult) errmsg("operator is not unique: %s", op_signature_string(op, oprkind, arg1, arg2)), errhint("Could not choose a best candidate operator. " - "You may need to add explicit typecasts."))); + "You may need to add explicit type casts."))); else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), errmsg("operator does not exist: %s", op_signature_string(op, oprkind, arg1, arg2)), errhint("No operator matches the given name and argument type(s). " - "You may need to add explicit typecasts."))); + "You may need to add explicit type casts."))); } /* @@ -893,7 +893,7 @@ make_scalar_array_op(ParseState *pstate, List *opname, if (!OidIsValid(res_atypeId)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("could not find datatype for array of %s", + errmsg("could not find array type for data type %s", format_type_be(declared_arg_types[1])))); actual_arg_types[1] = atypeId; declared_arg_types[1] = res_atypeId; diff --git a/src/backend/parser/parse_relation.c b/src/backend/parser/parse_relation.c index ba1eea0475..7f8bda311c 100644 --- a/src/backend/parser/parse_relation.c +++ b/src/backend/parser/parse_relation.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.89 2003/08/11 23:04:49 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_relation.c,v 1.90 2003/09/25 06:58:01 petere Exp $ * *------------------------------------------------------------------------- */ @@ -932,7 +932,7 @@ addRangeTableEntryForFunction(ParseState *pstate, if (funcrettype != RECORDOID) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("a column definition list is only allowed for functions returning RECORD"))); + errmsg("a column definition list is only allowed for functions returning \"record\""))); } else { @@ -943,7 +943,7 @@ addRangeTableEntryForFunction(ParseState *pstate, if (funcrettype == RECORDOID) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("a column definition list is required for functions returning RECORD"))); + errmsg("a column definition list is required for functions returning \"record\""))); } functyptype = get_typtype(funcrettype); @@ -1580,7 +1580,7 @@ get_rte_attribute_type(RangeTblEntry *rte, AttrNumber attnum, if (att_tup->attisdropped) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", NameStr(att_tup->attname), get_rel_name(rte->relid)))); *vartype = att_tup->atttypid; @@ -1638,7 +1638,7 @@ get_rte_attribute_type(RangeTblEntry *rte, AttrNumber attnum, if (att_tup->attisdropped) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", NameStr(att_tup->attname), get_rel_name(funcrelid)))); *vartype = att_tup->atttypid; @@ -1817,7 +1817,7 @@ attnameAttNum(Relation rd, const char *attname, bool sysColOK) /* on failure */ ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", attname, RelationGetRelationName(rd)))); return InvalidAttrNumber; /* keep compiler quiet */ } diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c index 5d5ee56eb1..e7bdf7572e 100644 --- a/src/backend/parser/parse_target.c +++ b/src/backend/parser/parse_target.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.112 2003/08/11 23:04:49 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.113 2003/09/25 06:58:01 petere Exp $ * *------------------------------------------------------------------------- */ @@ -63,7 +63,7 @@ transformTargetEntry(ParseState *pstate, if (IsA(expr, RangeVar)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("relation reference \"%s\" cannot be used as a targetlist entry", + errmsg("relation reference \"%s\" cannot be used as a select-list entry", ((RangeVar *) expr)->relname), errhint("Write \"%s\".* to denote all the columns of the relation.", ((RangeVar *) expr)->relname))); @@ -328,7 +328,7 @@ updateTargetListEntry(ParseState *pstate, if (attrno <= 0) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot assign to system attribute \"%s\"", + errmsg("cannot assign to system column \"%s\"", colname))); attrtype = attnumTypeId(rd, attrno); attrtypmod = rd->rd_att->attrs[attrno - 1]->atttypmod; @@ -497,7 +497,7 @@ checkInsertTargets(ParseState *pstate, List *cols, List **attrnos) if (intMember(attrno, *attrnos)) ereport(ERROR, (errcode(ERRCODE_DUPLICATE_COLUMN), - errmsg("attribute \"%s\" specified more than once", + errmsg("column \"%s\" specified more than once", name))); *attrnos = lappendi(*attrnos, attrno); } diff --git a/src/backend/parser/parse_type.c b/src/backend/parser/parse_type.c index b621e62c70..a706ee0b43 100644 --- a/src/backend/parser/parse_type.c +++ b/src/backend/parser/parse_type.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.61 2003/08/04 02:40:02 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.62 2003/09/25 06:58:01 petere Exp $ * *------------------------------------------------------------------------- */ @@ -91,7 +91,7 @@ LookupTypeName(const TypeName *typename) if (attnum == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("attribute \"%s\" of relation \"%s\" does not exist", + errmsg("column \"%s\" of relation \"%s\" does not exist", field, rel->relname))); restype = get_atttype(relid, attnum); diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index b027189082..3808402cc6 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/postmaster/pgstat.c @@ -13,7 +13,7 @@ * * Copyright (c) 2001-2003, PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.44 2003/09/07 14:44:40 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/postmaster/pgstat.c,v 1.45 2003/09/25 06:58:01 petere Exp $ * ---------- */ #include "postgres.h" @@ -217,7 +217,7 @@ pgstat_init(void) { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not create socket for statistics: %m"))); + errmsg("could not create socket for statistics collector: %m"))); goto startup_failed; } @@ -229,7 +229,7 @@ pgstat_init(void) { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not bind socket for statistics: %m"))); + errmsg("could not bind socket for statistics collector: %m"))); goto startup_failed; } @@ -241,7 +241,7 @@ pgstat_init(void) { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not get address of socket for statistics: %m"))); + errmsg("could not get address of socket for statistics collector: %m"))); goto startup_failed; } @@ -255,7 +255,7 @@ pgstat_init(void) { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not connect socket for statistics: %m"))); + errmsg("could not connect socket for statistics collector: %m"))); goto startup_failed; } @@ -269,7 +269,7 @@ pgstat_init(void) { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not set statistics socket to nonblock mode: %m"))); + errmsg("could not set statistics collector socket to nonblocking mode: %m"))); goto startup_failed; } @@ -1328,7 +1328,7 @@ pgstat_main(void) /* assume the problem is out-of-memory */ ereport(LOG, (errcode(ERRCODE_OUT_OF_MEMORY), - errmsg("out of memory in statistics collector --- abort"))); + errmsg("out of memory in statistics collector --- abort"))); exit(1); } @@ -1340,7 +1340,8 @@ pgstat_main(void) if (pgStatBeTable == NULL) { ereport(LOG, - (errmsg("allocation of backend table failed"))); + (errcode(ERRCODE_OUT_OF_MEMORY), + errmsg("out of memory in statistics collector --- abort"))); exit(1); } memset(pgStatBeTable, 0, sizeof(PgStat_StatBeEntry) * MaxBackends); @@ -1406,7 +1407,7 @@ pgstat_main(void) continue; ereport(LOG, (errcode_for_socket_access(), - errmsg("select failed in statistics collector: %m"))); + errmsg("select() failed in statistics collector: %m"))); exit(1); } @@ -1448,7 +1449,7 @@ pgstat_main(void) continue; ereport(LOG, (errcode_for_socket_access(), - errmsg("could not read from statistics pipe: %m"))); + errmsg("could not read from statistics collector pipe: %m"))); exit(1); } if (len == 0) /* EOF on the pipe! */ @@ -1617,7 +1618,7 @@ pgstat_recvbuffer(void) { ereport(LOG, (errcode_for_socket_access(), - errmsg("could not set statistics pipe to nonblock mode: %m"))); + errmsg("could not set statistics collector pipe to nonblocking mode: %m"))); exit(1); } @@ -1690,7 +1691,7 @@ pgstat_recvbuffer(void) continue; ereport(LOG, (errcode_for_socket_access(), - errmsg("select failed in statistics buffer: %m"))); + errmsg("select() failed in statistics buffer: %m"))); exit(1); } @@ -1706,7 +1707,7 @@ pgstat_recvbuffer(void) { ereport(LOG, (errcode_for_socket_access(), - errmsg("failed to read statistics message: %m"))); + errmsg("could not read statistics message: %m"))); exit(1); } @@ -1771,7 +1772,7 @@ pgstat_recvbuffer(void) continue; /* not enough space in pipe */ ereport(LOG, (errcode_for_socket_access(), - errmsg("failed to write statistics pipe: %m"))); + errmsg("could not write to statistics collector pipe: %m"))); exit(1); } /* NB: len < xfr is okay */ @@ -1825,7 +1826,7 @@ pgstat_add_backend(PgStat_MsgHdr *msg) if (msg->m_backendid < 1 || msg->m_backendid > MaxBackends) { ereport(LOG, - (errmsg("invalid backend ID %d", msg->m_backendid))); + (errmsg("invalid server process ID %d", msg->m_backendid))); return -1; } @@ -2020,7 +2021,7 @@ pgstat_write_statsfile(void) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not write temp statistics file \"%s\": %m", + errmsg("could not open temporary statistics file \"%s\": %m", pgStat_tmpfname))); return; } @@ -2133,7 +2134,7 @@ pgstat_write_statsfile(void) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not write temp statistics file \"%s\": %m", + errmsg("could not close temporary statistics file \"%s\": %m", pgStat_tmpfname))); } else @@ -2142,7 +2143,7 @@ pgstat_write_statsfile(void) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not rename temp statistics file \"%s\" to \"%s\": %m", + errmsg("could not rename temporary statistics file \"%s\" to \"%s\": %m", pgStat_tmpfname, pgStat_fname))); } } @@ -2164,7 +2165,7 @@ pgstat_write_statsfile(void) HASH_REMOVE, NULL) == NULL) { ereport(LOG, - (errmsg("dead-backend hash table corrupted " + (errmsg("dead-server-process hash table corrupted " "during cleanup --- abort"))); exit(1); } diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index 4fc3840f44..9907cb3a8a 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -37,7 +37,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.345 2003/09/12 19:33:59 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.346 2003/09/25 06:58:01 petere Exp $ * * NOTES * @@ -358,9 +358,9 @@ checkDataDir(const char *checkdir) if (fp == NULL) { fprintf(stderr, - gettext("%s could not find the database system.\n" - "Expected to find it in the PGDATA directory \"%s\",\n" - "but failed to open file \"%s\": %s\n"), + gettext("%s: could not find the database system\n" + "Expected to find it in the directory \"%s\",\n" + "but could not open file \"%s\": %s\n"), progname, checkdir, path, strerror(errno)); ExitPostmaster(2); } @@ -582,7 +582,7 @@ PostmasterMain(int argc, char *argv[]) default: fprintf(stderr, - gettext("Try '%s --help' for more information.\n"), + gettext("Try \"%s --help\" for more information.\n"), progname); ExitPostmaster(1); } @@ -595,7 +595,7 @@ PostmasterMain(int argc, char *argv[]) { postmaster_error("invalid argument: \"%s\"", argv[optind]); fprintf(stderr, - gettext("Try '%s --help' for more information.\n"), + gettext("Try \"%s --help\" for more information.\n"), progname); ExitPostmaster(1); } @@ -680,7 +680,7 @@ PostmasterMain(int argc, char *argv[]) #ifdef USE_SSL if (EnableSSL && !NetServer) { - postmaster_error("for SSL, TCP/IP connections must be enabled"); + postmaster_error("TCP/IP connections must be enabled for SSL"); ExitPostmaster(1); } if (EnableSSL) @@ -797,7 +797,7 @@ PostmasterMain(int argc, char *argv[]) ListenSocket, MAXLISTEN); if (status != STATUS_OK) ereport(FATAL, - (errmsg("could not create UNIX stream port"))); + (errmsg("could not create Unix-domain socket"))); #endif XLOGPathInit(); @@ -939,7 +939,7 @@ pmdaemonize(int argc, char *argv[]) #ifdef HAVE_SETSID if (setsid() < 0) { - postmaster_error("could not disassociate from controlling TTY: %s", + postmaster_error("could not dissociate from controlling TTY: %s", strerror(errno)); ExitPostmaster(1); } @@ -1070,7 +1070,7 @@ ServerLoop(void) continue; ereport(LOG, (errcode_for_socket_access(), - errmsg("select failed in postmaster: %m"))); + errmsg("select() failed in postmaster: %m"))); return STATUS_ERROR; } @@ -2068,7 +2068,7 @@ LogChildExit(int lev, const char *procname, int pid, int exitstatus) * translator: %s is a noun phrase describing a child process, * such as "server process" */ - (errmsg("%s (pid %d) exited with exit code %d", + (errmsg("%s (PID %d) exited with exit code %d", procname, pid, WEXITSTATUS(exitstatus)))); else if (WIFSIGNALED(exitstatus)) ereport(lev, @@ -2077,7 +2077,7 @@ LogChildExit(int lev, const char *procname, int pid, int exitstatus) * translator: %s is a noun phrase describing a child process, * such as "server process" */ - (errmsg("%s (pid %d) was terminated by signal %d", + (errmsg("%s (PID %d) was terminated by signal %d", procname, pid, WTERMSIG(exitstatus)))); else ereport(lev, @@ -2086,7 +2086,7 @@ LogChildExit(int lev, const char *procname, int pid, int exitstatus) * translator: %s is a noun phrase describing a child process, * such as "server process" */ - (errmsg("%s (pid %d) exited with unexpected status %d", + (errmsg("%s (PID %d) exited with unexpected status %d", procname, pid, exitstatus))); } @@ -2609,7 +2609,7 @@ sigusr1_handler(SIGNAL_ARGS) ereport(LOG, (errmsg("checkpoints are occurring too frequently (%d seconds apart)", elapsed_secs), - errhint("Consider increasing 'checkpoint_segments'."))); + errhint("Consider increasing the configuration parameter \"checkpoint_segments\"."))); } LastSignalledCheckpoint = now; } diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c index 8abdd1bcb5..dfe693134b 100644 --- a/src/backend/rewrite/rewriteDefine.c +++ b/src/backend/rewrite/rewriteDefine.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.87 2003/09/17 17:19:17 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.88 2003/09/25 06:58:01 petere Exp $ * *------------------------------------------------------------------------- */ @@ -271,7 +271,7 @@ DefineQueryRewrite(RuleStmt *stmt) if (!is_instead || query->commandType != CMD_SELECT) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("only instead-select rules are currently supported on select"))); + errmsg("rules on SELECT rule must have action INSTEAD SELECT"))); /* * ... there can be no rule qual, ... @@ -279,7 +279,7 @@ DefineQueryRewrite(RuleStmt *stmt) if (event_qual != NULL) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("event qualifications are not implemented for rules on select"))); + errmsg("event qualifications are not implemented for rules on SELECT"))); /* * ... the targetlist of the SELECT action must exactly match the @@ -299,7 +299,7 @@ DefineQueryRewrite(RuleStmt *stmt) if (i > event_relation->rd_att->natts) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("select rule's target list has too many entries"))); + errmsg("SELECT rule's target list has too many entries"))); attr = event_relation->rd_att->attrs[i - 1]; attname = NameStr(attr->attname); @@ -320,12 +320,12 @@ DefineQueryRewrite(RuleStmt *stmt) if (strcmp(resdom->resname, attname) != 0) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("select rule's target entry %d has different column name from \"%s\"", i, attname))); + errmsg("SELECT rule's target entry %d has different column name from \"%s\"", i, attname))); if (attr->atttypid != resdom->restype) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("select rule's target entry %d has different type from attribute \"%s\"", i, attname))); + errmsg("SELECT rule's target entry %d has different type from column \"%s\"", i, attname))); /* * Allow typmods to be different only if one of them is -1, @@ -338,13 +338,13 @@ DefineQueryRewrite(RuleStmt *stmt) attr->atttypmod != -1 && resdom->restypmod != -1) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("select rule's target entry %d has different size from attribute \"%s\"", i, attname))); + errmsg("SELECT rule's target entry %d has different size from column \"%s\"", i, attname))); } if (i != event_relation->rd_att->natts) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("select rule's target list has too few entries"))); + errmsg("SELECT rule's target list has too few entries"))); /* * ... there must not be another ON SELECT rule already ... diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c index d0ca89ee6a..3cbfe3b8f7 100644 --- a/src/backend/rewrite/rewriteHandler.c +++ b/src/backend/rewrite/rewriteHandler.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.129 2003/08/11 23:04:49 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.130 2003/09/25 06:58:01 petere Exp $ * *------------------------------------------------------------------------- */ @@ -455,7 +455,7 @@ process_matched_tle(TargetEntry *src_tle, ((ArrayRef *) prior_tle->expr)->refrestype) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("multiple assignments to same attribute \"%s\"", + errmsg("multiple assignments to same column \"%s\"", attrName))); /* @@ -469,7 +469,7 @@ process_matched_tle(TargetEntry *src_tle, if (!equal(priorbottom, ((ArrayRef *) src_tle->expr)->refexpr)) ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("multiple assignments to same attribute \"%s\"", + errmsg("multiple assignments to same column \"%s\"", attrName))); /* diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c index d9c7967f7c..ea48d2f07a 100644 --- a/src/backend/rewrite/rewriteManip.c +++ b/src/backend/rewrite/rewriteManip.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.78 2003/08/11 20:46:46 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.79 2003/09/25 06:58:01 petere Exp $ * *------------------------------------------------------------------------- */ @@ -876,7 +876,7 @@ ResolveNew_mutator(Node *node, ResolveNew_context *context) if (var->varattno == InvalidAttrNumber) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot handle whole-tuple reference"))); + errmsg("cannot handle whole-row reference"))); tle = get_tle_by_resno(context->targetlist, var->varattno); diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 1be30d30e2..d95129df4e 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.140 2003/08/10 19:48:08 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.141 2003/09/25 06:58:01 petere Exp $ * *------------------------------------------------------------------------- */ @@ -231,14 +231,14 @@ ReadBufferInternal(Relation reln, BlockNumber blockNum, { ereport(WARNING, (errcode(ERRCODE_DATA_CORRUPTED), - errmsg("invalid page header in block %u of \"%s\"; zeroing out page", + errmsg("invalid page header in block %u of relation \"%s\"; zeroing out page", blockNum, RelationGetRelationName(reln)))); MemSet((char *) MAKE_PTR(bufHdr->data), 0, BLCKSZ); } else ereport(ERROR, (errcode(ERRCODE_DATA_CORRUPTED), - errmsg("invalid page header in block %u of \"%s\"", + errmsg("invalid page header in block %u of relation \"%s\"", blockNum, RelationGetRelationName(reln)))); } } diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index 0ff3451a16..5a31161e4b 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.101 2003/08/04 02:40:03 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/file/fd.c,v 1.102 2003/09/25 06:58:02 petere Exp $ * * NOTES: * @@ -331,7 +331,7 @@ pg_nofile(void) if ((no_files - RESERVE_FOR_LD) < FD_MINFREE) ereport(FATAL, (errcode(ERRCODE_INSUFFICIENT_RESOURCES), - errmsg("insufficient file descriptors available to start backend"), + errmsg("insufficient file descriptors available to start server process"), errdetail("System allows %ld, we need at least %d.", no_files, RESERVE_FOR_LD + FD_MINFREE))); diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c index 94578c4d9b..818f9acdfe 100644 --- a/src/backend/storage/freespace/freespace.c +++ b/src/backend/storage/freespace/freespace.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/freespace/freespace.c,v 1.21 2003/08/08 21:41:59 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/freespace/freespace.c,v 1.22 2003/09/25 06:58:02 petere Exp $ * * * NOTES: @@ -704,7 +704,7 @@ PrintFreeSpaceMapStatistics(int elevel) ereport(elevel, (errmsg("free space map: %d relations, %d pages stored; %.0f total pages needed", numRels, storedPages, needed), - errdetail("Allocated FSM size: %d relations + %d pages = %.0f KB shared mem.", + errdetail("Allocated FSM size: %d relations + %d pages = %.0f kB shared mem.", MaxFSMRelations, MaxFSMPages, (double) FreeSpaceShmemSize() / 1024.0))); } diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c index 0b80e0585e..16df9e9d42 100644 --- a/src/backend/storage/ipc/shmem.c +++ b/src/backend/storage/ipc/shmem.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.71 2003/09/21 17:57:21 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.72 2003/09/25 06:58:02 petere Exp $ * *------------------------------------------------------------------------- */ @@ -380,7 +380,7 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr) ereport(WARNING, (errcode(ERRCODE_OUT_OF_MEMORY), - errmsg("could not allocate \"%s\"", name))); + errmsg("could not allocate shared memory segment \"%s\"", name))); *foundPtr = FALSE; return NULL; } diff --git a/src/backend/storage/lmgr/deadlock.c b/src/backend/storage/lmgr/deadlock.c index 4ed712bcec..55e2292661 100644 --- a/src/backend/storage/lmgr/deadlock.c +++ b/src/backend/storage/lmgr/deadlock.c @@ -12,7 +12,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.24 2003/08/08 21:42:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.25 2003/09/25 06:58:02 petere Exp $ * * Interface: * @@ -864,7 +864,7 @@ DeadLockReport(void) { /* Lock is for transaction ID */ appendStringInfo(&buf, - gettext("Proc %d waits for %s on transaction %u; blocked by proc %d."), + gettext("Process %d waits for %s on transaction %u; blocked by process %d."), info->pid, GetLockmodeName(info->lockmode), info->locktag.objId.xid, @@ -874,7 +874,7 @@ DeadLockReport(void) { /* Lock is for a relation */ appendStringInfo(&buf, - gettext("Proc %d waits for %s on relation %u of database %u; blocked by proc %d."), + gettext("Process %d waits for %s on relation %u of database %u; blocked by process %d."), info->pid, GetLockmodeName(info->lockmode), info->locktag.relId, diff --git a/src/backend/storage/smgr/smgr.c b/src/backend/storage/smgr/smgr.c index 50d1d91d92..4050665105 100644 --- a/src/backend/storage/smgr/smgr.c +++ b/src/backend/storage/smgr/smgr.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.64 2003/08/04 02:40:04 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/smgr/smgr.c,v 1.65 2003/09/25 06:58:02 petere Exp $ * *------------------------------------------------------------------------- */ @@ -173,7 +173,7 @@ smgrcreate(int16 which, Relation reln) if ((fd = (*(smgrsw[which].smgr_create)) (reln)) < 0) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not create \"%s\": %m", + errmsg("could not create relation \"%s\": %m", RelationGetRelationName(reln)))); /* Add the relation to the list of stuff to delete at abort */ @@ -248,7 +248,7 @@ smgrextend(int16 which, Relation reln, BlockNumber blocknum, char *buffer) if (status == SM_FAIL) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not extend \"%s\": %m", + errmsg("could not extend relation \"%s\": %m", RelationGetRelationName(reln)), errhint("Check free disk space."))); @@ -275,7 +275,7 @@ smgropen(int16 which, Relation reln, bool failOK) if (!failOK) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not open \"%s\": %m", + errmsg("could not open file \"%s\": %m", RelationGetRelationName(reln)))); return fd; @@ -292,7 +292,7 @@ smgrclose(int16 which, Relation reln) if ((*(smgrsw[which].smgr_close)) (reln) == SM_FAIL) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not close \"%s\": %m", + errmsg("could not close relation \"%s\": %m", RelationGetRelationName(reln)))); return SM_SUCCESS; @@ -318,7 +318,7 @@ smgrread(int16 which, Relation reln, BlockNumber blocknum, char *buffer) if (status == SM_FAIL) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not read block %d of \"%s\": %m", + errmsg("could not read block %d of relation \"%s\": %m", blocknum, RelationGetRelationName(reln)))); return status; @@ -344,7 +344,7 @@ smgrwrite(int16 which, Relation reln, BlockNumber blocknum, char *buffer) if (status == SM_FAIL) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not write block %d of \"%s\": %m", + errmsg("could not write block %d of relation \"%s\": %m", blocknum, RelationGetRelationName(reln)))); return status; @@ -404,7 +404,7 @@ smgrnblocks(int16 which, Relation reln) if (nblocks == InvalidBlockNumber) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not count blocks of \"%s\": %m", + errmsg("could not count blocks of relation \"%s\": %m", RelationGetRelationName(reln)))); return nblocks; @@ -436,7 +436,7 @@ smgrtruncate(int16 which, Relation reln, BlockNumber nblocks) if (newblks == InvalidBlockNumber) ereport(ERROR, (errcode_for_file_access(), - errmsg("could not truncate \"%s\" to %u blocks: %m", + errmsg("could not truncate relation \"%s\" to %u blocks: %m", RelationGetRelationName(reln), nblocks))); } diff --git a/src/backend/tcop/fastpath.c b/src/backend/tcop/fastpath.c index 60120a3bc0..0a5016932c 100644 --- a/src/backend/tcop/fastpath.c +++ b/src/backend/tcop/fastpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.68 2003/08/04 02:40:04 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.69 2003/09/25 06:58:02 petere Exp $ * * NOTES * This cruft is the server side of PQfn. @@ -303,7 +303,7 @@ HandleFunctionRequest(StringInfo msgBuf) ereport(ERROR, (errcode(ERRCODE_IN_FAILED_SQL_TRANSACTION), errmsg("current transaction is aborted, " - "queries ignored until end of transaction block"))); + "commands ignored until end of transaction block"))); /* * Begin parsing the buffer contents. diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index e61c866b37..090bd6c366 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.364 2003/09/24 18:54:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.365 2003/09/25 06:58:02 petere Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -560,7 +560,7 @@ pg_rewrite_queries(List *querytree_list) /* This checks both copyObject() and the equal() routines... */ if (!equal(new_list, querytree_list)) ereport(WARNING, - (errmsg("copyObject failed to produce an equal parse tree"))); + (errmsg("copyObject() failed to produce an equal parse tree"))); else querytree_list = new_list; #endif @@ -605,7 +605,7 @@ pg_plan_query(Query *querytree) /* This checks both copyObject() and the equal() routines... */ if (!equal(new_plan, plan)) ereport(WARNING, - (errmsg("copyObject failed to produce an equal plan tree"))); + (errmsg("copyObject() failed to produce an equal plan tree"))); else #endif plan = new_plan; @@ -794,7 +794,7 @@ exec_simple_query(const char *query_string) ereport(ERROR, (errcode(ERRCODE_IN_FAILED_SQL_TRANSACTION), errmsg("current transaction is aborted, " - "queries ignored until end of transaction block"))); + "commands ignored until end of transaction block"))); } /* Make sure we are in a transaction command */ @@ -1114,7 +1114,7 @@ exec_parse_message(const char *query_string, /* string to execute */ ereport(ERROR, (errcode(ERRCODE_IN_FAILED_SQL_TRANSACTION), errmsg("current transaction is aborted, " - "queries ignored until end of transaction block"))); + "commands ignored until end of transaction block"))); } /* @@ -1141,7 +1141,7 @@ exec_parse_message(const char *query_string, /* string to execute */ if (ptype == InvalidOid || ptype == UNKNOWNOID) ereport(ERROR, (errcode(ERRCODE_INDETERMINATE_DATATYPE), - errmsg("could not determine datatype of parameter $%d", + errmsg("could not determine data type of parameter $%d", i + 1))); param_list = lappendo(param_list, ptype); } @@ -1572,7 +1572,7 @@ exec_execute_message(const char *portal_name, long max_rows) ereport(ERROR, (errcode(ERRCODE_IN_FAILED_SQL_TRANSACTION), errmsg("current transaction is aborted, " - "queries ignored until end of transaction block"))); + "commands ignored until end of transaction block"))); } /* Check for cancel signal before we start execution */ @@ -1798,13 +1798,13 @@ quickdie(SIGNAL_ARGS) */ ereport(WARNING, (errcode(ERRCODE_CRASH_SHUTDOWN), - errmsg("terminating connection due to crash of another backend"), - errdetail("The postmaster has commanded this backend to roll back" + errmsg("terminating connection because of crash of another server process"), + errdetail("The postmaster has commanded this server process to roll back" " the current transaction and exit, because another" - " backend exited abnormally and possibly corrupted" + " server process exited abnormally and possibly corrupted" " shared memory."), errhint("In a moment you should be able to reconnect to the" - " database and repeat your query."))); + " database and repeat your command."))); /* * DO NOT proc_exit() -- we're here because shared memory may be @@ -2661,7 +2661,7 @@ PostgresMain(int argc, char *argv[], const char *username) if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.364 $ $Date: 2003/09/24 18:54:01 $\n"); + puts("$Revision: 1.365 $ $Date: 2003/09/25 06:58:02 $\n"); } /* diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c index 05cc2ec8b6..49bb877eaa 100644 --- a/src/backend/utils/adt/acl.c +++ b/src/backend/utils/adt/acl.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.98 2003/09/15 20:03:37 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.99 2003/09/25 06:58:03 petere Exp $ * *------------------------------------------------------------------------- */ @@ -187,14 +187,14 @@ aclparse(const char *s, AclItem *aip) else if (strcmp(name, ACL_IDTYPE_UID_KEYWORD) != 0) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("unrecognized keyword: \"%s\"", name), - errhint("ACL keyword must be \"group\" or \"user\"."))); + errmsg("unrecognized key word: \"%s\"", name), + errhint("ACL key word must be \"group\" or \"user\"."))); s = getid(s, name); /* move s to the name beyond the keyword */ if (name[0] == '\0') ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), errmsg("missing name"), - errhint("A name must follow the [group|user] keyword."))); + errhint("A name must follow the \"group\" or \"user\" key word."))); } if (name[0] == '\0') idtype = ACL_IDTYPE_WORLD; @@ -288,7 +288,7 @@ aclparse(const char *s, AclItem *aip) aip->ai_grantor = BOOTSTRAP_USESYSID; ereport(WARNING, (errcode(ERRCODE_INVALID_GRANTOR), - errmsg("defaulting grantor to %u", BOOTSTRAP_USESYSID))); + errmsg("defaulting grantor to user ID %u", BOOTSTRAP_USESYSID))); } ACLITEM_SET_PRIVS_IDTYPE(*aip, privs, goption, idtype); diff --git a/src/backend/utils/adt/array_userfuncs.c b/src/backend/utils/adt/array_userfuncs.c index 31e11aedb3..2397a2b2cf 100644 --- a/src/backend/utils/adt/array_userfuncs.c +++ b/src/backend/utils/adt/array_userfuncs.c @@ -6,7 +6,7 @@ * Copyright (c) 2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/array_userfuncs.c,v 1.10 2003/09/15 20:03:37 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/array_userfuncs.c,v 1.11 2003/09/25 06:58:03 petere Exp $ * *------------------------------------------------------------------------- */ @@ -351,7 +351,7 @@ create_singleton_array(FunctionCallInfo fcinfo, if (element_type == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid array element type: %u", element_type))); + errmsg("invalid array element type OID: %u", element_type))); if (ndims < 1) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), @@ -359,8 +359,8 @@ create_singleton_array(FunctionCallInfo fcinfo, if (ndims > MAXDIM) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of array dimensions exceeds the maximum allowed, %d", - MAXDIM))); + errmsg("number of array dimensions (%d) exceeds the maximum allowed (%d)", + ndims, MAXDIM))); dvalues[0] = element; diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index 46f7881d64..e55d1b7687 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.99 2003/08/17 19:58:05 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.100 2003/09/25 06:58:03 petere Exp $ * *------------------------------------------------------------------------- */ @@ -209,8 +209,8 @@ array_in(PG_FUNCTION_ARGS) if (ndim >= MAXDIM) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of array dimensions exceeds the maximum allowed, %d", - MAXDIM))); + errmsg("number of array dimensions (%d) exceeds the maximum allowed (%d)", + ndim, MAXDIM))); for (q = p; isdigit((unsigned char) *q); q++); if (q == p) /* no digits? */ @@ -375,8 +375,8 @@ ArrayCount(char *str, int *dim, char typdelim) if (nest_level >= MAXDIM) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of array dimensions exceeds the maximum allowed, %d", - MAXDIM))); + errmsg("number of array dimensions (%d) exceeds the maximum allowed (%d)", + nest_level, MAXDIM))); temp[nest_level] = 0; nest_level++; if (ndim < nest_level) @@ -894,8 +894,8 @@ array_recv(PG_FUNCTION_ARGS) if (ndim > MAXDIM) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of array dimensions exceeds the maximum allowed, %d", - MAXDIM))); + errmsg("number of array dimensions (%d) exceeds the maximum allowed (%d)", + ndim, MAXDIM))); flags = pq_getmsgint(buf, 4); if (flags != 0) @@ -2132,7 +2132,7 @@ array_map(FunctionCallInfo fcinfo, Oid inpType, Oid retType) if (fcinfo->isnull) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("NULL array elements not supported"))); + errmsg("null array elements not supported"))); /* Ensure data is not toasted */ if (typlen == -1) @@ -2234,8 +2234,8 @@ construct_md_array(Datum *elems, if (ndims > MAXDIM) ereport(ERROR, (errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED), - errmsg("number of array dimensions exceeds the maximum allowed, %d", - MAXDIM))); + errmsg("number of array dimensions (%d) exceeds the maximum allowed (%d)", + ndims, MAXDIM))); /* fast track for empty array */ if (ndims == 0) @@ -3028,7 +3028,7 @@ accumArrayResult(ArrayBuildState *astate, if (disnull) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("NULL array elements not supported"))); + errmsg("null array elements not supported"))); /* Use datumCopy to ensure pass-by-ref stuff is copied into mcontext */ astate->dvalues[astate->nelems++] = diff --git a/src/backend/utils/adt/bool.c b/src/backend/utils/adt/bool.c index a61e8d4233..8aed5b6f04 100644 --- a/src/backend/utils/adt/bool.c +++ b/src/backend/utils/adt/bool.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.29 2003/08/04 02:40:04 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/bool.c,v 1.30 2003/09/25 06:58:03 petere Exp $ * *------------------------------------------------------------------------- */ @@ -77,7 +77,7 @@ boolin(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for boolean: \"%s\"", b))); + errmsg("invalid input syntax for type boolean: \"%s\"", b))); /* not reached */ PG_RETURN_BOOL(false); diff --git a/src/backend/utils/adt/cash.c b/src/backend/utils/adt/cash.c index c4fc14134f..e5691ad762 100644 --- a/src/backend/utils/adt/cash.c +++ b/src/backend/utils/adt/cash.c @@ -9,7 +9,7 @@ * workings can be found in the book "Software Solutions in C" by * Dale Schumacher, Academic Press, ISBN: 0-12-632360-7. * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.60 2003/08/17 19:58:05 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.61 2003/09/25 06:58:03 petere Exp $ */ #include "postgres.h" @@ -195,7 +195,7 @@ cash_in(PG_FUNCTION_ARGS) if (*s != '\0') ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for money: \"%s\"", str))); + errmsg("invalid input syntax for type money: \"%s\"", str))); result = (value * sgn); diff --git a/src/backend/utils/adt/date.c b/src/backend/utils/adt/date.c index 60583fed7a..49ef50d21c 100644 --- a/src/backend/utils/adt/date.c +++ b/src/backend/utils/adt/date.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.91 2003/08/27 23:29:27 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/date.c,v 1.92 2003/09/25 06:58:03 petere Exp $ * *------------------------------------------------------------------------- */ @@ -84,7 +84,7 @@ date_in(PG_FUNCTION_ARGS) case DTK_CURRENT: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("\"current\" is no longer supported"))); + errmsg("date/time value \"current\" is no longer supported"))); GetCurrentDateTime(tm); break; @@ -524,7 +524,7 @@ text_date(PG_FUNCTION_ARGS) if (VARSIZE(str) - VARHDRSZ > MAXDATELEN) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - errmsg("invalid input syntax for date: \"%s\"", + errmsg("invalid input syntax for type date: \"%s\"", VARDATA(str)))); sp = VARDATA(str); @@ -1252,7 +1252,7 @@ text_time(PG_FUNCTION_ARGS) if (VARSIZE(str) - VARHDRSZ > MAXDATELEN) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - errmsg("invalid input syntax for time: \"%s\"", + errmsg("invalid input syntax for type time: \"%s\"", VARDATA(str)))); sp = VARDATA(str); @@ -1286,7 +1286,7 @@ time_part(PG_FUNCTION_ARGS) if (VARSIZE(units) - VARHDRSZ > MAXDATELEN) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("TIME units \"%s\" not recognized", + errmsg("\"time\" units \"%s\" not recognized", DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(units)))))); @@ -1356,7 +1356,7 @@ time_part(PG_FUNCTION_ARGS) default: ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("TIME units \"%s\" not recognized", + errmsg("\"time\" units \"%s\" not recognized", DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(units)))))); @@ -1375,7 +1375,7 @@ time_part(PG_FUNCTION_ARGS) { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("TIME units \"%s\" not recognized", + errmsg("\"time\" units \"%s\" not recognized", DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(units)))))); result = 0; @@ -2015,7 +2015,7 @@ text_timetz(PG_FUNCTION_ARGS) if (VARSIZE(str) - VARHDRSZ > MAXDATELEN) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - errmsg("invalid input syntax for time with time zone: \"%s\"", + errmsg("invalid input syntax for type time with time zone: \"%s\"", VARDATA(str)))); sp = VARDATA(str); @@ -2049,7 +2049,7 @@ timetz_part(PG_FUNCTION_ARGS) if (VARSIZE(units) - VARHDRSZ > MAXDATELEN) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("TIMETZ units \"%s\" not recognized", + errmsg("\"time with time zone\" units \"%s\" not recognized", DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(units)))))); @@ -2133,7 +2133,7 @@ timetz_part(PG_FUNCTION_ARGS) default: ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("TIMETZ units \"%s\" not recognized", + errmsg("\"time with time zone\" units \"%s\" not recognized", DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(units)))))); @@ -2152,7 +2152,7 @@ timetz_part(PG_FUNCTION_ARGS) { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("TIMETZ units \"%s\" not recognized", + errmsg("\"time with time zone\" units \"%s\" not recognized", DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(units)))))); @@ -2241,7 +2241,7 @@ timetz_izone(PG_FUNCTION_ARGS) if (zone->month != 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("INTERVAL time zone \"%s\" not legal", + errmsg("\"interval\" time zone \"%s\" not legal", DatumGetCString(DirectFunctionCall1(interval_out, PointerGetDatum(zone)))))); diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index ac7f9dda54..6471f648f3 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.117 2003/09/13 21:12:38 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.118 2003/09/25 06:58:03 petere Exp $ * *------------------------------------------------------------------------- */ @@ -1305,7 +1305,7 @@ DecodeDateTime(char **field, int *ftype, int nf, case DTK_CURRENT: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("\"current\" is no longer supported"))); + errmsg("date/time value \"current\" is no longer supported"))); return DTERR_BAD_FORMAT; break; @@ -2056,7 +2056,7 @@ DecodeTimeOnly(char **field, int *ftype, int nf, case DTK_CURRENT: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("\"current\" is no longer supported"))); + errmsg("date/time value \"current\" is no longer supported"))); return DTERR_BAD_FORMAT; break; @@ -3248,7 +3248,7 @@ DateTimeParseError(int dterr, const char *str, const char *datatype) (errcode(ERRCODE_DATETIME_FIELD_OVERFLOW), errmsg("date/time field value out of range: \"%s\"", str), - errhint("Perhaps you need a different DateStyle setting."))); + errhint("Perhaps you need a different \"datestyle\" setting."))); break; case DTERR_INTERVAL_OVERFLOW: ereport(ERROR, @@ -3266,8 +3266,7 @@ DateTimeParseError(int dterr, const char *str, const char *datatype) default: ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - /* translator: first %s is datatype name */ - errmsg("invalid input syntax for %s: \"%s\"", + errmsg("invalid input syntax for type %s: \"%s\"", datatype, str))); break; } diff --git a/src/backend/utils/adt/encode.c b/src/backend/utils/adt/encode.c index 80291da603..9363b83e64 100644 --- a/src/backend/utils/adt/encode.c +++ b/src/backend/utils/adt/encode.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/encode.c,v 1.8 2003/08/04 23:59:38 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/encode.c,v 1.9 2003/09/25 06:58:03 petere Exp $ * *------------------------------------------------------------------------- */ @@ -147,7 +147,7 @@ get_hex(unsigned c) if (res < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid hex digit: \"%c\"", c))); + errmsg("invalid hexadecimal digit: \"%c\"", c))); return (uint8) res; } @@ -175,7 +175,7 @@ hex_decode(const uint8 *src, unsigned len, uint8 *dst) if (s >= srcend) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid hex data: odd number of digits"))); + errmsg("invalid hexadecimal data: odd number of digits"))); v2 = get_hex(*s++); *p++ = v1 | v2; @@ -433,7 +433,7 @@ esc_decode(const uint8 *src, unsigned srclen, uint8 *dst) */ ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for bytea"))); + errmsg("invalid input syntax for type bytea"))); } len++; @@ -498,7 +498,7 @@ esc_dec_len(const uint8 *src, unsigned srclen) */ ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for bytea"))); + errmsg("invalid input syntax for type bytea"))); } len++; diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 82c257c801..9f0fa0de32 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.93 2003/08/04 02:40:04 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.94 2003/09/25 06:58:03 petere Exp $ * *------------------------------------------------------------------------- */ @@ -132,11 +132,11 @@ CheckFloat4Val(double val) if (fabs(val) > FLOAT4_MAX) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("float4 value out of range: overflow"))); + errmsg("type \"real\" value out of range: overflow"))); if (val != 0.0 && fabs(val) < FLOAT4_MIN) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("float4 value out of range: underflow"))); + errmsg("type \"real\" value out of range: underflow"))); return; #endif /* UNSAFE_FLOATS */ @@ -161,11 +161,11 @@ CheckFloat8Val(double val) if (fabs(val) > FLOAT8_MAX) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("float8 value out of range: overflow"))); + errmsg("type \"double precision\" value out of range: overflow"))); if (val != 0.0 && fabs(val) < FLOAT8_MIN) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("float8 value out of range: underflow"))); + errmsg("type \"double precision\" value out of range: underflow"))); #endif /* UNSAFE_FLOATS */ } @@ -197,7 +197,7 @@ float4in(PG_FUNCTION_ARGS) else ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for float4: \"%s\"", + errmsg("invalid input syntax for type real: \"%s\"", num))); } else @@ -205,7 +205,7 @@ float4in(PG_FUNCTION_ARGS) if (errno == ERANGE) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("\"%s\" is out of range for float4", num))); + errmsg("\"%s\" is out of range for type real", num))); } /* @@ -298,7 +298,7 @@ float8in(PG_FUNCTION_ARGS) else ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for float8: \"%s\"", + errmsg("invalid input syntax for type double precision: \"%s\"", num))); } else @@ -306,7 +306,7 @@ float8in(PG_FUNCTION_ARGS) if (errno == ERANGE) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("\"%s\" is out of range for float8", num))); + errmsg("\"%s\" is out of range for type double precision", num))); } CheckFloat8Val(val); @@ -1301,12 +1301,12 @@ dlog1(PG_FUNCTION_ARGS) if (arg1 == 0.0) ereport(ERROR, (errcode(ERRCODE_FLOATING_POINT_EXCEPTION), - errmsg("cannot take log of zero"))); + errmsg("cannot take logarithm of zero"))); if (arg1 < 0) ereport(ERROR, (errcode(ERRCODE_FLOATING_POINT_EXCEPTION), - errmsg("cannot take log of a negative number"))); + errmsg("cannot take logarithm of a negative number"))); result = log(arg1); @@ -1327,12 +1327,12 @@ dlog10(PG_FUNCTION_ARGS) if (arg1 == 0.0) ereport(ERROR, (errcode(ERRCODE_FLOATING_POINT_EXCEPTION), - errmsg("cannot take log of zero"))); + errmsg("cannot take logarithm of zero"))); if (arg1 < 0) ereport(ERROR, (errcode(ERRCODE_FLOATING_POINT_EXCEPTION), - errmsg("cannot take log of a negative number"))); + errmsg("cannot take logarithm of a negative number"))); result = log10(arg1); diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c index adc106882f..d3fe88ad20 100644 --- a/src/backend/utils/adt/geo_ops.c +++ b/src/backend/utils/adt/geo_ops.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.80 2003/08/04 02:40:04 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.81 2003/09/25 06:58:03 petere Exp $ * *------------------------------------------------------------------------- */ @@ -387,7 +387,7 @@ box_in(PG_FUNCTION_ARGS) || (*s != '\0')) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for box: \"%s\"", str))); + errmsg("invalid input syntax for type box: \"%s\"", str))); /* reorder corners if necessary... */ if (box->high.x < box->low.x) @@ -900,14 +900,14 @@ line_in(PG_FUNCTION_ARGS) || (*s != '\0')) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for line: \"%s\"", str))); + errmsg("invalid input syntax for type line: \"%s\"", str))); line = (LINE *) palloc(sizeof(LINE)); line_construct_pts(line, &lseg.p[0], &lseg.p[1]); #else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("line not yet implemented"))); + errmsg("type \"line\" not yet implemented"))); line = NULL; #endif @@ -974,7 +974,7 @@ line_out(PG_FUNCTION_ARGS) #else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("line not yet implemented"))); + errmsg("type \"line\" not yet implemented"))); result = NULL; #endif @@ -989,7 +989,7 @@ line_recv(PG_FUNCTION_ARGS) { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("line not yet implemented"))); + errmsg("type \"line\" not yet implemented"))); return 0; } @@ -1001,7 +1001,7 @@ line_send(PG_FUNCTION_ARGS) { ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("line not yet implemented"))); + errmsg("type \"line\" not yet implemented"))); return 0; } @@ -1326,7 +1326,7 @@ path_in(PG_FUNCTION_ARGS) if ((npts = pair_count(str, ',')) <= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for path: \"%s\"", str))); + errmsg("invalid input syntax for type path: \"%s\"", str))); s = str; while (isspace((unsigned char) *s)) @@ -1349,7 +1349,7 @@ path_in(PG_FUNCTION_ARGS) && (!((depth == 0) && (*s == '\0'))) && !((depth >= 1) && (*s == RDELIM))) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for path: \"%s\"", str))); + errmsg("invalid input syntax for type path: \"%s\"", str))); path->closed = (!isopen); @@ -1727,7 +1727,7 @@ point_in(PG_FUNCTION_ARGS) if (!pair_decode(str, &x, &y, &s) || (*s != '\0')) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for point: \"%s\"", str))); + errmsg("invalid input syntax for type point: \"%s\"", str))); point = (Point *) palloc(sizeof(Point)); @@ -1955,7 +1955,7 @@ lseg_in(PG_FUNCTION_ARGS) || (*s != '\0')) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for lseg: \"%s\"", str))); + errmsg("invalid input syntax for type lseg: \"%s\"", str))); #ifdef NOT_USED lseg->m = point_sl(&lseg->p[0], &lseg->p[1]); @@ -2547,7 +2547,7 @@ dist_lb(PG_FUNCTION_ARGS) /* need to think about this one for a while */ ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("dist_lb not implemented"))); + errmsg("function \"dist_lb\" not implemented"))); PG_RETURN_NULL(); } @@ -3060,7 +3060,7 @@ close_lb(PG_FUNCTION_ARGS) /* think about this one for a while */ ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("close_lb not implemented"))); + errmsg("function \"close_lb\" not implemented"))); PG_RETURN_NULL(); } @@ -3363,7 +3363,7 @@ poly_in(PG_FUNCTION_ARGS) if ((npts = pair_count(str, ',')) <= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for polygon: \"%s\"", str))); + errmsg("invalid input syntax for type polygon: \"%s\"", str))); size = offsetof(POLYGON, p[0]) +sizeof(poly->p[0]) * npts; poly = (POLYGON *) palloc0(size); /* zero any holes */ @@ -3375,7 +3375,7 @@ poly_in(PG_FUNCTION_ARGS) || (*s != '\0')) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for polygon: \"%s\"", str))); + errmsg("invalid input syntax for type polygon: \"%s\"", str))); make_bound_box(poly); @@ -3725,7 +3725,7 @@ poly_distance(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("poly_distance not implemented"))); + errmsg("function \"poly_distance\" not implemented"))); PG_RETURN_NULL(); } @@ -4037,7 +4037,7 @@ path_center(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("path_center not implemented"))); + errmsg("function \"path_center\" not implemented"))); PG_RETURN_NULL(); } @@ -4221,7 +4221,7 @@ circle_in(PG_FUNCTION_ARGS) if (!pair_decode(s, &circle->center.x, &circle->center.y, &s)) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for circle: \"%s\"", str))); + errmsg("invalid input syntax for type circle: \"%s\"", str))); if (*s == DELIM) s++; @@ -4231,7 +4231,7 @@ circle_in(PG_FUNCTION_ARGS) if ((!single_decode(s, &circle->radius, &s)) || (circle->radius < 0)) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for circle: \"%s\"", str))); + errmsg("invalid input syntax for type circle: \"%s\"", str))); while (depth > 0) { @@ -4246,13 +4246,13 @@ circle_in(PG_FUNCTION_ARGS) else ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for circle: \"%s\"", str))); + errmsg("invalid input syntax for type circle: \"%s\"", str))); } if (*s != '\0') ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for circle: \"%s\"", str))); + errmsg("invalid input syntax for type circle: \"%s\"", str))); PG_RETURN_CIRCLE_P(circle); } diff --git a/src/backend/utils/adt/int8.c b/src/backend/utils/adt/int8.c index 547bd140aa..7e1675227d 100644 --- a/src/backend/utils/adt/int8.c +++ b/src/backend/utils/adt/int8.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.47 2003/08/04 02:40:05 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/int8.c,v 1.48 2003/09/25 06:58:04 petere Exp $ * *------------------------------------------------------------------------- */ @@ -85,7 +85,7 @@ scanint8(const char *str, bool errorOK, int64 *result) else ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for int8: \"%s\"", str))); + errmsg("invalid input syntax for type bigint: \"%s\"", str))); } /* process digits */ @@ -113,7 +113,7 @@ scanint8(const char *str, bool errorOK, int64 *result) else ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for int8: \"%s\"", str))); + errmsg("invalid input syntax for type bigint: \"%s\"", str))); } *result = (sign < 0) ? -tmp : tmp; diff --git a/src/backend/utils/adt/mac.c b/src/backend/utils/adt/mac.c index 4bef89a71b..b1372c6a65 100644 --- a/src/backend/utils/adt/mac.c +++ b/src/backend/utils/adt/mac.c @@ -1,7 +1,7 @@ /* * PostgreSQL type definitions for MAC addresses. * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/mac.c,v 1.30 2003/08/04 00:43:25 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/mac.c,v 1.31 2003/09/25 06:58:04 petere Exp $ */ #include "postgres.h" @@ -62,7 +62,7 @@ macaddr_in(PG_FUNCTION_ARGS) if (count != 6) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for macaddr: \"%s\"", str))); + errmsg("invalid input syntax for type macaddr: \"%s\"", str))); if ((a < 0) || (a > 255) || (b < 0) || (b > 255) || (c < 0) || (c > 255) || (d < 0) || (d > 255) || diff --git a/src/backend/utils/adt/nabstime.c b/src/backend/utils/adt/nabstime.c index 8b758b5119..28c144fea5 100644 --- a/src/backend/utils/adt/nabstime.c +++ b/src/backend/utils/adt/nabstime.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.115 2003/08/27 23:29:29 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.116 2003/09/25 06:58:04 petere Exp $ * *------------------------------------------------------------------------- */ @@ -241,7 +241,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn) if (strlen(tm->tm_zone) > MAXTZLEN) ereport(WARNING, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid timezone name: \"%s\"", + errmsg("invalid time zone name: \"%s\"", tm->tm_zone))); } } @@ -277,7 +277,7 @@ abstime2tm(AbsoluteTime _time, int *tzp, struct tm * tm, char **tzn) if (strlen(tzname[tm->tm_isdst]) > MAXTZLEN) ereport(WARNING, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid timezone name: \"%s\"", + errmsg("invalid time zone name: \"%s\"", tzname[tm->tm_isdst]))); } } @@ -653,7 +653,7 @@ abstime_timestamp(PG_FUNCTION_ARGS) case INVALID_ABSTIME: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot convert \"invalid\" abstime to timestamp"))); + errmsg("cannot convert abstime \"invalid\" to timestamp"))); TIMESTAMP_NOBEGIN(result); break; @@ -726,7 +726,7 @@ abstime_timestamptz(PG_FUNCTION_ARGS) case INVALID_ABSTIME: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot convert \"invalid\" abstime to timestamp"))); + errmsg("cannot convert abstime \"invalid\" to timestamp"))); TIMESTAMP_NOBEGIN(result); break; @@ -879,7 +879,7 @@ tintervalin(PG_FUNCTION_ARGS) if (istinterval(intervalstr, &t1, &t2) == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - errmsg("invalid input syntax for tinterval: \"%s\"", + errmsg("invalid input syntax for type tinterval: \"%s\"", intervalstr))); if (t1 == INVALID_ABSTIME || t2 == INVALID_ABSTIME) @@ -1034,7 +1034,7 @@ reltime_interval(PG_FUNCTION_ARGS) case INVALID_RELTIME: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("cannot convert \"invalid\" reltime to interval"))); + errmsg("cannot convert reltime \"invalid\" to interval"))); result->time = 0; result->month = 0; break; diff --git a/src/backend/utils/adt/network.c b/src/backend/utils/adt/network.c index e3e7d185df..b26931b77c 100644 --- a/src/backend/utils/adt/network.c +++ b/src/backend/utils/adt/network.c @@ -1,7 +1,7 @@ /* * PostgreSQL type definitions for the INET and CIDR types. * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/network.c,v 1.45 2003/08/04 00:43:25 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/network.c,v 1.46 2003/09/25 06:58:04 petere Exp $ * * Jon Postel RIP 16 Oct 1998 */ @@ -87,7 +87,7 @@ network_in(char *src, int type) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), /* translator: first %s is inet or cidr */ - errmsg("invalid input syntax for %s: \"%s\"", + errmsg("invalid input syntax for type %s: \"%s\"", type ? "cidr" : "inet", src))); /* @@ -225,7 +225,7 @@ inet_recv(PG_FUNCTION_ARGS) if (!addressOK(ip_addr(addr), bits, ip_family(addr))) ereport(ERROR, (errcode(ERRCODE_INVALID_BINARY_REPRESENTATION), - errmsg("invalid external CIDR value"), + errmsg("invalid external cidr value"), errdetail("Value has bits set to right of mask."))); } diff --git a/src/backend/utils/adt/not_in.c b/src/backend/utils/adt/not_in.c index 42ce2d2fcb..3b0d980b0c 100644 --- a/src/backend/utils/adt/not_in.c +++ b/src/backend/utils/adt/not_in.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.36 2003/08/11 20:46:46 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.37 2003/09/25 06:58:04 petere Exp $ * *------------------------------------------------------------------------- */ @@ -62,7 +62,7 @@ int4notin(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_INVALID_NAME), errmsg("invalid name syntax"), - errhint("Must provide \"relationname.attributename\"."))); + errhint("Must provide \"relationname.columnname\"."))); attribute = strVal(llast(names)); names = ltruncate(nnames - 1, names); relrv = makeRangeVarFromNameList(names); diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index 5b0fe29110..8178ed42fc 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -14,7 +14,7 @@ * Copyright (c) 1998-2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.65 2003/08/04 00:43:25 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/numeric.c,v 1.66 2003/09/25 06:58:04 petere Exp $ * *------------------------------------------------------------------------- */ @@ -2536,7 +2536,7 @@ set_var_from_str(const char *str, NumericVar *dest) if (!isdigit((unsigned char) *cp)) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for numeric: \"%s\"", str))); + errmsg("invalid input syntax for type numeric: \"%s\"", str))); decdigits = (unsigned char *) palloc(strlen(cp) + DEC_DIGITS * 2); @@ -2559,7 +2559,7 @@ set_var_from_str(const char *str, NumericVar *dest) if (have_dp) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for numeric: \"%s\"", + errmsg("invalid input syntax for type numeric: \"%s\"", str))); have_dp = TRUE; cp++; @@ -2583,14 +2583,14 @@ set_var_from_str(const char *str, NumericVar *dest) if (endptr == cp) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for numeric: \"%s\"", + errmsg("invalid input syntax for type numeric: \"%s\"", str))); cp = endptr; if (exponent > NUMERIC_MAX_PRECISION || exponent < -NUMERIC_MAX_PRECISION) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for numeric: \"%s\"", + errmsg("invalid input syntax for type numeric: \"%s\"", str))); dweight += (int) exponent; dscale -= (int) exponent; @@ -2604,7 +2604,7 @@ set_var_from_str(const char *str, NumericVar *dest) if (!isspace((unsigned char) *cp)) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for numeric: \"%s\"", + errmsg("invalid input syntax for type numeric: \"%s\"", str))); cp++; } @@ -2973,7 +2973,7 @@ apply_typmod(NumericVar *var, int32 typmod) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), errmsg("numeric field overflow"), - errdetail("ABS(value) >= 10^%d for field with precision %d, scale %d.", + errdetail("The absolute value is greater than or equal to 10^%d for field with precision %d, scale %d.", ddigits - 1, precision, scale))); break; } @@ -3114,7 +3114,7 @@ numeric_to_double_no_overflow(Numeric num) /* shouldn't happen ... */ ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for float8: \"%s\"", + errmsg("invalid input syntax for type double precision: \"%s\"", tmp))); } @@ -3140,7 +3140,7 @@ numericvar_to_double_no_overflow(NumericVar *var) /* shouldn't happen ... */ ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for float8: \"%s\"", + errmsg("invalid input syntax for type double precision: \"%s\"", tmp))); } @@ -4122,7 +4122,7 @@ exp_var(NumericVar *arg, NumericVar *result, int rscale) if (xintval >= NUMERIC_MAX_RESULT_SCALE * 3) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("argument for EXP() too big"))); + errmsg("argument for function \"exp\" too big"))); } /* Select an appropriate scale for internal calculation */ @@ -4249,7 +4249,7 @@ ln_var(NumericVar *arg, NumericVar *result, int rscale) if (cmp_var(arg, &const_zero) <= 0) ereport(ERROR, (errcode(ERRCODE_FLOATING_POINT_EXCEPTION), - errmsg("cannot take log of a negative number"))); + errmsg("cannot take logarithm of a negative number"))); local_rscale = rscale + 8; diff --git a/src/backend/utils/adt/numutils.c b/src/backend/utils/adt/numutils.c index d022920717..9f59f21221 100644 --- a/src/backend/utils/adt/numutils.c +++ b/src/backend/utils/adt/numutils.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.57 2003/08/04 02:40:05 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.58 2003/09/25 06:58:04 petere Exp $ * *------------------------------------------------------------------------- */ @@ -102,19 +102,19 @@ pg_atoi(char *s, int size, int c) ) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("%s is out of range for int4", s))); + errmsg("value \"%s\" is out of range for type integer", s))); break; case sizeof(int16): if (errno == ERANGE || l < SHRT_MIN || l > SHRT_MAX) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("%s is out of range for int2", s))); + errmsg("value \"%s\" is out of range for type shortint", s))); break; case sizeof(int8): if (errno == ERANGE || l < SCHAR_MIN || l > SCHAR_MAX) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("%s is out of range for int1", s))); + errmsg("value \"%s\" is out of range for 8-bit integer", s))); break; default: elog(ERROR, "unsupported result size: %d", size); diff --git a/src/backend/utils/adt/oid.c b/src/backend/utils/adt/oid.c index 0086b52ba7..ec9d1fae50 100644 --- a/src/backend/utils/adt/oid.c +++ b/src/backend/utils/adt/oid.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.51 2003/08/04 02:40:05 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/oid.c,v 1.52 2003/09/25 06:58:04 petere Exp $ * *------------------------------------------------------------------------- */ @@ -46,18 +46,18 @@ oidin_subr(const char *funcname, const char *s, char **endloc) if (errno && errno != ERANGE && errno != EINVAL) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for OID: \"%s\"", + errmsg("invalid input syntax for type \"oid\": \"%s\"", s))); if (endptr == s && *endptr) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for OID: \"%s\"", + errmsg("invalid input syntax for type \"oid\": \"%s\"", s))); if (errno == ERANGE) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("%s is out of range for OID", s))); + errmsg("value \"%s\" is out of range for type \"oid\"", s))); if (endloc) { @@ -72,7 +72,7 @@ oidin_subr(const char *funcname, const char *s, char **endloc) if (*endptr) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for OID: \"%s\"", + errmsg("invalid input syntax for type \"oid\": \"%s\"", s))); } @@ -95,7 +95,7 @@ oidin_subr(const char *funcname, const char *s, char **endloc) cvt != (unsigned long) ((int) result)) ereport(ERROR, (errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE), - errmsg("%s is out of range for OID", s))); + errmsg("value \"%s\" is out of range for type \"oid\"", s))); #endif return result; diff --git a/src/backend/utils/adt/regproc.c b/src/backend/utils/adt/regproc.c index 6204bbde2f..8efaa30fe5 100644 --- a/src/backend/utils/adt/regproc.c +++ b/src/backend/utils/adt/regproc.c @@ -13,7 +13,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.81 2003/08/04 02:40:05 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.82 2003/09/25 06:58:04 petere Exp $ * *------------------------------------------------------------------------- */ @@ -114,12 +114,12 @@ regprocin(PG_FUNCTION_ARGS) if (matches == 0) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("no procedure with name %s", pro_name_or_oid))); + errmsg("function \"%s\" does not exist", pro_name_or_oid))); else if (matches > 1) ereport(ERROR, (errcode(ERRCODE_AMBIGUOUS_FUNCTION), - errmsg("more than one procedure named %s", + errmsg("more than one function named \"%s\"", pro_name_or_oid))); PG_RETURN_OID(result); @@ -135,11 +135,11 @@ regprocin(PG_FUNCTION_ARGS) if (clist == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("no procedure with name %s", pro_name_or_oid))); + errmsg("function \"%s\" does not exist", pro_name_or_oid))); else if (clist->next != NULL) ereport(ERROR, (errcode(ERRCODE_AMBIGUOUS_FUNCTION), - errmsg("more than one procedure named %s", + errmsg("more than one function named \"%s\"", pro_name_or_oid))); result = clist->oid; @@ -287,7 +287,7 @@ regprocedurein(PG_FUNCTION_ARGS) if (clist == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("no procedure with name %s", pro_name_or_oid))); + errmsg("function \"%s\" does not exist", pro_name_or_oid))); result = clist->oid; @@ -464,7 +464,7 @@ regoperin(PG_FUNCTION_ARGS) if (matches == 0) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("no operator with name %s", opr_name_or_oid))); + errmsg("operator does not exist: %s", opr_name_or_oid))); else if (matches > 1) ereport(ERROR, (errcode(ERRCODE_AMBIGUOUS_FUNCTION), @@ -484,7 +484,7 @@ regoperin(PG_FUNCTION_ARGS) if (clist == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("no operator with name %s", opr_name_or_oid))); + errmsg("operator does not exist: %s", opr_name_or_oid))); else if (clist->next != NULL) ereport(ERROR, (errcode(ERRCODE_AMBIGUOUS_FUNCTION), @@ -662,7 +662,7 @@ regoperatorin(PG_FUNCTION_ARGS) if (clist == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("no operator with name %s", opr_name_or_oid))); + errmsg("operator does not exist: %s", opr_name_or_oid))); result = clist->oid; @@ -834,7 +834,7 @@ regclassin(PG_FUNCTION_ARGS) else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_TABLE), - errmsg("no class with name %s", class_name_or_oid))); + errmsg("relation \"%s\" does not exist", class_name_or_oid))); /* We assume there can be only one match */ @@ -1000,7 +1000,7 @@ regtypein(PG_FUNCTION_ARGS) else ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("no type with name %s", typ_name_or_oid))); + errmsg("type \"%s\" does not exist", typ_name_or_oid))); /* We assume there can be only one match */ diff --git a/src/backend/utils/adt/ri_triggers.c b/src/backend/utils/adt/ri_triggers.c index e66c42f99b..877034519c 100644 --- a/src/backend/utils/adt/ri_triggers.c +++ b/src/backend/utils/adt/ri_triggers.c @@ -17,7 +17,7 @@ * * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.56 2003/09/09 23:22:21 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.57 2003/09/25 06:58:04 petere Exp $ * * ---------- */ @@ -331,10 +331,10 @@ RI_FKey_check(PG_FUNCTION_ARGS) */ ereport(ERROR, (errcode(ERRCODE_FOREIGN_KEY_VIOLATION), - errmsg("insert or update on \"%s\" violates foreign key constraint \"%s\"", + errmsg("insert or update on table \"%s\" violates foreign key constraint \"%s\"", RelationGetRelationName(trigdata->tg_relation), tgargs[RI_CONSTRAINT_NAME_ARGNO]), - errdetail("MATCH FULL does not allow mixing of NULL and non-NULL key values."))); + errdetail("MATCH FULL does not allow mixing of null and nonnull key values."))); heap_close(pk_rel, RowShareLock); return PointerGetDatum(NULL); @@ -2542,7 +2542,7 @@ RI_FKey_keyequal_upd(TriggerData *trigdata) (tgnargs % 2) != 0) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("%s() called with wrong number of trigger arguments", + errmsg("function \"%s\" called with wrong number of trigger arguments", "RI_FKey_keyequal_upd"))); /* @@ -2560,10 +2560,10 @@ RI_FKey_keyequal_upd(TriggerData *trigdata) if (!OidIsValid(trigdata->tg_trigger->tgconstrrelid)) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("no target table given for trigger \"%s\" on \"%s\"", + errmsg("no target table given for trigger \"%s\" on table \"%s\"", trigdata->tg_trigger->tgname, RelationGetRelationName(trigdata->tg_relation)), - errhint("Remove this RI trigger and its mates, then do ALTER TABLE ADD CONSTRAINT."))); + errhint("Remove this referential integrity trigger and its mates, then do ALTER TABLE ADD CONSTRAINT."))); fk_rel = heap_open(trigdata->tg_trigger->tgconstrrelid, AccessShareLock); pk_rel = trigdata->tg_relation; @@ -2720,7 +2720,7 @@ ri_BuildQueryKeyFull(RI_QueryKey *key, Oid constr_id, int32 constr_queryno, if (fno == SPI_ERROR_NOATTRIBUTE) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("table \"%s\" does not have attribute \"%s\" referenced by constraint \"%s\"", + errmsg("table \"%s\" does not have column \"%s\" referenced by constraint \"%s\"", RelationGetRelationName(fk_rel), argv[j], argv[RI_CONSTRAINT_NAME_ARGNO]))); @@ -2730,7 +2730,7 @@ ri_BuildQueryKeyFull(RI_QueryKey *key, Oid constr_id, int32 constr_queryno, if (fno == SPI_ERROR_NOATTRIBUTE) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("table \"%s\" does not have attribute \"%s\" referenced by constraint \"%s\"", + errmsg("table \"%s\" does not have column \"%s\" referenced by constraint \"%s\"", RelationGetRelationName(pk_rel), argv[j + 1], argv[RI_CONSTRAINT_NAME_ARGNO]))); @@ -2750,7 +2750,7 @@ ri_CheckTrigger(FunctionCallInfo fcinfo, const char *funcname, int tgkind) if (!CALLED_AS_TRIGGER(fcinfo)) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("%s() was not fired by trigger manager", funcname))); + errmsg("function \"%s\" was not called by trigger manager", funcname))); /* * Check proper event @@ -2759,7 +2759,7 @@ ri_CheckTrigger(FunctionCallInfo fcinfo, const char *funcname, int tgkind) !TRIGGER_FIRED_FOR_ROW(trigdata->tg_event)) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("%s() must be fired AFTER ROW", funcname))); + errmsg("function \"%s\" must be fired AFTER ROW", funcname))); switch (tgkind) { @@ -2767,27 +2767,27 @@ ri_CheckTrigger(FunctionCallInfo fcinfo, const char *funcname, int tgkind) if (!TRIGGER_FIRED_BY_INSERT(trigdata->tg_event)) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("%s() must be fired for INSERT", funcname))); + errmsg("function \"%s\" must be fired for INSERT", funcname))); break; case RI_TRIGTYPE_UPDATE: if (!TRIGGER_FIRED_BY_UPDATE(trigdata->tg_event)) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("%s() must be fired for UPDATE", funcname))); + errmsg("function \"%s\" must be fired for UPDATE", funcname))); break; case RI_TRIGTYPE_INUP: if (!TRIGGER_FIRED_BY_INSERT(trigdata->tg_event) && !TRIGGER_FIRED_BY_UPDATE(trigdata->tg_event)) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("%s() must be fired for INSERT or UPDATE", + errmsg("function \"%s\" must be fired for INSERT or UPDATE", funcname))); break; case RI_TRIGTYPE_DELETE: if (!TRIGGER_FIRED_BY_DELETE(trigdata->tg_event)) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("%s() must be fired for DELETE", funcname))); + errmsg("function \"%s\" must be fired for DELETE", funcname))); break; } @@ -2800,7 +2800,7 @@ ri_CheckTrigger(FunctionCallInfo fcinfo, const char *funcname, int tgkind) (tgnargs % 2) != 0) ereport(ERROR, (errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED), - errmsg("%s() called with wrong number of trigger arguments", + errmsg("function \"%s\" called with wrong number of trigger arguments", funcname))); /* @@ -2810,7 +2810,7 @@ ri_CheckTrigger(FunctionCallInfo fcinfo, const char *funcname, int tgkind) if (!OidIsValid(trigdata->tg_trigger->tgconstrrelid)) ereport(ERROR, (errcode(ERRCODE_INVALID_OBJECT_DEFINITION), - errmsg("no target table given for trigger \"%s\" on \"%s\"", + errmsg("no target table given for trigger \"%s\" on table \"%s\"", trigdata->tg_trigger->tgname, RelationGetRelationName(trigdata->tg_relation)), errhint("Remove this RI trigger and its mates, then do ALTER TABLE ADD CONSTRAINT."))); @@ -3040,7 +3040,7 @@ ri_ReportViolation(RI_QueryKey *qkey, const char *constrname, { ereport(ERROR, (errcode(ERRCODE_FOREIGN_KEY_VIOLATION), - errmsg("insert or update on \"%s\" violates foreign key constraint \"%s\"", + errmsg("insert or update on table \"%s\" violates foreign key constraint \"%s\"", RelationGetRelationName(fk_rel), constrname), errdetail("No rows were found in \"%s\".", RelationGetRelationName(pk_rel)))); @@ -3077,9 +3077,9 @@ ri_ReportViolation(RI_QueryKey *qkey, const char *constrname, if (onfk) ereport(ERROR, (errcode(ERRCODE_FOREIGN_KEY_VIOLATION), - errmsg("insert or update on \"%s\" violates foreign key constraint \"%s\"", + errmsg("insert or update on table \"%s\" violates foreign key constraint \"%s\"", RelationGetRelationName(fk_rel), constrname), - errdetail("Key (%s)=(%s) is not present in \"%s\".", + errdetail("Key (%s)=(%s) is not present in table \"%s\".", key_names, key_values, RelationGetRelationName(pk_rel)))); else @@ -3088,7 +3088,7 @@ ri_ReportViolation(RI_QueryKey *qkey, const char *constrname, errmsg("update or delete on \"%s\" violates foreign key constraint \"%s\" on \"%s\"", RelationGetRelationName(pk_rel), constrname, RelationGetRelationName(fk_rel)), - errdetail("Key (%s)=(%s) is still referenced from \"%s\".", + errdetail("Key (%s)=(%s) is still referenced from table \"%s\".", key_names, key_values, RelationGetRelationName(fk_rel)))); } @@ -3139,7 +3139,7 @@ ri_BuildQueryKeyPkCheck(RI_QueryKey *key, Oid constr_id, int32 constr_queryno, if (fno == SPI_ERROR_NOATTRIBUTE) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_COLUMN), - errmsg("table \"%s\" does not have attribute \"%s\" referenced by constraint \"%s\"", + errmsg("table \"%s\" does not have column \"%s\" referenced by constraint \"%s\"", RelationGetRelationName(pk_rel), argv[j], argv[RI_CONSTRAINT_NAME_ARGNO]))); diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c index 67996f2325..2ea4dc3454 100644 --- a/src/backend/utils/adt/selfuncs.c +++ b/src/backend/utils/adt/selfuncs.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.145 2003/08/08 21:42:10 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.146 2003/09/25 06:58:04 petere Exp $ * *------------------------------------------------------------------------- */ @@ -3204,7 +3204,7 @@ regex_fixed_prefix(Const *patt_const, bool case_insensitive, if (typeid == BYTEAOID) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("regex matching not supported on type bytea"))); + errmsg("regular-expression matching not supported on type bytea"))); /* the right-hand const is type text for all of these */ patt = DatumGetCString(DirectFunctionCall1(textout, patt_const->constvalue)); @@ -3630,7 +3630,7 @@ regex_selectivity(Const *patt_const, bool case_insensitive) if (typeid == BYTEAOID) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("regex matching not supported on type bytea"))); + errmsg("regular-expression matching not supported on type bytea"))); /* the right-hand const is type text for all of these */ patt = DatumGetCString(DirectFunctionCall1(textout, patt_const->constvalue)); diff --git a/src/backend/utils/adt/tid.c b/src/backend/utils/adt/tid.c index efc5f78a37..64bbb2ce59 100644 --- a/src/backend/utils/adt/tid.c +++ b/src/backend/utils/adt/tid.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.40 2003/08/11 20:46:46 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.41 2003/09/25 06:58:04 petere Exp $ * * NOTES * input routine largely stolen from boxin(). @@ -63,7 +63,7 @@ tidin(PG_FUNCTION_ARGS) if (i < NTIDARGS) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for tid: \"%s\"", + errmsg("invalid input syntax for type tid: \"%s\"", str))); errno = 0; @@ -71,7 +71,7 @@ tidin(PG_FUNCTION_ARGS) if (errno || *badp != DELIM) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for tid: \"%s\"", + errmsg("invalid input syntax for type tid: \"%s\"", str))); hold_offset = strtol(coord[1], &badp, 10); @@ -79,7 +79,7 @@ tidin(PG_FUNCTION_ARGS) hold_offset > USHRT_MAX || hold_offset < 0) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for tid: \"%s\"", + errmsg("invalid input syntax for type tid: \"%s\"", str))); offsetNumber = hold_offset; diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c index 961c70da81..7ac3fc9d81 100644 --- a/src/backend/utils/adt/timestamp.c +++ b/src/backend/utils/adt/timestamp.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.94 2003/08/27 23:29:29 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.95 2003/09/25 06:58:04 petere Exp $ * *------------------------------------------------------------------------- */ @@ -115,7 +115,7 @@ timestamp_in(PG_FUNCTION_ARGS) case DTK_INVALID: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("\"%s\" is no longer supported", str))); + errmsg("date/time value \"%s\" is no longer supported", str))); TIMESTAMP_NOEND(result); break; @@ -341,7 +341,7 @@ timestamptz_in(PG_FUNCTION_ARGS) case DTK_INVALID: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("\"%s\" is no longer supported", str))); + errmsg("date/time value \"%s\" is no longer supported", str))); TIMESTAMP_NOEND(result); break; @@ -503,7 +503,7 @@ interval_in(PG_FUNCTION_ARGS) case DTK_INVALID: ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("\"%s\" is no longer supported", str))); + errmsg("date/time value \"%s\" is no longer supported", str))); break; default: @@ -1686,7 +1686,7 @@ timestamp_mi(PG_FUNCTION_ARGS) { ereport(ERROR, (errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE), - errmsg("cannot subtract non-finite timestamps"))); + errmsg("cannot subtract infinite timestamps"))); result->time = 0; } @@ -2381,7 +2381,7 @@ text_timestamp(PG_FUNCTION_ARGS) if (VARSIZE(str) - VARHDRSZ > MAXDATELEN) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - errmsg("invalid input syntax for timestamp: \"%s\"", + errmsg("invalid input syntax for type timestamp: \"%s\"", DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(str)))))); @@ -2441,7 +2441,7 @@ text_timestamptz(PG_FUNCTION_ARGS) if (VARSIZE(str) - VARHDRSZ > MAXDATELEN) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - errmsg("invalid input syntax for timestamp with time zone: \"%s\"", + errmsg("invalid input syntax for type timestamp with time zone: \"%s\"", DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(str)))))); @@ -2502,7 +2502,7 @@ text_interval(PG_FUNCTION_ARGS) if (VARSIZE(str) - VARHDRSZ > MAXDATELEN) ereport(ERROR, (errcode(ERRCODE_INVALID_DATETIME_FORMAT), - errmsg("invalid input syntax for interval: \"%s\"", + errmsg("invalid input syntax for type interval: \"%s\"", DatumGetCString(DirectFunctionCall1(textout, PointerGetDatum(str)))))); diff --git a/src/backend/utils/adt/varbit.c b/src/backend/utils/adt/varbit.c index f870fcc1ee..00527c45f1 100644 --- a/src/backend/utils/adt/varbit.c +++ b/src/backend/utils/adt/varbit.c @@ -9,7 +9,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.36 2003/09/15 20:03:37 petere Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.37 2003/09/25 06:58:05 petere Exp $ * *------------------------------------------------------------------------- */ @@ -153,7 +153,7 @@ bit_in(PG_FUNCTION_ARGS) else ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("\"%c\" is not a valid hex digit", + errmsg("\"%c\" is not a valid hexadecimal digit", *sp))); if (bc) @@ -392,7 +392,7 @@ varbit_in(PG_FUNCTION_ARGS) else ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("\"%c\" is not a valid hex digit", + errmsg("\"%c\" is not a valid hexadecimal digit", *sp))); if (bc) @@ -1254,7 +1254,7 @@ bitfromint8(PG_FUNCTION_ARGS) #else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("int64 is not supported on this platform"))); + errmsg("64-bit integers not supported on this platform"))); PG_RETURN_NULL(); #endif @@ -1287,7 +1287,7 @@ bittoint8(PG_FUNCTION_ARGS) #else ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), - errmsg("int64 is not supported on this platform"))); + errmsg("64-bit integers not supported on this platform"))); PG_RETURN_NULL(); #endif diff --git a/src/backend/utils/adt/varlena.c b/src/backend/utils/adt/varlena.c index a3dec23c57..31a139b9b9 100644 --- a/src/backend/utils/adt/varlena.c +++ b/src/backend/utils/adt/varlena.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.105 2003/08/04 04:03:10 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.106 2003/09/25 06:58:05 petere Exp $ * *------------------------------------------------------------------------- */ @@ -114,7 +114,7 @@ byteain(PG_FUNCTION_ARGS) */ ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for bytea"))); + errmsg("invalid input syntax for type bytea"))); } } @@ -154,7 +154,7 @@ byteain(PG_FUNCTION_ARGS) */ ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), - errmsg("invalid input syntax for bytea"))); + errmsg("invalid input syntax for type bytea"))); } } diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 3c4cb46a74..d28875b1da 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.189 2003/09/24 18:54:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.190 2003/09/25 06:58:05 petere Exp $ * *------------------------------------------------------------------------- */ @@ -3303,7 +3303,7 @@ write_relcache_init_file(void) */ ereport(WARNING, (errcode_for_file_access(), - errmsg("could not create init file \"%s\": %m", + errmsg("could not create relation-cache initialization file \"%s\": %m", tempfilename), errdetail("Continuing anyway, but there's something wrong."))); return; @@ -3444,7 +3444,7 @@ write_relcache_init_file(void) { ereport(WARNING, (errcode_for_file_access(), - errmsg("could not rename init file \"%s\" to \"%s\": %m", + errmsg("could not rename relation-cache initialization file \"%s\" to \"%s\": %m", tempfilename, finalfilename), errdetail("Continuing anyway, but there's something wrong."))); diff --git a/src/backend/utils/error/elog.c b/src/backend/utils/error/elog.c index 1d34e15667..8fd5f41046 100644 --- a/src/backend/utils/error/elog.c +++ b/src/backend/utils/error/elog.c @@ -37,7 +37,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.122 2003/09/03 15:49:42 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.123 2003/09/25 06:58:05 petere Exp $ * *------------------------------------------------------------------------- */ @@ -873,7 +873,7 @@ DebugFileOpen(void) 0666)) < 0) ereport(FATAL, (errcode_for_file_access(), - errmsg("failed to open \"%s\": %m", OutputFileName))); + errmsg("could not open file \"%s\": %m", OutputFileName))); istty = isatty(fd); close(fd); @@ -883,7 +883,7 @@ DebugFileOpen(void) if (!freopen(OutputFileName, "a", stderr)) ereport(FATAL, (errcode_for_file_access(), - errmsg("failed to reopen \"%s\" as stderr: %m", + errmsg("could not reopen file \"%s\" as stderr: %m", OutputFileName))); /* @@ -896,7 +896,7 @@ DebugFileOpen(void) if (!freopen(OutputFileName, "a", stdout)) ereport(FATAL, (errcode_for_file_access(), - errmsg("failed to reopen \"%s\" as stdout: %m", + errmsg("could not reopen file \"%s\" as stdout: %m", OutputFileName))); } } diff --git a/src/backend/utils/fmgr/dfmgr.c b/src/backend/utils/fmgr/dfmgr.c index 52e8273b77..6d73191d33 100644 --- a/src/backend/utils/fmgr/dfmgr.c +++ b/src/backend/utils/fmgr/dfmgr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.65 2003/09/07 02:18:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.66 2003/09/25 06:58:05 petere Exp $ * *------------------------------------------------------------------------- */ @@ -402,7 +402,7 @@ find_in_dynamic_libpath(const char *basename) if (len == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_NAME), - errmsg("zero-length component in DYNAMIC_LIBRARY_PATH"))); + errmsg("zero-length component in parameter \"dynamic_library_path\""))); piece = palloc(len + 1); strncpy(piece, p, len); @@ -415,7 +415,7 @@ find_in_dynamic_libpath(const char *basename) if (!is_absolute_path(mangled)) ereport(ERROR, (errcode(ERRCODE_INVALID_NAME), - errmsg("DYNAMIC_LIBRARY_PATH component is not absolute"))); + errmsg("component in parameter \"dynamic_library_path\" is not an absolute path"))); full = palloc(strlen(mangled) + 1 + baselen + 1); sprintf(full, "%s/%s", mangled, basename); diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c index 71cdd0cbf0..a22a0b27d5 100644 --- a/src/backend/utils/fmgr/fmgr.c +++ b/src/backend/utils/fmgr/fmgr.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.75 2003/08/04 02:40:06 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.76 2003/09/25 06:58:05 petere Exp $ * *------------------------------------------------------------------------- */ @@ -220,7 +220,7 @@ fmgr_info_cxt_security(Oid functionId, FmgrInfo *finfo, MemoryContext mcxt, if (fbp == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("internal function \"%s\" is not in table", + errmsg("internal function \"%s\" is not in internal lookup table", prosrc))); pfree(prosrc); /* Should we check that nargs, strict, retset match the table? */ @@ -619,7 +619,7 @@ fmgr_oldstyle(PG_FUNCTION_ARGS) */ ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), - errmsg("function %u has too many arguments (%d > %d)", + errmsg("function %u has too many arguments (%d, maximum is %d)", fcinfo->flinfo->fn_oid, n_arguments, 16))); returnValue = NULL; /* keep compiler quiet */ break; @@ -1483,7 +1483,7 @@ fmgr(Oid procedureId,...) if (n_arguments > FUNC_MAX_ARGS) ereport(ERROR, (errcode(ERRCODE_TOO_MANY_ARGUMENTS), - errmsg("function %u has too many arguments (%d > %d)", + errmsg("function %u has too many arguments (%d, maximum is %d)", flinfo.fn_oid, n_arguments, FUNC_MAX_ARGS))); va_start(pvar, procedureId); for (i = 0; i < n_arguments; i++) diff --git a/src/backend/utils/init/miscinit.c b/src/backend/utils/init/miscinit.c index 22baac3706..a127296cd9 100644 --- a/src/backend/utils/init/miscinit.c +++ b/src/backend/utils/init/miscinit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.114 2003/09/24 18:54:01 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.115 2003/09/25 06:58:05 petere Exp $ * *------------------------------------------------------------------------- */ @@ -401,7 +401,7 @@ GetUserNameFromId(AclId userid) if (!HeapTupleIsValid(tuple)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("invalid user id: %d", userid))); + errmsg("invalid user ID: %d", userid))); result = pstrdup(NameStr(((Form_pg_shadow) GETSTRUCT(tuple))->usename)); @@ -545,10 +545,10 @@ CreateLockFile(const char *filename, bool amPostmaster, errmsg("lock file \"%s\" already exists", filename), isDDLock ? - errhint("Is another %s (pid %d) running in \"%s\"?", + errhint("Is another %s (PID %d) running in data directory \"%s\"?", (encoded_pid < 0 ? "postgres" : "postmaster"), (int) other_pid, refName) : - errhint("Is another %s (pid %d) using \"%s\"?", + errhint("Is another %s (PID %d) using socket file \"%s\"?", (encoded_pid < 0 ? "postgres" : "postmaster"), (int) other_pid, refName))); } @@ -578,12 +578,12 @@ CreateLockFile(const char *filename, bool amPostmaster, ereport(FATAL, (errcode(ERRCODE_LOCK_FILE_EXISTS), errmsg("pre-existing shared memory block " - "(key %lu, id %lu) is still in use", + "(key %lu, ID %lu) is still in use", id1, id2), errhint("If you're sure there are no old " - "backends still running, remove " + "server processes still running, remove " "the shared memory block with " - "ipcrm(1), or just delete \"%s\".", + "the command \"ipcrm\", or just delete the file \"%s\".", filename))); } } @@ -600,7 +600,7 @@ CreateLockFile(const char *filename, bool amPostmaster, errmsg("could not remove old lock file \"%s\": %m", filename), errhint("The file seems accidentally left over, but " - "I couldn't remove it. Please remove the file " + "it could not be removed. Please remove the file " "by hand and try again."))); } @@ -723,7 +723,7 @@ RecordSharedMemoryInLockFile(unsigned long id1, unsigned long id2) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not rewrite \"%s\": %m", + errmsg("could not open file \"%s\": %m", directoryLockFile))); return; } @@ -732,7 +732,7 @@ RecordSharedMemoryInLockFile(unsigned long id1, unsigned long id2) { ereport(LOG, (errcode_for_file_access(), - errmsg("could not read \"%s\": %m", + errmsg("could not read from file \"%s\": %m", directoryLockFile))); close(fd); return; @@ -772,7 +772,7 @@ RecordSharedMemoryInLockFile(unsigned long id1, unsigned long id2) errno = ENOSPC; ereport(LOG, (errcode_for_file_access(), - errmsg("could not write \"%s\": %m", + errmsg("could not write to file \"%s\": %m", directoryLockFile))); close(fd); return; @@ -884,7 +884,7 @@ process_preload_libraries(char *preload_libraries_string) freeList(elemlist); ereport(LOG, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("invalid list syntax for preload_libraries configuration option"))); + errmsg("invalid list syntax for parameter \"preload_libraries\""))); return; } diff --git a/src/backend/utils/init/postinit.c b/src/backend/utils/init/postinit.c index 982916d438..85bfc93c8b 100644 --- a/src/backend/utils/init/postinit.c +++ b/src/backend/utils/init/postinit.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.126 2003/08/04 02:40:06 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.127 2003/09/25 06:58:05 petere Exp $ * * *------------------------------------------------------------------------- @@ -369,7 +369,7 @@ InitPostgres(const char *dbname, const char *username) ereport(WARNING, (errcode(ERRCODE_UNDEFINED_OBJECT), errmsg("no users are defined in this database system"), - errhint("You should immediately run 'CREATE USER \"%s\" WITH SYSID %d CREATEUSER;'.", + errhint("You should immediately run CREATE USER \"%s\" WITH SYSID %d CREATEUSER;.", username, BOOTSTRAP_USESYSID))); } else diff --git a/src/backend/utils/mb/mbutils.c b/src/backend/utils/mb/mbutils.c index 495c492e2b..bebbf80370 100644 --- a/src/backend/utils/mb/mbutils.c +++ b/src/backend/utils/mb/mbutils.c @@ -4,7 +4,7 @@ * (currently mule internal code (mic) is used) * Tatsuo Ishii * - * $Header: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v 1.43 2003/08/04 00:43:27 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v 1.44 2003/09/25 06:58:05 petere Exp $ */ #include "postgres.h" @@ -249,7 +249,7 @@ pg_do_encoding_conversion(unsigned char *src, int len, { ereport(LOG, (errcode(ERRCODE_UNDEFINED_FUNCTION), - errmsg("default conversion proc for %s to %s does not exist", + errmsg("default conversion function for encoding \"%s\" to \"%s\" does not exist", pg_encoding_to_char(src_encoding), pg_encoding_to_char(dest_encoding)))); return src; diff --git a/src/backend/utils/mb/wchar.c b/src/backend/utils/mb/wchar.c index 566ff571b5..0e19a6075f 100644 --- a/src/backend/utils/mb/wchar.c +++ b/src/backend/utils/mb/wchar.c @@ -1,7 +1,7 @@ /* * conversion functions between pg_wchar and multibyte streams. * Tatsuo Ishii - * $Id: wchar.c,v 1.33 2003/08/04 00:43:27 momjian Exp $ + * $Id: wchar.c,v 1.34 2003/09/25 06:58:05 petere Exp $ * * WIN1250 client encoding updated by Pavel Behal * @@ -637,7 +637,7 @@ pg_verifymbstr(const unsigned char *mbstr, int len, bool noError) return false; ereport(ERROR, (errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE), - errmsg("UNICODE characters >= 0x10000 are not supported"))); + errmsg("Unicode characters greater than or equal to 0x10000 are not supported"))); } l = pg_mblen(mbstr); @@ -666,7 +666,7 @@ pg_verifymbstr(const unsigned char *mbstr, int len, bool noError) ereport(ERROR, (errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE), - errmsg("invalid %s character sequence: 0x%s", + errmsg("invalid byte sequence for encoding \"%s\": 0x%s", GetDatabaseEncodingName(), buf))); } } @@ -688,3 +688,6 @@ pg_database_encoding_max_length(void) } #endif + + + diff --git a/src/backend/utils/misc/guc-file.l b/src/backend/utils/misc/guc-file.l index 8084670728..64ff7e14de 100644 --- a/src/backend/utils/misc/guc-file.l +++ b/src/backend/utils/misc/guc-file.l @@ -4,7 +4,7 @@ * * Copyright (c) 2000-2003, PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v 1.18 2003/08/04 23:59:39 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v 1.19 2003/09/25 06:58:05 petere Exp $ */ %{ @@ -161,7 +161,7 @@ ProcessConfigFile(GucContext context) if (errno != ENOENT) ereport(elevel, (errcode_for_file_access(), - errmsg("could not read configuration file \"" CONFIG_FILENAME "\": %m"))); + errmsg("could not open configuration file \"%s\": %m", CONFIG_FILENAME))); return; } @@ -264,8 +264,8 @@ ProcessConfigFile(GucContext context) free_name_value_list(head); ereport(elevel, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("syntax error in \"" CONFIG_FILENAME "\" line %u, near token \"%s\"", - ConfigFileLineno, yytext))); + errmsg("syntax error in file \"%s\" line %u, near token \"%s\"", + CONFIG_FILENAME, ConfigFileLineno, yytext))); return; out_of_memory: diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index d8a76114de..9386013ac1 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -10,7 +10,7 @@ * Written by Peter Eisentraut . * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.158 2003/09/15 22:28:58 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.159 2003/09/25 06:58:05 petere Exp $ * *-------------------------------------------------------------------- */ @@ -238,11 +238,11 @@ const char *const config_group_names[] = /* UNGROUPED */ gettext_noop("Ungrouped"), /* CONN_AUTH */ - gettext_noop("Connections & Authentication"), + gettext_noop("Connections and Authentication"), /* CONN_AUTH_SETTINGS */ - gettext_noop("Connections & Authentication / Connection Settings"), + gettext_noop("Connections and Authentication / Connection Settings"), /* CONN_AUTH_SECURITY */ - gettext_noop("Connections & Authentication / Security & Authentication"), + gettext_noop("Connections and Authentication / Security and Authentication"), /* RESOURCES */ gettext_noop("Resource Usage"), /* RESOURCES_MEM */ @@ -252,11 +252,11 @@ const char *const config_group_names[] = /* RESOURCES_KERNEL */ gettext_noop("Resource Usage / Kernel Resources"), /* WAL */ - gettext_noop("Write Ahead Log"), + gettext_noop("Write-Ahead Log"), /* WAL_SETTINGS */ - gettext_noop("Write Ahead Log / Settings"), + gettext_noop("Write-Ahead Log / Settings"), /* WAL_CHECKPOINTS */ - gettext_noop("Write Ahead Log / Checkpoints"), + gettext_noop("Write-Ahead Log / Checkpoints"), /* QUERY_TUNING */ gettext_noop("Query Tuning"), /* QUERY_TUNING_METHOD */ @@ -268,19 +268,19 @@ const char *const config_group_names[] = /* QUERY_TUNING_OTHER */ gettext_noop("Query Tuning / Other Planner Options"), /* LOGGING */ - gettext_noop("Reporting & Logging"), + gettext_noop("Reporting and Logging"), /* LOGGING_SYSLOG */ - gettext_noop("Reporting & Logging / Syslog"), + gettext_noop("Reporting and Logging / Syslog"), /* LOGGING_WHEN */ - gettext_noop("Reporting & Logging / When To Log"), + gettext_noop("Reporting and Logging / When to Log"), /* LOGGING_WHAT */ - gettext_noop("Reporting & Logging / What To Log"), + gettext_noop("Reporting and Logging / What to Log"), /* STATS */ gettext_noop("Statistics"), /* STATS_MONITORING */ gettext_noop("Statistics / Monitoring"), /* STATS_COLLECTOR */ - gettext_noop("Statistics / Query & Index Statistics Collector"), + gettext_noop("Statistics / Query and Index Statistics Collector"), /* CLIENT_CONN */ gettext_noop("Client Connection Defaults"), /* CLIENT_CONN_STATEMENT */ @@ -292,11 +292,11 @@ const char *const config_group_names[] = /* LOCK_MANAGEMENT */ gettext_noop("Lock Management"), /* COMPAT_OPTIONS */ - gettext_noop("Version & Platform Compatibility"), + gettext_noop("Version and Platform Compatibility"), /* COMPAT_OPTIONS_PREVIOUS */ - gettext_noop("Version & Platform Compatibility / Previous Postgres Versions"), + gettext_noop("Version and Platform Compatibility / Previous PostgreSQL Versions"), /* COMPAT_OPTIONS_CLIENT */ - gettext_noop("Version & Platform Compatibility / Other Platforms & Clients"), + gettext_noop("Version and Platform Compatibility / Other Platforms and Clients"), /* DEVELOPER_OPTIONS */ gettext_noop("Developer Options"), /* help_config wants this array to be null-terminated */ @@ -349,7 +349,7 @@ static struct config_bool ConfigureNamesBool[] = { { {"enable_seqscan", PGC_USERSET, QUERY_TUNING_METHOD, - gettext_noop("Enable planner's use of sequential-scan plans"), + gettext_noop("enable planner's use of sequential-scan plans"), NULL }, &enable_seqscan, @@ -357,7 +357,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"enable_indexscan", PGC_USERSET, QUERY_TUNING_METHOD, - gettext_noop("Enable planner's use of index-scan plans"), + gettext_noop("enable planner's use of index-scan plans"), NULL }, &enable_indexscan, @@ -365,7 +365,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"enable_tidscan", PGC_USERSET, QUERY_TUNING_METHOD, - gettext_noop("Enable planner's use of TID scan plans"), + gettext_noop("enable planner's use of TID scan plans"), NULL }, &enable_tidscan, @@ -373,7 +373,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"enable_sort", PGC_USERSET, QUERY_TUNING_METHOD, - gettext_noop("Enable planner's use of explicit sort steps"), + gettext_noop("enable planner's use of explicit sort steps"), NULL }, &enable_sort, @@ -381,7 +381,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"enable_hashagg", PGC_USERSET, QUERY_TUNING_METHOD, - gettext_noop("Enable planner's use of hashed aggregation plans"), + gettext_noop("enable planner's use of hashed aggregation plans"), NULL }, &enable_hashagg, @@ -389,7 +389,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"enable_nestloop", PGC_USERSET, QUERY_TUNING_METHOD, - gettext_noop("Enable planner's use of nested-loop join plans"), + gettext_noop("enable planner's use of nested-loop join plans"), NULL }, &enable_nestloop, @@ -397,7 +397,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"enable_mergejoin", PGC_USERSET, QUERY_TUNING_METHOD, - gettext_noop("Enable planner's use of merge join plans"), + gettext_noop("enable planner's use of merge join plans"), NULL }, &enable_mergejoin, @@ -405,7 +405,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"enable_hashjoin", PGC_USERSET, QUERY_TUNING_METHOD, - gettext_noop("Enable planner's use of hash join plans"), + gettext_noop("enable planner's use of hash join plans"), NULL }, &enable_hashjoin, @@ -413,7 +413,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"geqo", PGC_USERSET, QUERY_TUNING_GEQO, - gettext_noop("Enable genetic query optimization"), + gettext_noop("enable genetic query optimization"), gettext_noop("This algorithm attempts to do planning without " "exhaustive searching") }, @@ -423,7 +423,7 @@ static struct config_bool ConfigureNamesBool[] = { /* Not for general use --- used by SET SESSION AUTHORIZATION */ {"is_superuser", PGC_INTERNAL, UNGROUPED, - gettext_noop("Set to indicate current user's privilege status"), + gettext_noop("set to indicate current user's privilege status"), NULL, GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -432,7 +432,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"tcpip_socket", PGC_POSTMASTER, CONN_AUTH_SETTINGS, - gettext_noop("Accept TCP/IP connections"), + gettext_noop("accept TCP/IP connections"), NULL }, &NetServer, @@ -440,7 +440,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"ssl", PGC_POSTMASTER, CONN_AUTH_SECURITY, - gettext_noop("Enables SSL connections"), + gettext_noop("enable SSL connections"), NULL }, &EnableSSL, @@ -448,23 +448,23 @@ static struct config_bool ConfigureNamesBool[] = }, { {"fsync", PGC_SIGHUP, WAL_SETTINGS, - gettext_noop("If on, server physically writes updates to disk"), - gettext_noop("It will use the fsync() system call in several places to make " + gettext_noop("force synchronization of updates to disk"), + gettext_noop("The server will use the fsync() system call in several places to make " "sure that updates are physically written to disk. This insures " "that a database cluster will recover to a consistent state after " - "an operating system or hardware crash") + "an operating system or hardware crash.") }, &enableFsync, true, NULL, NULL }, { {"zero_damaged_pages", PGC_SUSET, DEVELOPER_OPTIONS, - gettext_noop("Continues processing past damaged page headers"), + gettext_noop("continue processing past damaged page headers"), gettext_noop("Detection of a damaged page header normally causes PostgreSQL to " "report an error, aborting the current transaction. Setting " "zero_damaged_pages to true causes the system to instead report a " "warning, zero out the damaged page, and continue processing. This " - "behavior will destroy data, namely all the rows on the damaged page"), + "behavior will destroy data, namely all the rows on the damaged page."), GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, &zero_damaged_pages, @@ -472,16 +472,16 @@ static struct config_bool ConfigureNamesBool[] = }, { {"silent_mode", PGC_POSTMASTER, LOGGING_WHEN, - gettext_noop("Runs the server silently"), - gettext_noop("If this option is set, the server will automatically run in the" - "background and any controlling terminals are disassociated") + gettext_noop("run the server silently"), + gettext_noop("If this option is set, the server will automatically run in the " + "background and any controlling terminals are dissociated.") }, &SilentMode, false, NULL, NULL }, { {"log_connections", PGC_BACKEND, LOGGING_WHAT, - gettext_noop("Logs each successful connection"), + gettext_noop("log each successful connection"), NULL }, &Log_connections, @@ -489,7 +489,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"log_timestamp", PGC_SIGHUP, LOGGING_WHAT, - gettext_noop("Prefixes server log messages with a time stamp"), + gettext_noop("prefix server log messages with a time stamp"), NULL }, &Log_timestamp, @@ -497,7 +497,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"log_pid", PGC_SIGHUP, LOGGING_WHAT, - gettext_noop("Prefixes server log messages with the server PID"), + gettext_noop("prefix server log messages with the server PID"), NULL }, &Log_pid, @@ -507,9 +507,8 @@ static struct config_bool ConfigureNamesBool[] = #ifdef USE_ASSERT_CHECKING { {"debug_assertions", PGC_USERSET, DEVELOPER_OPTIONS, - gettext_noop("Turns on various assertion checks"), - gettext_noop("This is a debugging aid. To use this option, " - "PostgreSQL must be built with the configure option --enable-cassert"), + gettext_noop("turn on various assertion checks"), + gettext_noop("This is a debugging aid."), GUC_NOT_IN_SAMPLE }, &assert_enabled, @@ -520,7 +519,7 @@ static struct config_bool ConfigureNamesBool[] = { /* currently undocumented, so don't show in SHOW ALL */ {"exit_on_error", PGC_USERSET, UNGROUPED, - gettext_noop("No Description Available"), + gettext_noop("no description available"), NULL, GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE }, @@ -529,7 +528,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"log_statement", PGC_USERLIMIT, LOGGING_WHAT, - gettext_noop("Causes each SQL statement to be logged"), + gettext_noop("log each SQL statement"), NULL }, &log_statement, @@ -537,7 +536,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"log_duration", PGC_USERLIMIT, LOGGING_WHAT, - gettext_noop("Duration of every completed statement is logged"), + gettext_noop("log duration each completed SQL statement"), NULL }, &log_duration, @@ -545,15 +544,15 @@ static struct config_bool ConfigureNamesBool[] = }, { {"debug_print_parse", PGC_USERSET, LOGGING_WHAT, - gettext_noop("Parse tree printed to server logs"), - gettext_noop("Parsed for each executed query") + gettext_noop("print parse tree to server logs"), + NULL }, &Debug_print_parse, false, NULL, NULL }, { {"debug_print_rewritten", PGC_USERSET, LOGGING_WHAT, - gettext_noop("Prints query rewriter output to server log"), + gettext_noop("print parse tree after rewriting to server log"), NULL }, &Debug_print_rewritten, @@ -561,7 +560,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"debug_print_plan", PGC_USERSET, LOGGING_WHAT, - gettext_noop("Prints execution plan to the server log"), + gettext_noop("print execution plan to the server log"), NULL }, &Debug_print_plan, @@ -569,7 +568,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"debug_pretty_print", PGC_USERSET, LOGGING_WHAT, - gettext_noop("Indents displays from parse, rewritten and plan"), + gettext_noop("indent parse and plan tree displays"), NULL }, &Debug_pretty_print, @@ -577,7 +576,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"log_parser_stats", PGC_USERLIMIT, STATS_MONITORING, - gettext_noop("Write parser performance stats to server log"), + gettext_noop("write parser performance statistics to server log"), NULL }, &log_parser_stats, @@ -585,7 +584,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"log_planner_stats", PGC_USERLIMIT, STATS_MONITORING, - gettext_noop("Write planner performance stats to server log"), + gettext_noop("write planner performance statistics to server log"), NULL }, &log_planner_stats, @@ -593,7 +592,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"log_executor_stats", PGC_USERLIMIT, STATS_MONITORING, - gettext_noop("Write executor performance stats to server log"), + gettext_noop("write executor performance statistics to server log"), NULL }, &log_executor_stats, @@ -601,7 +600,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"log_statement_stats", PGC_USERLIMIT, STATS_MONITORING, - gettext_noop("Write statement performance stats to server log"), + gettext_noop("write cumulative performance statistics to server log"), NULL }, &log_statement_stats, @@ -610,7 +609,7 @@ static struct config_bool ConfigureNamesBool[] = #ifdef BTREE_BUILD_STATS { {"log_btree_build_stats", PGC_SUSET, DEVELOPER_OPTIONS, - gettext_noop("No Description Available"), + gettext_noop("no description available"), NULL, GUC_NOT_IN_SAMPLE }, @@ -621,7 +620,7 @@ static struct config_bool ConfigureNamesBool[] = { {"explain_pretty_print", PGC_USERSET, CLIENT_CONN_OTHER, - gettext_noop("Use indented output format for EXPLAIN VERBOSE"), + gettext_noop("use indented output format for EXPLAIN VERBOSE"), NULL }, &Explain_pretty_print, @@ -629,7 +628,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"stats_start_collector", PGC_POSTMASTER, STATS_COLLECTOR, - gettext_noop("Start server statistics-collection subprocess"), + gettext_noop("start server statistics-collection subprocess"), NULL }, &pgstat_collect_startcollector, @@ -637,7 +636,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"stats_reset_on_server_start", PGC_POSTMASTER, STATS_COLLECTOR, - gettext_noop("Collected statistics zeroed out on server restart"), + gettext_noop("zero collected statistics on server restart"), NULL }, &pgstat_collect_resetonpmstart, @@ -645,7 +644,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"stats_command_string", PGC_SUSET, STATS_COLLECTOR, - gettext_noop("Enable stat collection of executing commands"), + gettext_noop("collect statistics about executing commands"), gettext_noop("Enables the collection of statistics on the currently " "executing command of each session, along with the time " "at which that command began execution.") @@ -655,7 +654,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"stats_row_level", PGC_SUSET, STATS_COLLECTOR, - gettext_noop("Enable collection of row-level stats on db activity"), + gettext_noop("collect row-level statistics on database activity"), NULL }, &pgstat_collect_tuplelevel, @@ -663,7 +662,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"stats_block_level", PGC_SUSET, STATS_COLLECTOR, - gettext_noop("Enables collection of block-level stats on db activity"), + gettext_noop("collect block-level statistics on database activity"), NULL }, &pgstat_collect_blocklevel, @@ -672,7 +671,7 @@ static struct config_bool ConfigureNamesBool[] = { {"trace_notify", PGC_USERSET, DEVELOPER_OPTIONS, - gettext_noop("Generates debugging output for LISTEN and NOTIFY"), + gettext_noop("generate debugging output for LISTEN and NOTIFY"), NULL, GUC_NOT_IN_SAMPLE }, @@ -683,7 +682,7 @@ static struct config_bool ConfigureNamesBool[] = #ifdef LOCK_DEBUG { {"trace_locks", PGC_SUSET, DEVELOPER_OPTIONS, - gettext_noop("No Description Available"), + gettext_noop("no description available"), NULL, GUC_NOT_IN_SAMPLE }, @@ -692,7 +691,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"trace_userlocks", PGC_SUSET, DEVELOPER_OPTIONS, - gettext_noop("No Description Available"), + gettext_noop("no description available"), NULL, GUC_NOT_IN_SAMPLE }, @@ -701,7 +700,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"trace_lwlocks", PGC_SUSET, DEVELOPER_OPTIONS, - gettext_noop("No Description Available"), + gettext_noop("no description available"), NULL, GUC_NOT_IN_SAMPLE }, @@ -710,7 +709,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"debug_deadlocks", PGC_SUSET, DEVELOPER_OPTIONS, - gettext_noop("No Description Available"), + gettext_noop("no description available"), NULL, GUC_NOT_IN_SAMPLE }, @@ -721,18 +720,18 @@ static struct config_bool ConfigureNamesBool[] = { {"log_hostname", PGC_SIGHUP, LOGGING_WHAT, - gettext_noop("Log hostname to connection logs"), + gettext_noop("log host name in connection logs"), gettext_noop("By default, connection logs only show the IP address " "of the connecting host. If you want them to show the host name you " "can turn this on, but depending on your host name resolution " - "setup it might impose a non-negligible performance penalty") + "setup it might impose a non-negligible performance penalty.") }, &log_hostname, false, NULL, NULL }, { {"log_source_port", PGC_SIGHUP, LOGGING_WHAT, - gettext_noop("Log outgoing port number of the connecting host"), + gettext_noop("log outgoing port number of the connecting host"), NULL }, &LogSourcePort, @@ -741,48 +740,46 @@ static struct config_bool ConfigureNamesBool[] = { {"sql_inheritance", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS, - gettext_noop("This controls the inheritance semantics"), - gettext_noop("In particular, whether subtables are included by " - "various commands by default") + gettext_noop("include subtables by default in various commands"), + NULL }, &SQL_inheritance, true, NULL, NULL }, { {"australian_timezones", PGC_USERSET, CLIENT_CONN_LOCALE, - gettext_noop("If true, ACST, CST, EST, and SAT are interpreted " - "as Australian time zones"), + gettext_noop("interpret ACST, CST, EST, and SAT as Australian time zones"), gettext_noop("Otherwise they are interpreted as North/South American " - "time zones and Saturday") + "time zones and Saturday.") }, &Australian_timezones, false, ClearDateCache, NULL }, { {"password_encryption", PGC_USERSET, CONN_AUTH_SECURITY, - gettext_noop("If unspecified the password is encrypted"), + gettext_noop("encrypt passwords"), gettext_noop("When a password is specified in CREATE USER or " "ALTER USER without writing either ENCRYPTED or UNENCRYPTED, " - "this option determines whether the password is to be encrypted") + "this option determines whether the password is to be encrypted.") }, &Password_encryption, true, NULL, NULL }, { {"transform_null_equals", PGC_USERSET, COMPAT_OPTIONS_CLIENT, - gettext_noop("expr=NULL treated as expr IS NULL"), + gettext_noop("treat \"expr=NULL\" as \"expr IS NULL\""), gettext_noop("When turned on, expressions of the form expr = NULL " "(or NULL = expr) are treated as expr IS NULL, that is, they " "return true if expr evaluates to the null value, and false " "otherwise. The correct behavior of expr = NULL is to always " - "return null (unknown)") + "return null (unknown).") }, &Transform_null_equals, false, NULL, NULL }, { {"db_user_namespace", PGC_SIGHUP, CONN_AUTH_SECURITY, - gettext_noop("This allows per-database user names"), + gettext_noop("enable per-database user names"), NULL }, &Db_user_namespace, @@ -791,8 +788,8 @@ static struct config_bool ConfigureNamesBool[] = { /* only here for backwards compatibility */ {"autocommit", PGC_USERSET, CLIENT_CONN_STATEMENT, - gettext_noop("This var doesn't do anything"), - gettext_noop("It's just here so that we won't choke on SET AUTOCOMMIT " + gettext_noop("no effect"), + gettext_noop("This parameter doesn't do anything. It's just here so that we won't choke on SET AUTOCOMMIT " "TO ON from 7.3-vintage clients."), GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE }, @@ -801,7 +798,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"default_transaction_read_only", PGC_USERSET, CLIENT_CONN_STATEMENT, - gettext_noop("Controls default read-only status of new transactions"), + gettext_noop("default read-only status of new transactions"), NULL }, &DefaultXactReadOnly, @@ -809,7 +806,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"transaction_read_only", PGC_USERSET, CLIENT_CONN_STATEMENT, - gettext_noop("Current transaction's read-only status"), + gettext_noop("current transaction's read-only status"), NULL, GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -818,7 +815,7 @@ static struct config_bool ConfigureNamesBool[] = }, { {"add_missing_from", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS, - gettext_noop("Add missing table references to FROM clauses"), + gettext_noop("automatically add missing table references to FROM clauses"), NULL }, &add_missing_from, @@ -836,38 +833,38 @@ static struct config_int ConfigureNamesInt[] = { { {"default_statistics_target", PGC_USERSET, QUERY_TUNING_OTHER, - gettext_noop("Sets the default statistics target"), + gettext_noop("set the default statistics target"), gettext_noop("This applies to table columns that have not had a " - "column-specific target set via ALTER TABLE SET STATISTICS") + "column-specific target set via ALTER TABLE SET STATISTICS.") }, &default_statistics_target, 10, 1, 1000, NULL, NULL }, { {"from_collapse_limit", PGC_USERSET, QUERY_TUNING_OTHER, - gettext_noop("From list size beyond which sub-queries are not " + gettext_noop("FROM-list size beyond which subqueries are not " "collapsed"), - gettext_noop("The planner will merge sub-queries into upper " + gettext_noop("The planner will merge subqueries into upper " "queries if the resulting FROM list would have no more than " - "this many items") + "this many items.") }, &from_collapse_limit, 8, 1, INT_MAX, NULL, NULL }, { {"join_collapse_limit", PGC_USERSET, QUERY_TUNING_OTHER, - gettext_noop("From list size beyond which JOIN constructs not " + gettext_noop("FROM-list size beyond which JOIN constructs are not " "flattened"), gettext_noop("The planner will flatten explicit inner JOIN " "constructs into lists of FROM items whenever a list of no more " - "than this many items would result") + "than this many items would result.") }, &join_collapse_limit, 8, 1, INT_MAX, NULL, NULL }, { {"geqo_threshold", PGC_USERSET, QUERY_TUNING_GEQO, - gettext_noop("Threshold of FROM items beyond which geqo is used"), + gettext_noop("threshold of FROM items beyond which GEQO is used"), NULL }, &geqo_threshold, @@ -875,7 +872,7 @@ static struct config_int ConfigureNamesInt[] = }, { {"geqo_pool_size", PGC_USERSET, QUERY_TUNING_GEQO, - gettext_noop("The number of individuals in one population"), + gettext_noop("GEQO: number of individuals in one population"), NULL }, &Geqo_pool_size, @@ -883,7 +880,7 @@ static struct config_int ConfigureNamesInt[] = }, { {"geqo_effort", PGC_USERSET, QUERY_TUNING_GEQO, - gettext_noop("Effort is used to calculate a default for generations"), + gettext_noop("GEQO: effort is used to calculate a default for generations"), NULL }, &Geqo_effort, @@ -891,9 +888,9 @@ static struct config_int ConfigureNamesInt[] = }, { {"geqo_generations", PGC_USERSET, QUERY_TUNING_GEQO, - gettext_noop("Specifies the number of iterations in the algorithm"), + gettext_noop("GEQO: number of iterations in the algorithm"), gettext_noop("The number must be a positive integer. If 0 is " - "specified then Effort * Log2(PoolSize) is used") + "specified then effort * log2(poolsize) is used") }, &Geqo_generations, 0, 0, INT_MAX, NULL, NULL @@ -901,7 +898,7 @@ static struct config_int ConfigureNamesInt[] = { {"deadlock_timeout", PGC_SIGHUP, LOCK_MANAGEMENT, - gettext_noop("Time to wait on lock (msec) before checking for deadlock"), + gettext_noop("time in milliseconds to wait on lock before checking for deadlock"), NULL }, &DeadlockTimeout, @@ -911,11 +908,11 @@ static struct config_int ConfigureNamesInt[] = #ifdef HAVE_SYSLOG { {"syslog", PGC_SIGHUP, LOGGING_SYSLOG, - gettext_noop("Allows the use of syslog for logging"), + gettext_noop("use syslog for logging"), gettext_noop("If this option is 1, messages go both to syslog " "and the standard output. A value of 2 sends output only to syslog. " "(Some messages will still go to the standard output/error.) The " - "default is 0, which means syslog is off") + "default is 0, which means syslog is off.") }, &Use_syslog, 0, 0, 2, NULL, NULL @@ -931,7 +928,7 @@ static struct config_int ConfigureNamesInt[] = */ { {"max_connections", PGC_POSTMASTER, CONN_AUTH_SETTINGS, - gettext_noop("Max number of concurrent connections"), + gettext_noop("maximum number of concurrent connections"), NULL }, &MaxBackends, @@ -940,7 +937,7 @@ static struct config_int ConfigureNamesInt[] = { {"superuser_reserved_connections", PGC_POSTMASTER, CONN_AUTH_SETTINGS, - gettext_noop("Number of connection \"slots\" reserved for superusers"), + gettext_noop("number of connection slots reserved for superusers"), NULL }, &ReservedBackends, @@ -949,7 +946,7 @@ static struct config_int ConfigureNamesInt[] = { {"shared_buffers", PGC_POSTMASTER, RESOURCES_MEM, - gettext_noop("The number of shared memory buffers used by the server"), + gettext_noop("number of shared memory buffers used by the server"), NULL }, &NBuffers, @@ -958,7 +955,7 @@ static struct config_int ConfigureNamesInt[] = { {"port", PGC_POSTMASTER, CONN_AUTH_SETTINGS, - gettext_noop("The TCP port the server listens on"), + gettext_noop("TCP port the server listens on"), NULL }, &PostPortNumber, @@ -967,8 +964,8 @@ static struct config_int ConfigureNamesInt[] = { {"unix_socket_permissions", PGC_POSTMASTER, CONN_AUTH_SETTINGS, - gettext_noop("Sets the access permissions of the Unix domain socket"), - gettext_noop("Unix domain sockets use the usual Unix file system " + gettext_noop("access permissions of the Unix-domain socket"), + gettext_noop("Unix-domain sockets use the usual Unix file system " "permission set. The option value is expected to be an numeric mode " "specification in the form accepted by the chmod and umask system " "calls. (To use the customary octal format the number must start with " @@ -980,7 +977,7 @@ static struct config_int ConfigureNamesInt[] = { {"sort_mem", PGC_USERSET, RESOURCES_MEM, - gettext_noop("Max memory to be used for sorts and hash tables"), + gettext_noop("maximum memory to be used for sorts and hash tables"), gettext_noop("Specifies the amount of memory to be used by internal " "sort operations and hash tables before switching to temporary disk " "files") @@ -991,7 +988,7 @@ static struct config_int ConfigureNamesInt[] = { {"vacuum_mem", PGC_USERSET, RESOURCES_MEM, - gettext_noop("Max mem used to keep track of to-be-reclaimed tuples"), + gettext_noop("maximum memory used to keep track of to-be-reclaimed rows"), NULL }, &VacuumMem, @@ -1000,7 +997,7 @@ static struct config_int ConfigureNamesInt[] = { {"max_files_per_process", PGC_BACKEND, RESOURCES_KERNEL, - gettext_noop("Max num of simultaneously open files for each subprocess"), + gettext_noop("maximum number of simultaneously open files for each server process"), NULL }, &max_files_per_process, @@ -1010,7 +1007,7 @@ static struct config_int ConfigureNamesInt[] = #ifdef LOCK_DEBUG { {"trace_lock_oidmin", PGC_SUSET, DEVELOPER_OPTIONS, - gettext_noop("No Description Available"), + gettext_noop("no description available"), NULL, GUC_NOT_IN_SAMPLE }, @@ -1019,7 +1016,7 @@ static struct config_int ConfigureNamesInt[] = }, { {"trace_lock_table", PGC_SUSET, DEVELOPER_OPTIONS, - gettext_noop("No Description Available"), + gettext_noop("no description available"), NULL, GUC_NOT_IN_SAMPLE }, @@ -1029,7 +1026,7 @@ static struct config_int ConfigureNamesInt[] = #endif { {"max_expr_depth", PGC_USERSET, CLIENT_CONN_OTHER, - gettext_noop("Max expression nesting depth"), + gettext_noop("maximum expression nesting depth"), NULL }, &max_expr_depth, @@ -1038,8 +1035,8 @@ static struct config_int ConfigureNamesInt[] = { {"statement_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT, - gettext_noop("Max allowed duration (msec) of any statement"), - gettext_noop("A value of 0 turns off the timeout") + gettext_noop("maximum allowed duration (in milliseconds) of any statement"), + gettext_noop("A value of 0 turns off the timeout.") }, &StatementTimeout, 0, 0, INT_MAX, NULL, NULL @@ -1047,7 +1044,7 @@ static struct config_int ConfigureNamesInt[] = { {"max_fsm_relations", PGC_POSTMASTER, RESOURCES_FSM, - gettext_noop("Max num. of tables+indexes for which free space is " + gettext_noop("maximum number of tables and indexes for which free space is " "tracked"), NULL }, @@ -1056,7 +1053,7 @@ static struct config_int ConfigureNamesInt[] = }, { {"max_fsm_pages", PGC_POSTMASTER, RESOURCES_FSM, - gettext_noop("Max num. of disk pages for which free space is " + gettext_noop("maximum number of disk pages for which free space is " "tracked"), NULL }, @@ -1066,7 +1063,7 @@ static struct config_int ConfigureNamesInt[] = { {"max_locks_per_transaction", PGC_POSTMASTER, LOCK_MANAGEMENT, - gettext_noop("Max locks per transaction"), + gettext_noop("maximum number of locks per transaction"), gettext_noop("The shared lock table is sized on the assumption that " "at most max_locks_per_transaction * max_connections distinct " "objects will need to be locked at any one time.") @@ -1077,7 +1074,7 @@ static struct config_int ConfigureNamesInt[] = { {"authentication_timeout", PGC_SIGHUP, CONN_AUTH_SECURITY, - gettext_noop("Max time (sec) to complete client authentication"), + gettext_noop("maximum time in seconds to complete client authentication"), NULL }, &AuthenticationTimeout, @@ -1087,7 +1084,7 @@ static struct config_int ConfigureNamesInt[] = { /* Not for general use */ {"pre_auth_delay", PGC_SIGHUP, DEVELOPER_OPTIONS, - gettext_noop("No Description Available"), + gettext_noop("no description available"), NULL, GUC_NOT_IN_SAMPLE }, @@ -1097,7 +1094,7 @@ static struct config_int ConfigureNamesInt[] = { {"checkpoint_segments", PGC_SIGHUP, WAL_CHECKPOINTS, - gettext_noop("Max distance between automatic WAL checkpoints"), + gettext_noop("maximum distance between automatic WAL checkpoints"), NULL }, &CheckPointSegments, @@ -1106,7 +1103,7 @@ static struct config_int ConfigureNamesInt[] = { {"checkpoint_timeout", PGC_SIGHUP, WAL_CHECKPOINTS, - gettext_noop("Max time (sec) between automatic WAL checkpoints"), + gettext_noop("maximum time in seconds between automatic WAL checkpoints"), NULL }, &CheckPointTimeout, @@ -1115,8 +1112,8 @@ static struct config_int ConfigureNamesInt[] = { {"checkpoint_warning", PGC_SIGHUP, WAL_CHECKPOINTS, - gettext_noop("Log if filling of checkpoint segments happens more " - "frequently than this (sec)"), + gettext_noop("log if filling of checkpoint segments happens more " + "frequently than this (in seconds)"), gettext_noop("Send a message to the server logs if checkpoints " "caused by the filling of checkpoint segment files happens more " "frequently than this number of seconds. Zero turns off the warning.") @@ -1127,7 +1124,7 @@ static struct config_int ConfigureNamesInt[] = { {"wal_buffers", PGC_POSTMASTER, WAL_SETTINGS, - gettext_noop("Disk-page buffers in shared memory for WAL logging"), + gettext_noop("disk-page buffers in shared memory for WAL"), NULL }, &XLOGbuffers, @@ -1136,7 +1133,7 @@ static struct config_int ConfigureNamesInt[] = { {"wal_debug", PGC_SUSET, DEVELOPER_OPTIONS, - gettext_noop("If nonzero, log WAL-related debugging output"), + gettext_noop("if nonzero, log WAL-related debugging output"), NULL, GUC_NOT_IN_SAMPLE }, @@ -1146,7 +1143,7 @@ static struct config_int ConfigureNamesInt[] = { {"commit_delay", PGC_USERSET, WAL_CHECKPOINTS, - gettext_noop("Delay (usec) between transaction commit and " + gettext_noop("delay in microseconds between transaction commit and " "flushing WAL to disk"), NULL }, @@ -1156,8 +1153,8 @@ static struct config_int ConfigureNamesInt[] = { {"commit_siblings", PGC_USERSET, WAL_CHECKPOINTS, - gettext_noop("Min concurrent open trans. before performing " - "COMMIT_DELAY"), + gettext_noop("minimum concurrent open transactions before performing " + "commit_delay"), NULL }, &CommitSiblings, @@ -1166,11 +1163,10 @@ static struct config_int ConfigureNamesInt[] = { {"extra_float_digits", PGC_USERSET, CLIENT_CONN_LOCALE, - gettext_noop("Adjusts number of digits displayed for " - "floating-point values"), - gettext_noop("This affects float4, float8, and geometric data types. " + gettext_noop("number of digits displayed for floating-point values"), + gettext_noop("This affects real, double precision, and geometric data types. " "The parameter value is added to the standard number of digits " - "(FLT_DIG or DBL_DIG as appropriate)") + "(FLT_DIG or DBL_DIG as appropriate).") }, &extra_float_digits, 0, -15, 2, NULL, NULL @@ -1178,7 +1174,7 @@ static struct config_int ConfigureNamesInt[] = { {"log_min_duration_statement", PGC_USERLIMIT, LOGGING_WHEN, - gettext_noop("Min execution time (msec) above which statements will " + gettext_noop("minimum execution time in milliseconds above which statements will " "be logged"), gettext_noop("The default is 0 (turning this feature off).") }, @@ -1197,7 +1193,7 @@ static struct config_real ConfigureNamesReal[] = { { {"effective_cache_size", PGC_USERSET, QUERY_TUNING_COST, - gettext_noop("Planner's assumption about size of the disk cache"), + gettext_noop("planner's assumption about size of the disk cache"), gettext_noop("That is, the portion of the kernel's disk cache that " "will be used for PostgreSQL data files. This is measured in disk " "pages, which are normally 8 kB each.") @@ -1207,7 +1203,7 @@ static struct config_real ConfigureNamesReal[] = }, { {"random_page_cost", PGC_USERSET, QUERY_TUNING_COST, - gettext_noop("Planner's estimate of the cost of a nonsequentially " + gettext_noop("planner's estimate of the cost of a nonsequentially " "fetched disk page"), gettext_noop("This is measured as a multiple of the cost of a " "sequential page fetch. A higher value makes it more likely a " @@ -1219,7 +1215,7 @@ static struct config_real ConfigureNamesReal[] = }, { {"cpu_tuple_cost", PGC_USERSET, QUERY_TUNING_COST, - gettext_noop("Planner's estimate of the cost of processing each tuple"), + gettext_noop("planner's estimate of the cost of processing each tuple (row)"), gettext_noop("This is measured as a fraction of the cost of a " "sequential page fetch.") }, @@ -1228,8 +1224,8 @@ static struct config_real ConfigureNamesReal[] = }, { {"cpu_index_tuple_cost", PGC_USERSET, QUERY_TUNING_COST, - gettext_noop("Planner's estimate of processing cost for each " - "index tuple during index scan"), + gettext_noop("planner's estimate of processing cost for each " + "index tuple (row) during index scan"), gettext_noop("This is measured as a fraction of the cost of a " "sequential page fetch.") }, @@ -1238,7 +1234,7 @@ static struct config_real ConfigureNamesReal[] = }, { {"cpu_operator_cost", PGC_USERSET, QUERY_TUNING_COST, - gettext_noop("Planner's estimate of processing cost of each op. in WHERE"), + gettext_noop("planner's estimate of processing cost of each operator in WHERE"), gettext_noop("This is measured as a fraction of the cost of a sequential " "page fetch.") }, @@ -1248,7 +1244,7 @@ static struct config_real ConfigureNamesReal[] = { {"geqo_selection_bias", PGC_USERSET, QUERY_TUNING_GEQO, - gettext_noop("The selective pressure within the population"), + gettext_noop("GEQO: selective pressure within the population"), NULL }, &Geqo_selection_bias, @@ -1258,7 +1254,7 @@ static struct config_real ConfigureNamesReal[] = { {"seed", PGC_USERSET, UNGROUPED, - gettext_noop("Seed for random-number generation"), + gettext_noop("seed for random-number generation"), NULL, GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -1277,7 +1273,7 @@ static struct config_string ConfigureNamesString[] = { { {"client_encoding", PGC_USERSET, CLIENT_CONN_LOCALE, - gettext_noop("Client's character set encoding"), + gettext_noop("client's character set encoding"), NULL, GUC_REPORT }, @@ -1287,7 +1283,7 @@ static struct config_string ConfigureNamesString[] = { {"client_min_messages", PGC_USERSET, LOGGING_WHEN, - gettext_noop("Controls which message levels are sent to the client"), + gettext_noop("message levels that are sent to the client"), gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, " "DEBUG1, LOG, NOTICE, WARNING, and ERROR. Each level includes all the " "levels that follow it. The later the level, the fewer messages are " @@ -1299,10 +1295,10 @@ static struct config_string ConfigureNamesString[] = { {"log_min_messages", PGC_USERLIMIT, LOGGING_WHEN, - gettext_noop("Controls which message levels logged"), + gettext_noop("message levels that are logged"), gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, " "INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC. Each level " - "includes all the levels that follow it") + "includes all the levels that follow it.") }, &log_min_messages_str, "notice", assign_log_min_messages, NULL @@ -1310,8 +1306,8 @@ static struct config_string ConfigureNamesString[] = { {"log_error_verbosity", PGC_SUSET, LOGGING_WHEN, - gettext_noop("Controls verbosity of logged messages"), - gettext_noop("Valid values are 'terse', 'default', and 'verbose'") + gettext_noop("verbosity of logged messages"), + gettext_noop("Valid values are \"terse\", \"default\", and \"verbose\".") }, &log_error_verbosity_str, "default", assign_log_error_verbosity, NULL @@ -1319,9 +1315,9 @@ static struct config_string ConfigureNamesString[] = { {"log_min_error_statement", PGC_USERLIMIT, LOGGING_WHEN, - gettext_noop("Controls whether the erroneous statement is logged"), + gettext_noop("log statement generating error at or above this level"), gettext_noop("All SQL statements that cause an error of the " - "specified level, or a higher level, are logged") + "specified level or a higher level are logged.") }, &log_min_error_statement_str, "panic", assign_min_error_statement, NULL @@ -1329,9 +1325,9 @@ static struct config_string ConfigureNamesString[] = { {"DateStyle", PGC_USERSET, CLIENT_CONN_LOCALE, - gettext_noop("Sets display format for date and time values"), + gettext_noop("display format for date and time values"), gettext_noop("Also controls interpretation of ambiguous " - "date inputs"), + "date inputs."), GUC_LIST_INPUT | GUC_REPORT }, &datestyle_string, @@ -1340,7 +1336,7 @@ static struct config_string ConfigureNamesString[] = { {"default_transaction_isolation", PGC_USERSET, CLIENT_CONN_STATEMENT, - gettext_noop("The default isolation level of each new transaction"), + gettext_noop("transaction isolation level of each new transaction"), gettext_noop("Each SQL transaction has an isolation level, which " "can be either \"read committed\" or \"serializable\".") }, @@ -1350,7 +1346,7 @@ static struct config_string ConfigureNamesString[] = { {"dynamic_library_path", PGC_SUSET, CLIENT_CONN_OTHER, - gettext_noop("Path for dynamically loadable modules"), + gettext_noop("path for dynamically loadable modules"), gettext_noop("If a dynamically loadable module needs to be opened and " "the specified name does not have a directory component (i.e. the " "name does not contain a slash), the system will search this path for " @@ -1362,7 +1358,7 @@ static struct config_string ConfigureNamesString[] = { {"krb_server_keyfile", PGC_POSTMASTER, CONN_AUTH_SECURITY, - gettext_noop("The location of the Kerberos server key file"), + gettext_noop("location of the Kerberos server key file"), NULL }, &pg_krb_server_keyfile, @@ -1371,7 +1367,7 @@ static struct config_string ConfigureNamesString[] = { {"rendezvous_name", PGC_POSTMASTER, CONN_AUTH_SETTINGS, - gettext_noop("The Rendezvous broadcast service name"), + gettext_noop("Rendezvous broadcast service name"), NULL }, &rendezvous_name, @@ -1382,7 +1378,7 @@ static struct config_string ConfigureNamesString[] = { {"lc_collate", PGC_INTERNAL, CLIENT_CONN_LOCALE, - gettext_noop("Locale collation order"), + gettext_noop("collation order locale"), NULL, GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -1392,7 +1388,7 @@ static struct config_string ConfigureNamesString[] = { {"lc_ctype", PGC_INTERNAL, CLIENT_CONN_LOCALE, - gettext_noop("Locale character classification and case conversion"), + gettext_noop("character classification and case conversion locale"), NULL, GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -1402,7 +1398,7 @@ static struct config_string ConfigureNamesString[] = { {"lc_messages", PGC_SUSET, CLIENT_CONN_LOCALE, - gettext_noop("Language in which messages are displayed"), + gettext_noop("language in which messages are displayed"), NULL }, &locale_messages, @@ -1411,7 +1407,7 @@ static struct config_string ConfigureNamesString[] = { {"lc_monetary", PGC_USERSET, CLIENT_CONN_LOCALE, - gettext_noop("Locale for formatting monetary amounts"), + gettext_noop("locale for formatting monetary amounts"), NULL }, &locale_monetary, @@ -1420,7 +1416,7 @@ static struct config_string ConfigureNamesString[] = { {"lc_numeric", PGC_USERSET, CLIENT_CONN_LOCALE, - gettext_noop("Locale for formatting numbers"), + gettext_noop("locale for formatting numbers"), NULL }, &locale_numeric, @@ -1429,7 +1425,7 @@ static struct config_string ConfigureNamesString[] = { {"lc_time", PGC_USERSET, CLIENT_CONN_LOCALE, - gettext_noop("Locale for formatting date and time values"), + gettext_noop("locale for formatting date and time values"), NULL }, &locale_time, @@ -1438,7 +1434,7 @@ static struct config_string ConfigureNamesString[] = { {"preload_libraries", PGC_POSTMASTER, RESOURCES_KERNEL, - gettext_noop("Shared libraries to preload into postmaster"), + gettext_noop("shared libraries to preload into server"), NULL, GUC_LIST_INPUT | GUC_LIST_QUOTE }, @@ -1448,8 +1444,8 @@ static struct config_string ConfigureNamesString[] = { {"regex_flavor", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS, - gettext_noop("Regular expression \"flavor\""), - gettext_noop("This can be set to advanced, extended, or basic") + gettext_noop("regular expression \"flavor\""), + gettext_noop("This can be set to advanced, extended, or basic.") }, ®ex_flavor_string, "advanced", assign_regex_flavor, NULL @@ -1457,7 +1453,7 @@ static struct config_string ConfigureNamesString[] = { {"search_path", PGC_USERSET, CLIENT_CONN_STATEMENT, - gettext_noop("Schema search order for names not schema-qualified"), + gettext_noop("schema search order for names not schema-qualified"), NULL, GUC_LIST_INPUT | GUC_LIST_QUOTE }, @@ -1468,7 +1464,7 @@ static struct config_string ConfigureNamesString[] = { /* Can't be set in postgresql.conf */ {"server_encoding", PGC_INTERNAL, CLIENT_CONN_LOCALE, - gettext_noop("Server (database) character set encoding"), + gettext_noop("server (database) character set encoding"), NULL, GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -1479,7 +1475,7 @@ static struct config_string ConfigureNamesString[] = { /* Can't be set in postgresql.conf */ {"server_version", PGC_INTERNAL, UNGROUPED, - gettext_noop("Server version"), + gettext_noop("server version"), NULL, GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -1490,7 +1486,7 @@ static struct config_string ConfigureNamesString[] = { /* Not for general use --- used by SET SESSION AUTHORIZATION */ {"session_authorization", PGC_USERSET, UNGROUPED, - gettext_noop("Current session userid"), + gettext_noop("session user name"), NULL, GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -1502,15 +1498,15 @@ static struct config_string ConfigureNamesString[] = { {"syslog_facility", PGC_POSTMASTER, LOGGING_SYSLOG, gettext_noop("syslog \"facility\" to be used when syslog enabled"), - gettext_noop("You may choose from LOCAL0, LOCAL1, LOCAL2, LOCAL3, " - "LOCAL4, LOCAL5, LOCAL6, LOCAL7") + gettext_noop("Valid values are LOCAL0, LOCAL1, LOCAL2, LOCAL3, " + "LOCAL4, LOCAL5, LOCAL6, LOCAL7.") }, &Syslog_facility, "LOCAL0", assign_facility, NULL }, { {"syslog_ident", PGC_POSTMASTER, LOGGING_SYSLOG, - gettext_noop("Program name used to identify PostgreSQL messages " + gettext_noop("program name used to identify PostgreSQL messages " "in syslog"), NULL }, @@ -1521,7 +1517,7 @@ static struct config_string ConfigureNamesString[] = { {"TimeZone", PGC_USERSET, CLIENT_CONN_LOCALE, - gettext_noop("Time zone for displaying and interpreting time stamps"), + gettext_noop("time zone for displaying and interpreting time stamps"), NULL }, &timezone_string, @@ -1530,7 +1526,7 @@ static struct config_string ConfigureNamesString[] = { {"transaction_isolation", PGC_USERSET, CLIENT_CONN_STATEMENT, - gettext_noop("Current transaction's isolation level"), + gettext_noop("current transaction's isolation level"), NULL, GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE }, @@ -1540,7 +1536,7 @@ static struct config_string ConfigureNamesString[] = { {"unix_socket_group", PGC_POSTMASTER, CONN_AUTH_SETTINGS, - gettext_noop("The owning group of the Unix-domain socket"), + gettext_noop("owning group of the Unix-domain socket"), gettext_noop("(The owning user of the socket is always the user " "that starts the server.)") }, @@ -1550,7 +1546,7 @@ static struct config_string ConfigureNamesString[] = { {"unix_socket_directory", PGC_POSTMASTER, CONN_AUTH_SETTINGS, - gettext_noop("Directory where the Unix-domain socket will be created"), + gettext_noop("directory where the Unix-domain socket will be created"), NULL }, &UnixSocketDir, @@ -1559,7 +1555,7 @@ static struct config_string ConfigureNamesString[] = { {"virtual_host", PGC_POSTMASTER, CONN_AUTH_SETTINGS, - gettext_noop("The host name or IP address to listen to"), + gettext_noop("host name or IP address to listen to"), NULL }, &VirtualHost, @@ -1568,7 +1564,7 @@ static struct config_string ConfigureNamesString[] = { {"wal_sync_method", PGC_SIGHUP, WAL_SETTINGS, - gettext_noop("Method used for forcing WAL updates out to disk"), + gettext_noop("method used for forcing WAL updates out to disk"), NULL }, &XLOG_sync_method, @@ -2401,7 +2397,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("\"%s\" is not a recognized option", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); return false; } @@ -2420,7 +2416,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM), - errmsg("\"%s\" cannot be changed", + errmsg("parameter \"%s\" cannot be changed", name))); return false; } @@ -2432,7 +2428,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM), - errmsg("\"%s\" cannot be changed after server start", + errmsg("parameter \"%s\" cannot be changed after server start", name))); return false; } @@ -2442,7 +2438,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM), - errmsg("\"%s\" cannot be changed now", + errmsg("parameter \"%s\" cannot be changed now", name))); return false; } @@ -2472,7 +2468,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM), - errmsg("\"%s\" cannot be set after connection start", + errmsg("parameter \"%s\" cannot be set after connection start", name))); return false; } @@ -2482,7 +2478,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to set option \"%s\"", + errmsg("permission denied to set parameter \"%s\"", name))); return false; } @@ -2540,7 +2536,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("\"%s\" requires a boolean value", + errmsg("parameter \"%s\" requires a Boolean value", name))); return false; } @@ -2552,7 +2548,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to set option \"%s\"", + errmsg("permission denied to set parameter \"%s\"", name), errhint("Must be superuser to change this value to false."))); return false; @@ -2576,7 +2572,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for \"%s\": %d", + errmsg("invalid value for parameter \"%s\": %d", name, (int) newval))); return false; } @@ -2628,7 +2624,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("\"%s\" requires an integer value", + errmsg("parameter \"%s\" requires an integer value", name))); return false; } @@ -2636,7 +2632,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("%d is outside the valid range for \"%s\" (%d .. %d)", + errmsg("%d is outside the valid range for parameter \"%s\" (%d .. %d)", newval, name, conf->min, conf->max))); return false; } @@ -2649,7 +2645,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to set option \"%s\"", + errmsg("permission denied to set parameter \"%s\"", name), errhint("Must be superuser to increase this value or set it to zero."))); return false; @@ -2673,7 +2669,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for \"%s\": %d", + errmsg("invalid value for parameter \"%s\": %d", name, newval))); return false; } @@ -2725,7 +2721,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("\"%s\" requires a numeric value", + errmsg("parameter \"%s\" requires a numeric value", name))); return false; } @@ -2733,7 +2729,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("%g is outside the valid range for \"%s\" (%g .. %g)", + errmsg("%g is outside the valid range for parameter \"%s\" (%g .. %g)", newval, name, conf->min, conf->max))); return false; } @@ -2745,7 +2741,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to set option \"%s\"", + errmsg("permission denied to set parameter \"%s\"", name), errhint("Must be superuser to increase this value."))); return false; @@ -2769,7 +2765,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for \"%s\": %g", + errmsg("invalid value for parameter \"%s\": %g", name, newval))); return false; } @@ -2844,7 +2840,7 @@ set_config_option(const char *name, const char *value, { ereport(elevel, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), - errmsg("permission denied to set option \"%s\"", + errmsg("permission denied to set parameter \"%s\"", name), errhint("Must be superuser to increase this value."))); return false; @@ -2900,7 +2896,7 @@ set_config_option(const char *name, const char *value, free(newval); ereport(elevel, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), - errmsg("invalid value for \"%s\": \"%s\"", + errmsg("invalid value for parameter \"%s\": \"%s\"", name, value ? value : ""))); return false; } @@ -3006,7 +3002,7 @@ GetConfigOption(const char *name) if (record == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("\"%s\" is not a recognized option", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); switch (record->vartype) { @@ -3042,7 +3038,7 @@ GetConfigOptionResetString(const char *name) if (record == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("\"%s\" is not a recognized option", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); switch (record->vartype) { @@ -3098,7 +3094,7 @@ flatten_set_variable_args(const char *name, List *args) if (record == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("\"%s\" is not a recognized option", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); flags = record->flags; @@ -3211,7 +3207,7 @@ set_config_by_name(PG_FUNCTION_ARGS) if (PG_ARGISNULL(0)) ereport(ERROR, (errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED), - errmsg("SET variable name is required"))); + errmsg("SET requires parameter name"))); /* Get the GUC variable name */ name = DatumGetCString(DirectFunctionCall1(textout, PG_GETARG_DATUM(0))); @@ -3392,7 +3388,7 @@ GetConfigOptionByName(const char *name, const char **varname) if (record == NULL) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("\"%s\" is not a recognized option", name))); + errmsg("unrecognized configuration parameter \"%s\"", name))); if (varname) *varname = record->name; @@ -3768,8 +3764,7 @@ write_nondefault_variables(GucContext context) free(filename); ereport(elevel, (errcode_for_file_access(), - errmsg("could not write exec config params file \"" - CONFIG_EXEC_PARAMS "\": %m"))); + errmsg("could not write to file \"%s\": %m", CONFIG_EXEC_PARAMS))); return; } @@ -3904,8 +3899,7 @@ read_nondefault_variables(void) if (errno != ENOENT) ereport(FATAL, (errcode_for_file_access(), - errmsg("could not read exec config params file \"" - CONFIG_EXEC_PARAMS "\": %m"))); + errmsg("could not read from file \"%s\": %m", CONFIG_EXEC_PARAMS))); return; } @@ -4024,7 +4018,7 @@ ProcessGUCArray(ArrayType *array, GucSource source) { ereport(WARNING, (errcode(ERRCODE_SYNTAX_ERROR), - errmsg("could not parse setting for \"%s\"", name))); + errmsg("could not parse setting for parameter \"%s\"", name))); free(name); continue; } diff --git a/src/backend/utils/misc/help_config.c b/src/backend/utils/misc/help_config.c index b056a71a3b..c3f70b625f 100644 --- a/src/backend/utils/misc/help_config.c +++ b/src/backend/utils/misc/help_config.c @@ -25,7 +25,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/misc/help_config.c,v 1.5 2003/08/08 21:42:24 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/misc/help_config.c,v 1.6 2003/09/25 06:58:06 petere Exp $ * *------------------------------------------------------------------------- */ @@ -59,28 +59,28 @@ enum outputFormat }; static const char *const GENERIC_FORMAT[] = { - gettext_noop("Name : %-20s \nContext : %-20s \nGroup : %-20s\n"), - gettext_noop("%s\t%s\t%s\t") + gettext_noop("Name: %-20s\nContext: %-20s\nGroup: %-20s\n"), + "%s\t%s\t%s\t" }; static const char *const GENERIC_DESC[] = { gettext_noop("Description: %s\n%s\n"), - gettext_noop("%s %s\n") + "%s\t%s\n" }; static const char *const BOOL_FORMAT[] = { - gettext_noop("Type : BOOL\nReset Value: %-s \n"), - gettext_noop("BOOL\t%s\t\t\t") + gettext_noop("Type: Boolean\nReset value: %-s\n"), + "BOOL\t%s\t\t\t" }; static const char *const INT_FORMAT[] = { - gettext_noop("Type : INT\nReset Value: %-20d \nMin Value : %-20d \nMax Value : %-20d \n"), - gettext_noop("INT\t%d\t%d\t%d\t") + gettext_noop("Type: integer\nReset value: %-20d\nMin value: %-20d\nMax value: %-20d\n"), + "INT\t%d\t%d\t%d\t" }; static const char *const REAL_FORMAT[] = { - gettext_noop("Type : REAL\nReset Value: %-20g \nMin Value : %-20g \nMax Value : %-20g \n"), - gettext_noop("REAL\t%g\t%g\t%g\t") + gettext_noop("Type: real\nReset value: %-20g\nMin value: %-20g\nMax value: %-20g\n"), + "REAL\t%g\t%g\t%g\t" }; static const char *const STRING_FORMAT[] = { - gettext_noop("Type : STRING\nReset Value: %-s \n"), - gettext_noop("STRING\t%s\t\t\t") + gettext_noop("Type: string\nReset value: %-s\n"), + "STRING\t%s\t\t\t" }; static const char *const COLUMN_HEADER[] = { "", diff --git a/src/test/regress/expected/abstime.out b/src/test/regress/expected/abstime.out index b730046939..358902f28f 100644 --- a/src/test/regress/expected/abstime.out +++ b/src/test/regress/expected/abstime.out @@ -29,12 +29,12 @@ INSERT INTO ABSTIME_TBL (f1) VALUES (abstime 'May 10, 1947 23:59:12'); -- what happens if we specify slightly misformatted abstime? INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 35, 1946 10:00:00'); ERROR: date/time field value out of range: "Feb 35, 1946 10:00:00" -HINT: Perhaps you need a different DateStyle setting. +HINT: Perhaps you need a different "datestyle" setting. INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 28, 1984 25:08:10'); ERROR: date/time field value out of range: "Feb 28, 1984 25:08:10" -- badly formatted abstimes: these should result in invalid abstimes INSERT INTO ABSTIME_TBL (f1) VALUES ('bad date format'); -ERROR: invalid input syntax for abstime: "bad date format" +ERROR: invalid input syntax for type abstime: "bad date format" INSERT INTO ABSTIME_TBL (f1) VALUES ('Jun 10, 1843'); -- test abstime operators SELECT '' AS eight, ABSTIME_TBL.*; diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index 58425c9651..42b3e03f80 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -307,27 +307,27 @@ INSERT INTO tmp3 values (1,20); INSERT INTO tmp3 values (5,50); -- Try (and fail) to add constraint due to invalid source columns ALTER TABLE tmp3 add constraint tmpconstr foreign key(c) references tmp2 match full; -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks ERROR: column "c" referenced in foreign key constraint does not exist -- Try (and fail) to add constraint due to invalide destination columns explicitly given ALTER TABLE tmp3 add constraint tmpconstr foreign key(a) references tmp2(b) match full; -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks ERROR: column "b" referenced in foreign key constraint does not exist -- Try (and fail) to add constraint due to invalid data ALTER TABLE tmp3 add constraint tmpconstr foreign key (a) references tmp2 match full; -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) -ERROR: insert or update on "tmp3" violates foreign key constraint "tmpconstr" -DETAIL: Key (a)=(5) is not present in "tmp2". +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks +ERROR: insert or update on table "tmp3" violates foreign key constraint "tmpconstr" +DETAIL: Key (a)=(5) is not present in table "tmp2". -- Delete failing row DELETE FROM tmp3 where a=5; -- Try (and succeed) ALTER TABLE tmp3 add constraint tmpconstr foreign key (a) references tmp2 match full; -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks -- Try (and fail) to create constraint from tmp5(a) to tmp4(a) - unique constraint on -- tmp4 is a,b ALTER TABLE tmp5 add constraint tmpconstr foreign key(a) references tmp4(a) match full; -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) -ERROR: there is no UNIQUE constraint matching given keys for referenced table "tmp4" +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks +ERROR: there is no unique constraint matching given keys for referenced table "tmp4" DROP TABLE tmp5; DROP TABLE tmp4; DROP TABLE tmp3; @@ -340,24 +340,24 @@ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" fo CREATE TEMP TABLE FKTABLE (ftest1 inet); -- This next should fail, because inet=int does not exist ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable; -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- This should also fail for the same reason, but here we -- give the column name ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable(ptest1); -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- This should succeed, even though they are different types -- because varchar=int does exist DROP TABLE FKTABLE; CREATE TEMP TABLE FKTABLE (ftest1 varchar); ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable; -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks -- As should this ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable(ptest1); -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks DROP TABLE pktable cascade; NOTICE: drop cascades to constraint $2 on table fktable NOTICE: drop cascades to constraint $1 on table fktable @@ -368,31 +368,31 @@ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" fo -- This should fail, because we just chose really odd types CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 timestamp); ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable; -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: cidr = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. DROP TABLE FKTABLE; -- Again, so should this... CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 timestamp); ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable(ptest1, ptest2); -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: cidr = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. DROP TABLE FKTABLE; -- This fails because we mixed up the column ordering CREATE TEMP TABLE FKTABLE (ftest1 int, ftest2 inet); ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable(ptest2, ptest1); -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: integer = inet -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- As does this... ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest2, ftest1) references pktable(ptest1, ptest2); -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- temp tables should go away by themselves, need not drop them. -- test check constraint adding create table atacc1 ( test int ); @@ -400,7 +400,7 @@ create table atacc1 ( test int ); alter table atacc1 add constraint atacc_test1 check (test>3); -- should fail insert into atacc1 (test) values (2); -ERROR: new row for relation "atacc1" violates CHECK constraint "atacc_test1" +ERROR: new row for relation "atacc1" violates check constraint "atacc_test1" -- should succeed insert into atacc1 (test) values (4); drop table atacc1; @@ -410,14 +410,14 @@ create table atacc1 ( test int ); insert into atacc1 (test) values (2); -- add a check constraint (fails) alter table atacc1 add constraint atacc_test1 check (test>3); -ERROR: CHECK constraint "atacc_test1" is violated at some row(s) +ERROR: check constraint "atacc_test1" is violated by some row insert into atacc1 (test) values (4); drop table atacc1; -- let's do one where the check fails because the column doesn't exist create table atacc1 ( test int ); -- add a check constraint (fails) alter table atacc1 add constraint atacc_test1 check (test1>3); -ERROR: attribute "test1" not found +ERROR: column "test1" does not exist drop table atacc1; -- something a little more complicated create table atacc1 ( test int, test2 int, test3 int); @@ -425,7 +425,7 @@ create table atacc1 ( test int, test2 int, test3 int); alter table atacc1 add constraint atacc_test1 check (test+test23), test2 int); alter table atacc1 add check (test2>test); -- should fail for $2 insert into atacc1 (test2, test) values (3, 4); -ERROR: new row for relation "atacc1" violates CHECK constraint "$1" +ERROR: new row for relation "atacc1" violates check constraint "$1" drop table atacc1; -- inheritance related tests create table atacc1 (test int); @@ -443,11 +443,11 @@ create table atacc3 (test3 int) inherits (atacc1, atacc2); alter table atacc2 add constraint foo check (test2>0); -- fail and then succeed on atacc2 insert into atacc2 (test2) values (-3); -ERROR: new row for relation "atacc2" violates CHECK constraint "foo" +ERROR: new row for relation "atacc2" violates check constraint "foo" insert into atacc2 (test2) values (3); -- fail and then succeed on atacc3 insert into atacc3 (test2) values (-3); -ERROR: new row for relation "atacc3" violates CHECK constraint "foo" +ERROR: new row for relation "atacc3" violates check constraint "foo" insert into atacc3 (test2) values (3); drop table atacc3; drop table atacc2; @@ -459,7 +459,7 @@ create table atacc3 (test3 int) inherits (atacc1, atacc2); alter table only atacc2 add constraint foo check (test2>0); -- fail and then succeed on atacc2 insert into atacc2 (test2) values (-3); -ERROR: new row for relation "atacc2" violates CHECK constraint "foo" +ERROR: new row for relation "atacc2" violates check constraint "foo" insert into atacc2 (test2) values (3); -- both succeed on atacc3 insert into atacc3 (test2) values (-3); @@ -476,7 +476,7 @@ NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "atacc_test1" for t insert into atacc1 (test) values (2); -- should fail insert into atacc1 (test) values (2); -ERROR: duplicate key violates UNIQUE constraint "atacc_test1" +ERROR: duplicate key violates unique constraint "atacc_test1" -- should succeed insert into atacc1 (test) values (4); -- try adding a unique oid constraint @@ -511,7 +511,7 @@ NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "atacc_test1" for t insert into atacc1 (test,test2) values (4,4); -- should fail insert into atacc1 (test,test2) values (4,4); -ERROR: duplicate key violates UNIQUE constraint "atacc_test1" +ERROR: duplicate key violates unique constraint "atacc_test1" -- should all succeed insert into atacc1 (test,test2) values (4,5); insert into atacc1 (test,test2) values (5,4); @@ -525,7 +525,7 @@ NOTICE: ALTER TABLE / ADD UNIQUE will create implicit index "atacc1_test2_key" -- should fail for @@ second one @@ insert into atacc1 (test2, test) values (3, 3); insert into atacc1 (test2, test) values (2, 3); -ERROR: duplicate key violates UNIQUE constraint "atacc1_test_key" +ERROR: duplicate key violates unique constraint "atacc1_test_key" drop table atacc1; -- test primary key constraint adding create table atacc1 ( test int ); @@ -536,12 +536,12 @@ NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "atacc_test1" insert into atacc1 (test) values (2); -- should fail insert into atacc1 (test) values (2); -ERROR: duplicate key violates UNIQUE constraint "atacc_test1" +ERROR: duplicate key violates unique constraint "atacc_test1" -- should succeed insert into atacc1 (test) values (4); -- inserting NULL should fail insert into atacc1 (test) values(NULL); -ERROR: null value for attribute "test" violates NOT NULL constraint +ERROR: null value in column "test" violates not-null constraint -- try adding a second primary key (should fail) alter table atacc1 add constraint atacc_oid1 primary key(oid); ERROR: multiple primary keys for table "atacc1" are not allowed @@ -570,7 +570,7 @@ insert into atacc1 (test) values (NULL); -- add a primary key (fails) alter table atacc1 add constraint atacc_test1 primary key (test); NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "atacc_test1" for table "atacc1" -ERROR: attribute "test" contains NULL values +ERROR: column "test" contains null values insert into atacc1 (test) values (3); drop table atacc1; -- let's do one where the primary key constraint fails @@ -592,13 +592,13 @@ ERROR: multiple primary keys for table "atacc1" are not allowed insert into atacc1 (test,test2) values (4,4); -- should fail insert into atacc1 (test,test2) values (4,4); -ERROR: duplicate key violates UNIQUE constraint "atacc_test1" +ERROR: duplicate key violates unique constraint "atacc_test1" insert into atacc1 (test,test2) values (NULL,3); -ERROR: null value for attribute "test" violates NOT NULL constraint +ERROR: null value in column "test" violates not-null constraint insert into atacc1 (test,test2) values (3, NULL); -ERROR: null value for attribute "test2" violates NOT NULL constraint +ERROR: null value in column "test2" violates not-null constraint insert into atacc1 (test,test2) values (NULL,NULL); -ERROR: null value for attribute "test" violates NOT NULL constraint +ERROR: null value in column "test" violates not-null constraint -- should all succeed insert into atacc1 (test,test2) values (4,5); insert into atacc1 (test,test2) values (5,4); @@ -610,9 +610,9 @@ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "atacc1_pkey" for -- only first should succeed insert into atacc1 (test2, test) values (3, 3); insert into atacc1 (test2, test) values (2, 3); -ERROR: duplicate key violates UNIQUE constraint "atacc1_pkey" +ERROR: duplicate key violates unique constraint "atacc1_pkey" insert into atacc1 (test2, test) values (1, NULL); -ERROR: null value for attribute "test" violates NOT NULL constraint +ERROR: null value in column "test" violates not-null constraint drop table atacc1; -- alter table / alter column [set/drop] not null tests -- try altering system catalogs, should fail @@ -631,24 +631,24 @@ create table atacc1 (test int not null); alter table atacc1 add constraint "atacc1_pkey" primary key (test); NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "atacc1_pkey" for table "atacc1" alter table atacc1 alter column test drop not null; -ERROR: attribute "test" is in a primary key +ERROR: column "test" is in a primary key alter table atacc1 drop constraint "atacc1_pkey"; alter table atacc1 alter column test drop not null; insert into atacc1 values (null); alter table atacc1 alter test set not null; -ERROR: attribute "test" contains NULL values +ERROR: column "test" contains null values delete from atacc1; alter table atacc1 alter test set not null; -- try altering a non-existent column, should fail alter table atacc1 alter bar set not null; -ERROR: attribute "bar" of relation "atacc1" does not exist +ERROR: column "bar" of relation "atacc1" does not exist alter table atacc1 alter bar drop not null; -ERROR: attribute "bar" of relation "atacc1" does not exist +ERROR: column "bar" of relation "atacc1" does not exist -- try altering the oid column, should fail alter table atacc1 alter oid set not null; -ERROR: cannot alter system attribute "oid" +ERROR: cannot alter system column "oid" alter table atacc1 alter oid drop not null; -ERROR: cannot alter system attribute "oid" +ERROR: cannot alter system column "oid" -- try creating a view and altering that, should fail create view myview as select * from atacc1; alter table myview alter column test drop not null; @@ -662,27 +662,27 @@ create table parent (a int); create table child (b varchar(255)) inherits (parent); alter table parent alter a set not null; insert into parent values (NULL); -ERROR: null value for attribute "a" violates NOT NULL constraint +ERROR: null value in column "a" violates not-null constraint insert into child (a, b) values (NULL, 'foo'); -ERROR: null value for attribute "a" violates NOT NULL constraint +ERROR: null value in column "a" violates not-null constraint alter table parent alter a drop not null; insert into parent values (NULL); insert into child (a, b) values (NULL, 'foo'); alter table only parent alter a set not null; -ERROR: attribute "a" contains NULL values +ERROR: column "a" contains null values alter table child alter a set not null; -ERROR: attribute "a" contains NULL values +ERROR: column "a" contains null values delete from parent; alter table only parent alter a set not null; insert into parent values (NULL); -ERROR: null value for attribute "a" violates NOT NULL constraint +ERROR: null value in column "a" violates not-null constraint alter table child alter a set not null; insert into child (a, b) values (NULL, 'foo'); -ERROR: null value for attribute "a" violates NOT NULL constraint +ERROR: null value in column "a" violates not-null constraint delete from child; alter table child alter a set not null; insert into child (a, b) values (NULL, 'foo'); -ERROR: null value for attribute "a" violates NOT NULL constraint +ERROR: null value in column "a" violates not-null constraint drop table child; drop table parent; -- test setting and removing default values @@ -713,7 +713,7 @@ ERROR: invalid input syntax for integer: "wrong_datatype" alter table def_test alter column c2 set default 20; -- set defaults on a non-existent column: this should fail alter table def_test alter column c3 set default 30; -ERROR: attribute "c3" of relation "def_test" does not exist +ERROR: column "c3" of relation "def_test" does not exist -- set defaults on views: we need to create a view, add a rule -- to allow insertions into it, and then alter the view to add -- a default @@ -753,7 +753,7 @@ create table atacc1 (a int4 not null, b int4, c int4 not null, d int4); insert into atacc1 values (1, 2, 3, 4); alter table atacc1 drop a; alter table atacc1 drop a; -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist -- SELECTs select * from atacc1; b | c | d @@ -762,13 +762,13 @@ select * from atacc1; (1 row) select * from atacc1 order by a; -ERROR: attribute "a" not found +ERROR: column "a" does not exist select * from atacc1 order by "........pg.dropped.1........"; -ERROR: attribute "........pg.dropped.1........" not found +ERROR: column "........pg.dropped.1........" does not exist select * from atacc1 group by a; -ERROR: attribute "a" not found +ERROR: column "a" does not exist select * from atacc1 group by "........pg.dropped.1........"; -ERROR: attribute "........pg.dropped.1........" not found +ERROR: column "........pg.dropped.1........" does not exist select atacc1.* from atacc1; b | c | d ---+---+--- @@ -776,9 +776,9 @@ select atacc1.* from atacc1; (1 row) select a from atacc1; -ERROR: attribute "a" not found +ERROR: column "a" does not exist select atacc1.a from atacc1; -ERROR: no such attribute atacc1.a +ERROR: column atacc1.a does not exist select b,c,d from atacc1; b | c | d ---+---+--- @@ -786,26 +786,26 @@ select b,c,d from atacc1; (1 row) select a,b,c,d from atacc1; -ERROR: attribute "a" not found +ERROR: column "a" does not exist select * from atacc1 where a = 1; -ERROR: attribute "a" not found +ERROR: column "a" does not exist select "........pg.dropped.1........" from atacc1; -ERROR: attribute "........pg.dropped.1........" not found +ERROR: column "........pg.dropped.1........" does not exist select atacc1."........pg.dropped.1........" from atacc1; -ERROR: no such attribute atacc1.........pg.dropped.1........ +ERROR: column atacc1.........pg.dropped.1........ does not exist select "........pg.dropped.1........",b,c,d from atacc1; -ERROR: attribute "........pg.dropped.1........" not found +ERROR: column "........pg.dropped.1........" does not exist select * from atacc1 where "........pg.dropped.1........" = 1; -ERROR: attribute "........pg.dropped.1........" not found +ERROR: column "........pg.dropped.1........" does not exist -- UPDATEs update atacc1 set a = 3; -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist update atacc1 set b = 2 where a = 3; -ERROR: attribute "a" not found +ERROR: column "a" does not exist update atacc1 set "........pg.dropped.1........" = 3; -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist update atacc1 set b = 2 where "........pg.dropped.1........" = 3; -ERROR: attribute "........pg.dropped.1........" not found +ERROR: column "........pg.dropped.1........" does not exist -- INSERTs insert into atacc1 values (10, 11, 12, 13); ERROR: INSERT has more expressions than target columns @@ -813,34 +813,34 @@ insert into atacc1 values (default, 11, 12, 13); ERROR: INSERT has more expressions than target columns insert into atacc1 values (11, 12, 13); insert into atacc1 (a) values (10); -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist insert into atacc1 (a) values (default); -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist insert into atacc1 (a,b,c,d) values (10,11,12,13); -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist insert into atacc1 (a,b,c,d) values (default,11,12,13); -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist insert into atacc1 (b,c,d) values (11,12,13); insert into atacc1 ("........pg.dropped.1........") values (10); -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist insert into atacc1 ("........pg.dropped.1........") values (default); -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist insert into atacc1 ("........pg.dropped.1........",b,c,d) values (10,11,12,13); -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist insert into atacc1 ("........pg.dropped.1........",b,c,d) values (default,11,12,13); -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist -- DELETEs delete from atacc1 where a = 3; -ERROR: attribute "a" not found +ERROR: column "a" does not exist delete from atacc1 where "........pg.dropped.1........" = 3; -ERROR: attribute "........pg.dropped.1........" not found +ERROR: column "........pg.dropped.1........" does not exist delete from atacc1; -- try dropping a non-existent column, should fail alter table atacc1 drop bar; -ERROR: attribute "bar" of relation "atacc1" does not exist +ERROR: column "bar" of relation "atacc1" does not exist -- try dropping the oid column, should fail alter table atacc1 drop oid; -ERROR: cannot drop system attribute "oid" +ERROR: cannot drop system column "oid" -- try creating a view and altering that, should fail create view myview as select * from atacc1; select * from myview; @@ -853,45 +853,45 @@ ERROR: "myview" is not a table drop view myview; -- test some commands to make sure they fail on the dropped column analyze atacc1(a); -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist analyze atacc1("........pg.dropped.1........"); -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist vacuum analyze atacc1(a); -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist vacuum analyze atacc1("........pg.dropped.1........"); -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist comment on column atacc1.a is 'testing'; -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist comment on column atacc1."........pg.dropped.1........" is 'testing'; -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist alter table atacc1 alter a set storage plain; -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist alter table atacc1 alter "........pg.dropped.1........" set storage plain; -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist alter table atacc1 alter a set statistics 0; -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist alter table atacc1 alter "........pg.dropped.1........" set statistics 0; -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist alter table atacc1 alter a set default 3; -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist alter table atacc1 alter "........pg.dropped.1........" set default 3; -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist alter table atacc1 alter a drop default; -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist alter table atacc1 alter "........pg.dropped.1........" drop default; -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist alter table atacc1 alter a set not null; -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist alter table atacc1 alter "........pg.dropped.1........" set not null; -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist alter table atacc1 alter a drop not null; -ERROR: attribute "a" of relation "atacc1" does not exist +ERROR: column "a" of relation "atacc1" does not exist alter table atacc1 alter "........pg.dropped.1........" drop not null; -ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist +ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist alter table atacc1 rename a to x; -ERROR: attribute "a" does not exist +ERROR: column "a" does not exist alter table atacc1 rename "........pg.dropped.1........" to x; -ERROR: attribute "........pg.dropped.1........" does not exist +ERROR: column "........pg.dropped.1........" does not exist alter table atacc1 add primary key(a); ERROR: column "a" named in key does not exist alter table atacc1 add primary key("........pg.dropped.1........"); @@ -901,28 +901,28 @@ ERROR: column "a" named in key does not exist alter table atacc1 add unique("........pg.dropped.1........"); ERROR: column "........pg.dropped.1........" named in key does not exist alter table atacc1 add check (a > 3); -ERROR: attribute "a" not found +ERROR: column "a" does not exist alter table atacc1 add check ("........pg.dropped.1........" > 3); -ERROR: attribute "........pg.dropped.1........" not found +ERROR: column "........pg.dropped.1........" does not exist create table atacc2 (id int4 unique); NOTICE: CREATE TABLE / UNIQUE will create implicit index "atacc2_id_key" for table "atacc2" alter table atacc1 add foreign key (a) references atacc2(id); -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks ERROR: column "a" referenced in foreign key constraint does not exist alter table atacc1 add foreign key ("........pg.dropped.1........") references atacc2(id); -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks ERROR: column "........pg.dropped.1........" referenced in foreign key constraint does not exist alter table atacc2 add foreign key (id) references atacc1(a); -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks ERROR: column "a" referenced in foreign key constraint does not exist alter table atacc2 add foreign key (id) references atacc1("........pg.dropped.1........"); -NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks ERROR: column "........pg.dropped.1........" referenced in foreign key constraint does not exist drop table atacc2; create index "testing_idx" on atacc1(a); -ERROR: attribute "a" does not exist +ERROR: column "a" does not exist create index "testing_idx" on atacc1("........pg.dropped.1........"); -ERROR: attribute "........pg.dropped.1........" does not exist +ERROR: column "........pg.dropped.1........" does not exist -- test create as and select into insert into atacc1 values (21, 22, 23); create table test1 as select * from atacc1; @@ -993,9 +993,9 @@ alter table test drop a; copy test to stdout; 2 3 copy test(a) to stdout; -ERROR: attribute "a" of relation "test" does not exist +ERROR: column "a" of relation "test" does not exist copy test("........pg.dropped.1........") to stdout; -ERROR: attribute "........pg.dropped.1........" of relation "test" does not exist +ERROR: column "........pg.dropped.1........" of relation "test" does not exist copy test from stdin; ERROR: extra data after last expected column CONTEXT: COPY FROM, line 1 @@ -1014,9 +1014,9 @@ select * from test; (2 rows) copy test(a) from stdin; -ERROR: attribute "a" of relation "test" does not exist +ERROR: column "a" of relation "test" does not exist copy test("........pg.dropped.1........") from stdin; -ERROR: attribute "........pg.dropped.1........" of relation "test" does not exist +ERROR: column "........pg.dropped.1........" of relation "test" does not exist copy test(b,c) from stdin; select * from test; b | c @@ -1033,9 +1033,9 @@ create table dropColumnChild (c int) inherits (dropColumn); create table dropColumnAnother (d int) inherits (dropColumnChild); -- these two should fail alter table dropColumnchild drop column a; -ERROR: cannot drop inherited attribute "a" +ERROR: cannot drop inherited column "a" alter table only dropColumnChild drop column b; -ERROR: cannot drop inherited attribute "b" +ERROR: cannot drop inherited column "b" -- these three should work alter table only dropColumn drop column e; alter table dropColumnChild drop column c; @@ -1045,11 +1045,11 @@ create table renameColumnChild (b int) inherits (renameColumn); create table renameColumnAnother (c int) inherits (renameColumnChild); -- these three should fail alter table renameColumnChild rename column a to d; -ERROR: cannot rename inherited attribute "a" +ERROR: cannot rename inherited column "a" alter table only renameColumnChild rename column a to d; -ERROR: inherited attribute "a" must be renamed in child tables too +ERROR: inherited column "a" must be renamed in child tables too alter table only renameColumn rename column a to d; -ERROR: inherited attribute "a" must be renamed in child tables too +ERROR: inherited column "a" must be renamed in child tables too -- these should work alter table renameColumn rename column a to d; alter table renameColumnChild rename column b to a; @@ -1057,14 +1057,14 @@ alter table renameColumnChild rename column b to a; alter table renameColumn add column w int; -- this should fail alter table only renameColumn add column x int; -ERROR: attribute must be added to child tables too +ERROR: column must be added to child tables too -- Test corner cases in dropping of inherited columns create table p1 (f1 int, f2 int); create table c1 (f1 int not null) inherits(p1); -NOTICE: merging attribute "f1" with inherited definition +NOTICE: merging column "f1" with inherited definition -- should be rejected since c1.f1 is inherited alter table c1 drop column f1; -ERROR: cannot drop inherited attribute "f1" +ERROR: cannot drop inherited column "f1" -- should work alter table p1 drop column f1; -- c1.f1 is still there, but no longer inherited @@ -1075,25 +1075,25 @@ select f1 from c1; alter table c1 drop column f1; select f1 from c1; -ERROR: attribute "f1" not found +ERROR: column "f1" does not exist drop table p1 cascade; NOTICE: drop cascades to table c1 create table p1 (f1 int, f2 int); create table c1 () inherits(p1); -- should be rejected since c1.f1 is inherited alter table c1 drop column f1; -ERROR: cannot drop inherited attribute "f1" +ERROR: cannot drop inherited column "f1" alter table p1 drop column f1; -- c1.f1 is dropped now, since there is no local definition for it select f1 from c1; -ERROR: attribute "f1" not found +ERROR: column "f1" does not exist drop table p1 cascade; NOTICE: drop cascades to table c1 create table p1 (f1 int, f2 int); create table c1 () inherits(p1); -- should be rejected since c1.f1 is inherited alter table c1 drop column f1; -ERROR: cannot drop inherited attribute "f1" +ERROR: cannot drop inherited column "f1" alter table only p1 drop column f1; -- c1.f1 is NOT dropped, but must now be considered non-inherited alter table c1 drop column f1; @@ -1101,10 +1101,10 @@ drop table p1 cascade; NOTICE: drop cascades to table c1 create table p1 (f1 int, f2 int); create table c1 (f1 int not null) inherits(p1); -NOTICE: merging attribute "f1" with inherited definition +NOTICE: merging column "f1" with inherited definition -- should be rejected since c1.f1 is inherited alter table c1 drop column f1; -ERROR: cannot drop inherited attribute "f1" +ERROR: cannot drop inherited column "f1" alter table only p1 drop column f1; -- c1.f1 is still there, but no longer inherited alter table c1 drop column f1; @@ -1113,7 +1113,7 @@ NOTICE: drop cascades to table c1 create table p1(id int, name text); create table p2(id2 int, name text, height int); create table c1(age int) inherits(p1,p2); -NOTICE: merging multiple inherited definitions of attribute "name" +NOTICE: merging multiple inherited definitions of column "name" create table gc1() inherits (c1); select relname, attname, attinhcount, attislocal from pg_class join pg_attribute on (pg_class.oid = pg_attribute.attrelid) @@ -1144,12 +1144,12 @@ alter table only p1 drop column name; alter table p2 drop column name; -- should be rejected since its inherited alter table gc1 drop column name; -ERROR: cannot drop inherited attribute "name" +ERROR: cannot drop inherited column "name" -- should work, and drop gc1.name along alter table c1 drop column name; -- should fail: column does not exist alter table gc1 drop column name; -ERROR: attribute "name" of relation "gc1" does not exist +ERROR: column "name" of relation "gc1" does not exist -- should work and drop the attribute in all tables alter table p2 drop column height; select relname, attname, attinhcount, attislocal @@ -1184,7 +1184,7 @@ select oid > 0, * from altstartwith; alter table altstartwith set without oids; select oid > 0, * from altstartwith; -- fails -ERROR: attribute "oid" not found +ERROR: column "oid" does not exist select * from altstartwith; col ----- @@ -1211,9 +1211,9 @@ select oid > 0, * from altinhoid; alter table altwithoid set without oids; alter table altinhoid set without oids; select oid > 0, * from altwithoid; -- fails -ERROR: attribute "oid" not found +ERROR: column "oid" does not exist select oid > 0, * from altinhoid; -- fails -ERROR: attribute "oid" not found +ERROR: column "oid" does not exist select * from altwithoid; col ----- @@ -1234,7 +1234,7 @@ alter table p1 add column f2 text; NOTICE: merging definition of column "f2" for child "c1" insert into p1 values (1,2,'abc'); insert into c1 values(11,'xyz',33,0); -- should fail -ERROR: new row for relation "c1" violates CHECK constraint "p1_a1" +ERROR: new row for relation "c1" violates check constraint "p1_a1" insert into c1 values(11,'xyz',33,22); select * from p1; f1 | a1 | f2 diff --git a/src/test/regress/expected/arrays.out b/src/test/regress/expected/arrays.out index 219ac02629..6f3c07cfb3 100644 --- a/src/test/regress/expected/arrays.out +++ b/src/test/regress/expected/arrays.out @@ -363,7 +363,7 @@ insert into arr_tbl values ('{1,2,3}'); insert into arr_tbl values ('{1,2}'); -- failure expected: insert into arr_tbl values ('{1,2,3}'); -ERROR: duplicate key violates UNIQUE constraint "arr_tbl_f1_key" +ERROR: duplicate key violates unique constraint "arr_tbl_f1_key" insert into arr_tbl values ('{2,3,4}'); insert into arr_tbl values ('{1,5,3}'); insert into arr_tbl values ('{1,2,10}'); diff --git a/src/test/regress/expected/boolean.out b/src/test/regress/expected/boolean.out index 9430cf1ab3..06f2fac16b 100644 --- a/src/test/regress/expected/boolean.out +++ b/src/test/regress/expected/boolean.out @@ -112,7 +112,7 @@ INSERT INTO BOOLTBL2 (f1) VALUES (bool 'FALSE'); -- For pre-v6.3 this evaluated to false - thomas 1997-10-23 INSERT INTO BOOLTBL2 (f1) VALUES (bool 'XXX'); -ERROR: invalid input syntax for boolean: "XXX" +ERROR: invalid input syntax for type boolean: "XXX" -- BOOLTBL2 should be full of false's at this point SELECT '' AS f_4, BOOLTBL2.*; f_4 | f1 diff --git a/src/test/regress/expected/box.out b/src/test/regress/expected/box.out index 6978e7b6c3..edde87f315 100644 --- a/src/test/regress/expected/box.out +++ b/src/test/regress/expected/box.out @@ -24,9 +24,9 @@ INSERT INTO BOX_TBL (f1) VALUES ('(2.5, 2.5, 2.5,3.5)'); INSERT INTO BOX_TBL (f1) VALUES ('(3.0, 3.0,3.0,3.0)'); -- badly formatted box inputs INSERT INTO BOX_TBL (f1) VALUES ('(2.3, 4.5)'); -ERROR: invalid input syntax for box: "(2.3, 4.5)" +ERROR: invalid input syntax for type box: "(2.3, 4.5)" INSERT INTO BOX_TBL (f1) VALUES ('asdfasdf(ad'); -ERROR: invalid input syntax for box: "asdfasdf(ad" +ERROR: invalid input syntax for type box: "asdfasdf(ad" SELECT '' AS four, BOX_TBL.*; four | f1 ------+--------------------- diff --git a/src/test/regress/expected/circle.out b/src/test/regress/expected/circle.out index d8713dc53d..0f8cf741e8 100644 --- a/src/test/regress/expected/circle.out +++ b/src/test/regress/expected/circle.out @@ -10,11 +10,11 @@ INSERT INTO CIRCLE_TBL VALUES ('<(100,200),10>'); INSERT INTO CIRCLE_TBL VALUES ('<(100,1),115>'); -- bad values INSERT INTO CIRCLE_TBL VALUES ('<(-100,0),-100>'); -ERROR: invalid input syntax for circle: "<(-100,0),-100>" +ERROR: invalid input syntax for type circle: "<(-100,0),-100>" INSERT INTO CIRCLE_TBL VALUES ('1abc,3,5'); -ERROR: invalid input syntax for circle: "1abc,3,5" +ERROR: invalid input syntax for type circle: "1abc,3,5" INSERT INTO CIRCLE_TBL VALUES ('(3,(1,2),3)'); -ERROR: invalid input syntax for circle: "(3,(1,2),3)" +ERROR: invalid input syntax for type circle: "(3,(1,2),3)" SELECT * FROM CIRCLE_TBL; f1 ---------------- diff --git a/src/test/regress/expected/cluster.out b/src/test/regress/expected/cluster.out index 9a28df62d1..1c44fa59c2 100644 --- a/src/test/regress/expected/cluster.out +++ b/src/test/regress/expected/cluster.out @@ -3,16 +3,16 @@ -- CREATE TABLE clstr_tst_s (rf_a SERIAL PRIMARY KEY, b INT); -NOTICE: CREATE TABLE will create implicit sequence "clstr_tst_s_rf_a_seq" for SERIAL column "clstr_tst_s.rf_a" +NOTICE: CREATE TABLE will create implicit sequence "clstr_tst_s_rf_a_seq" for "serial" column "clstr_tst_s.rf_a" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_tst_s_pkey" for table "clstr_tst_s" CREATE TABLE clstr_tst (a SERIAL PRIMARY KEY, b INT, c TEXT, d TEXT, CONSTRAINT clstr_tst_con FOREIGN KEY (b) REFERENCES clstr_tst_s); -NOTICE: CREATE TABLE will create implicit sequence "clstr_tst_a_seq" for SERIAL column "clstr_tst.a" +NOTICE: CREATE TABLE will create implicit sequence "clstr_tst_a_seq" for "serial" column "clstr_tst.a" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_tst_pkey" for table "clstr_tst" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks CREATE INDEX clstr_tst_b ON clstr_tst (b); CREATE INDEX clstr_tst_c ON clstr_tst (c); CREATE INDEX clstr_tst_c_b ON clstr_tst (c,b); @@ -248,8 +248,8 @@ SELECT a,b,c,substring(d for 30), length(d) from clstr_tst; -- Verify that foreign key link still works INSERT INTO clstr_tst (b, c) VALUES (1111, 'this should fail'); -ERROR: insert or update on "clstr_tst" violates foreign key constraint "clstr_tst_con" -DETAIL: Key (b)=(1111) is not present in "clstr_tst_s". +ERROR: insert or update on table "clstr_tst" violates foreign key constraint "clstr_tst_con" +DETAIL: Key (b)=(1111) is not present in table "clstr_tst_s". SELECT conname FROM pg_constraint WHERE conrelid = 'clstr_tst'::regclass; conname ---------------- diff --git a/src/test/regress/expected/copy2.out b/src/test/regress/expected/copy2.out index 8357574f95..a6e9ae27e2 100644 --- a/src/test/regress/expected/copy2.out +++ b/src/test/regress/expected/copy2.out @@ -5,7 +5,7 @@ CREATE TABLE x ( d text not null, e text ); -NOTICE: CREATE TABLE will create implicit sequence "x_a_seq" for SERIAL column "x.a" +NOTICE: CREATE TABLE will create implicit sequence "x_a_seq" for "serial" column "x.a" CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS ' BEGIN NEW.e := ''before trigger fired''::text; @@ -28,10 +28,10 @@ COPY x (b, d) from stdin; COPY x (a, b, c, d, e) from stdin; -- non-existent column in column list: should fail COPY x (xyz) from stdin; -ERROR: attribute "xyz" of relation "x" does not exist +ERROR: column "xyz" of relation "x" does not exist -- too many columns in column list: should fail COPY x (a, b, c, d, e, d, c) from stdin; -ERROR: attribute "d" specified more than once +ERROR: column "d" specified more than once -- missing data: should fail COPY x from stdin; ERROR: invalid input syntax for integer: "" diff --git a/src/test/regress/expected/create_index.out b/src/test/regress/expected/create_index.out index 67a777e9d0..464ab8d7e8 100644 --- a/src/test/regress/expected/create_index.out +++ b/src/test/regress/expected/create_index.out @@ -78,7 +78,7 @@ INSERT INTO func_index_heap VALUES('AB','CDEFG'); INSERT INTO func_index_heap VALUES('QWE','RTY'); -- this should fail because of unique index: INSERT INTO func_index_heap VALUES('ABCD', 'EF'); -ERROR: duplicate key violates UNIQUE constraint "func_index_index" +ERROR: duplicate key violates unique constraint "func_index_index" -- but this shouldn't: INSERT INTO func_index_heap VALUES('QWERTY'); -- @@ -92,7 +92,7 @@ INSERT INTO func_index_heap VALUES('AB','CDEFG'); INSERT INTO func_index_heap VALUES('QWE','RTY'); -- this should fail because of unique index: INSERT INTO func_index_heap VALUES('ABCD', 'EF'); -ERROR: duplicate key violates UNIQUE constraint "func_index_index" +ERROR: duplicate key violates unique constraint "func_index_index" -- but this shouldn't: INSERT INTO func_index_heap VALUES('QWERTY'); -- diff --git a/src/test/regress/expected/create_table.out b/src/test/regress/expected/create_table.out index 5fb38f5e29..0da19d757d 100644 --- a/src/test/regress/expected/create_table.out +++ b/src/test/regress/expected/create_table.out @@ -81,9 +81,9 @@ CREATE TABLE student ( CREATE TABLE stud_emp ( percent int4 ) INHERITS (emp, student); -NOTICE: merging multiple inherited definitions of attribute "name" -NOTICE: merging multiple inherited definitions of attribute "age" -NOTICE: merging multiple inherited definitions of attribute "location" +NOTICE: merging multiple inherited definitions of column "name" +NOTICE: merging multiple inherited definitions of column "age" +NOTICE: merging multiple inherited definitions of column "location" CREATE TABLE city ( name name, location box, @@ -135,8 +135,8 @@ CREATE TABLE c_star ( CREATE TABLE d_star ( d float8 ) INHERITS (b_star, c_star); -NOTICE: merging multiple inherited definitions of attribute "class" -NOTICE: merging multiple inherited definitions of attribute "a" +NOTICE: merging multiple inherited definitions of column "class" +NOTICE: merging multiple inherited definitions of column "a" CREATE TABLE e_star ( e int2 ) INHERITS (c_star); diff --git a/src/test/regress/expected/domain.out b/src/test/regress/expected/domain.out index bc2279b92b..0a6fc81c55 100644 --- a/src/test/regress/expected/domain.out +++ b/src/test/regress/expected/domain.out @@ -111,26 +111,26 @@ create table nulltest , col5 dcheck CHECK (col5 IN ('c', 'd')) ); INSERT INTO nulltest DEFAULT VALUES; -ERROR: domain dnotnull does not allow NULL values +ERROR: domain dnotnull does not allow null values INSERT INTO nulltest values ('a', 'b', 'c', 'd', 'c'); -- Good insert into nulltest values ('a', 'b', 'c', 'd', NULL); -ERROR: domain dcheck does not allow NULL values +ERROR: domain dcheck does not allow null values insert into nulltest values ('a', 'b', 'c', 'd', 'a'); -ERROR: new row for relation "nulltest" violates CHECK constraint "nulltest_col5" +ERROR: new row for relation "nulltest" violates check constraint "nulltest_col5" INSERT INTO nulltest values (NULL, 'b', 'c', 'd', 'd'); -ERROR: domain dnotnull does not allow NULL values +ERROR: domain dnotnull does not allow null values INSERT INTO nulltest values ('a', NULL, 'c', 'd', 'c'); -ERROR: domain dnotnull does not allow NULL values +ERROR: domain dnotnull does not allow null values INSERT INTO nulltest values ('a', 'b', NULL, 'd', 'c'); -ERROR: null value for attribute "col3" violates NOT NULL constraint +ERROR: null value in column "col3" violates not-null constraint INSERT INTO nulltest values ('a', 'b', 'c', NULL, 'd'); -- Good -- Test copy COPY nulltest FROM stdin; --fail -ERROR: domain dcheck does not allow NULL values +ERROR: domain dcheck does not allow null values CONTEXT: COPY FROM, line 1 -- Last row is bad COPY nulltest FROM stdin; -ERROR: new row for relation "nulltest" violates CHECK constraint "nulltest_col5" +ERROR: new row for relation "nulltest" violates check constraint "nulltest_col5" CONTEXT: COPY FROM, line 3 select * from nulltest; col1 | col2 | col3 | col4 | col5 @@ -147,11 +147,11 @@ SELECT cast('1' as dnotnull); (1 row) SELECT cast(NULL as dnotnull); -- fail -ERROR: domain dnotnull does not allow NULL values +ERROR: domain dnotnull does not allow null values SELECT cast(cast(NULL as dnull) as dnotnull); -- fail -ERROR: domain dnotnull does not allow NULL values +ERROR: domain dnotnull does not allow null values SELECT cast(col4 as dnotnull) from nulltest; -- fail -ERROR: domain dnotnull does not allow NULL values +ERROR: domain dnotnull does not allow null values -- cleanup drop table nulltest; drop domain dnotnull restrict; @@ -199,14 +199,14 @@ create table domnotnull ); insert into domnotnull default values; alter domain dnotnulltest set not null; -- fails -ERROR: relation "domnotnull" attribute "col1" contains NULL values +ERROR: column "col1" of table "domnotnull" contains null values update domnotnull set col1 = 5; alter domain dnotnulltest set not null; -- fails -ERROR: relation "domnotnull" attribute "col2" contains NULL values +ERROR: column "col2" of table "domnotnull" contains null values update domnotnull set col2 = 6; alter domain dnotnulltest set not null; update domnotnull set col1 = null; -- fails -ERROR: domain dnotnulltest does not allow NULL values +ERROR: domain dnotnulltest does not allow null values alter domain dnotnulltest drop not null; update domnotnull set col1 = null; drop domain dnotnulltest cascade; @@ -247,17 +247,17 @@ create table domcontest (col1 con); insert into domcontest values (1); insert into domcontest values (2); alter domain con add constraint t check (VALUE < 1); -- fails -ERROR: relation "domcontest" attribute "col1" contains values that violate the new constraint +ERROR: relation "domcontest" column "col1" contains values that violate the new constraint alter domain con add constraint t check (VALUE < 34); alter domain con add check (VALUE > 0); insert into domcontest values (-5); -- fails -ERROR: value for domain con violates CHECK constraint "$1" +ERROR: value for domain con violates check constraint "$1" insert into domcontest values (42); -- fails -ERROR: value for domain con violates CHECK constraint "t" +ERROR: value for domain con violates check constraint "t" insert into domcontest values (5); alter domain con drop constraint t; insert into domcontest values (-5); --fails -ERROR: value for domain con violates CHECK constraint "$1" +ERROR: value for domain con violates check constraint "$1" insert into domcontest values (42); -- Confirm ALTER DOMAIN with RULES. create table domtab (col1 integer); @@ -274,7 +274,7 @@ select * from domview; alter domain dom set not null; select * from domview; -- fail -ERROR: domain dom does not allow NULL values +ERROR: domain dom does not allow null values alter domain dom drop not null; select * from domview; col1 @@ -285,7 +285,7 @@ select * from domview; alter domain dom add constraint domchkgt6 check(value > 6); select * from domview; --fail -ERROR: value for domain dom violates CHECK constraint "domchkgt6" +ERROR: value for domain dom violates check constraint "domchkgt6" alter domain dom drop constraint domchkgt6 restrict; select * from domview; col1 diff --git a/src/test/regress/expected/errors.out b/src/test/regress/expected/errors.out index 936001de51..0d9b5a55ee 100644 --- a/src/test/regress/expected/errors.out +++ b/src/test/regress/expected/errors.out @@ -31,19 +31,19 @@ select from pg_database; ERROR: syntax error at or near "from" at character 8 -- bad name in target list select nonesuch from pg_database; -ERROR: attribute "nonesuch" not found +ERROR: column "nonesuch" does not exist -- bad attribute name on lhs of operator select * from pg_database where nonesuch = pg_database.datname; -ERROR: attribute "nonesuch" not found +ERROR: column "nonesuch" does not exist -- bad attribute name on rhs of operator select * from pg_database where pg_database.datname = nonesuch; -ERROR: attribute "nonesuch" not found +ERROR: column "nonesuch" does not exist -- bad select distinct on syntax, distinct attribute missing select distinct on (foobar) from pg_database; ERROR: syntax error at or near "from" at character 29 -- bad select distinct on syntax, distinct attribute not in target list select distinct on (foobar) * from pg_database; -ERROR: attribute "foobar" not found +ERROR: column "foobar" does not exist -- -- DELETE @@ -87,13 +87,13 @@ alter table nonesuchrel rename column nonesuchatt to newnonesuchatt; ERROR: relation "nonesuchrel" does not exist -- no such attribute alter table emp rename column nonesuchatt to newnonesuchatt; -ERROR: attribute "nonesuchatt" does not exist +ERROR: column "nonesuchatt" does not exist -- conflict alter table emp rename column salary to manager; -ERROR: attribute "manager" of relation "stud_emp" already exists +ERROR: column "manager" of relation "stud_emp" already exists -- conflict alter table emp rename column salary to oid; -ERROR: attribute "oid" of relation "stud_emp" already exists +ERROR: column "oid" of relation "stud_emp" already exists -- -- TRANSACTION STUFF diff --git a/src/test/regress/expected/float4.out b/src/test/regress/expected/float4.out index a1c1c57c46..118a3fb66c 100644 --- a/src/test/regress/expected/float4.out +++ b/src/test/regress/expected/float4.out @@ -9,13 +9,13 @@ INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e+20'); INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e-20'); -- test for over and under flow INSERT INTO FLOAT4_TBL(f1) VALUES ('10e40'); -ERROR: float4 value out of range: overflow +ERROR: type "real" value out of range: overflow INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e40'); -ERROR: float4 value out of range: overflow +ERROR: type "real" value out of range: overflow INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-40'); -ERROR: float4 value out of range: underflow +ERROR: type "real" value out of range: underflow INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-40'); -ERROR: float4 value out of range: underflow +ERROR: type "real" value out of range: underflow SELECT '' AS five, FLOAT4_TBL.*; five | f1 ------+------------- diff --git a/src/test/regress/expected/float8.out b/src/test/regress/expected/float8.out index c1e9f53ee3..3d8bc7710b 100644 --- a/src/test/regress/expected/float8.out +++ b/src/test/regress/expected/float8.out @@ -247,13 +247,13 @@ UPDATE FLOAT8_TBL SET f1 = FLOAT8_TBL.f1 * '-1' WHERE FLOAT8_TBL.f1 > '0.0'; SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f; -ERROR: float8 value out of range: overflow +ERROR: type "double precision" value out of range: overflow SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f; ERROR: result is out of range SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ; -ERROR: cannot take log of zero +ERROR: cannot take logarithm of zero SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ; -ERROR: cannot take log of a negative number +ERROR: cannot take logarithm of a negative number SELECT '' AS bad, exp(f.f1) from FLOAT8_TBL f; ERROR: result is out of range SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f; @@ -270,13 +270,13 @@ SELECT '' AS five, FLOAT8_TBL.*; -- test for over- and underflow INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400'); -ERROR: "10e400" is out of range for float8 +ERROR: "10e400" is out of range for type double precision INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400'); -ERROR: "-10e400" is out of range for float8 +ERROR: "-10e400" is out of range for type double precision INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400'); -ERROR: "10e-400" is out of range for float8 +ERROR: "10e-400" is out of range for type double precision INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400'); -ERROR: "-10e-400" is out of range for float8 +ERROR: "-10e-400" is out of range for type double precision -- maintain external table consistency across platforms -- delete all values and reinsert well-behaved ones DELETE FROM FLOAT8_TBL; diff --git a/src/test/regress/expected/foreign_key.out b/src/test/regress/expected/foreign_key.out index cde52f46e0..bac69c90f8 100644 --- a/src/test/regress/expected/foreign_key.out +++ b/src/test/regress/expected/foreign_key.out @@ -8,7 +8,7 @@ CREATE TABLE PKTABLE ( ptest1 int PRIMARY KEY, ptest2 text ); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" CREATE TABLE FKTABLE ( ftest1 int REFERENCES PKTABLE MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE, ftest2 int ); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks -- Insert test data into PKTABLE INSERT INTO PKTABLE VALUES (1, 'Test1'); INSERT INTO PKTABLE VALUES (2, 'Test2'); @@ -22,8 +22,8 @@ INSERT INTO FKTABLE VALUES (3, 4); INSERT INTO FKTABLE VALUES (NULL, 1); -- Insert a failed row into FK TABLE INSERT INTO FKTABLE VALUES (100, 2); -ERROR: insert or update on "fktable" violates foreign key constraint "$1" -DETAIL: Key (ftest1)=(100) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "$1" +DETAIL: Key (ftest1)=(100) is not present in table "pktable". -- Check FKTABLE SELECT * FROM FKTABLE; ftest1 | ftest2 @@ -65,7 +65,7 @@ CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 text, PRIMARY KEY(ptest1, NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, CONSTRAINT constrname FOREIGN KEY(ftest1, ftest2) REFERENCES PKTABLE MATCH FULL ON DELETE SET NULL ON UPDATE SET NULL); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks -- Insert test data into PKTABLE INSERT INTO PKTABLE VALUES (1, 2, 'Test1'); INSERT INTO PKTABLE VALUES (1, 3, 'Test1-2'); @@ -81,17 +81,17 @@ INSERT INTO FKTABLE VALUES (3, 6, 12); INSERT INTO FKTABLE VALUES (NULL, NULL, 0); -- Insert failed rows into FK TABLE INSERT INTO FKTABLE VALUES (100, 2, 4); -ERROR: insert or update on "fktable" violates foreign key constraint "constrname" -DETAIL: Key (ftest1,ftest2)=(100,2) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname" +DETAIL: Key (ftest1,ftest2)=(100,2) is not present in table "pktable". INSERT INTO FKTABLE VALUES (2, 2, 4); -ERROR: insert or update on "fktable" violates foreign key constraint "constrname" -DETAIL: Key (ftest1,ftest2)=(2,2) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname" +DETAIL: Key (ftest1,ftest2)=(2,2) is not present in table "pktable". INSERT INTO FKTABLE VALUES (NULL, 2, 4); -ERROR: insert or update on "fktable" violates foreign key constraint "constrname" -DETAIL: MATCH FULL does not allow mixing of NULL and non-NULL key values. +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname" +DETAIL: MATCH FULL does not allow mixing of null and nonnull key values. INSERT INTO FKTABLE VALUES (1, NULL, 4); -ERROR: insert or update on "fktable" violates foreign key constraint "constrname" -DETAIL: MATCH FULL does not allow mixing of NULL and non-NULL key values. +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname" +DETAIL: MATCH FULL does not allow mixing of null and nonnull key values. -- Check FKTABLE SELECT * FROM FKTABLE; ftest1 | ftest2 | ftest3 @@ -152,7 +152,7 @@ CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 text, PRIMARY KEY(ptest1, NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" CREATE TABLE FKTABLE ( ftest1 int DEFAULT -1, ftest2 int DEFAULT -2, ftest3 int, CONSTRAINT constrname2 FOREIGN KEY(ftest1, ftest2) REFERENCES PKTABLE MATCH FULL ON DELETE SET DEFAULT ON UPDATE SET DEFAULT); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks -- Insert a value in PKTABLE for default INSERT INTO PKTABLE VALUES (-1, -2, 'The Default!'); -- Insert test data into PKTABLE @@ -170,17 +170,17 @@ INSERT INTO FKTABLE VALUES (3, 6, 12); INSERT INTO FKTABLE VALUES (NULL, NULL, 0); -- Insert failed rows into FK TABLE INSERT INTO FKTABLE VALUES (100, 2, 4); -ERROR: insert or update on "fktable" violates foreign key constraint "constrname2" -DETAIL: Key (ftest1,ftest2)=(100,2) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname2" +DETAIL: Key (ftest1,ftest2)=(100,2) is not present in table "pktable". INSERT INTO FKTABLE VALUES (2, 2, 4); -ERROR: insert or update on "fktable" violates foreign key constraint "constrname2" -DETAIL: Key (ftest1,ftest2)=(2,2) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname2" +DETAIL: Key (ftest1,ftest2)=(2,2) is not present in table "pktable". INSERT INTO FKTABLE VALUES (NULL, 2, 4); -ERROR: insert or update on "fktable" violates foreign key constraint "constrname2" -DETAIL: MATCH FULL does not allow mixing of NULL and non-NULL key values. +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname2" +DETAIL: MATCH FULL does not allow mixing of null and nonnull key values. INSERT INTO FKTABLE VALUES (1, NULL, 4); -ERROR: insert or update on "fktable" violates foreign key constraint "constrname2" -DETAIL: MATCH FULL does not allow mixing of NULL and non-NULL key values. +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname2" +DETAIL: MATCH FULL does not allow mixing of null and nonnull key values. -- Check FKTABLE SELECT * FROM FKTABLE; ftest1 | ftest2 | ftest3 @@ -245,7 +245,7 @@ DROP TABLE FKTABLE; CREATE TABLE PKTABLE ( ptest1 int PRIMARY KEY, ptest2 text ); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" CREATE TABLE FKTABLE ( ftest1 int REFERENCES PKTABLE MATCH FULL, ftest2 int ); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks -- Insert test data into PKTABLE INSERT INTO PKTABLE VALUES (1, 'Test1'); INSERT INTO PKTABLE VALUES (2, 'Test2'); @@ -259,8 +259,8 @@ INSERT INTO FKTABLE VALUES (3, 4); INSERT INTO FKTABLE VALUES (NULL, 1); -- Insert a failed row into FK TABLE INSERT INTO FKTABLE VALUES (100, 2); -ERROR: insert or update on "fktable" violates foreign key constraint "$1" -DETAIL: Key (ftest1)=(100) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "$1" +DETAIL: Key (ftest1)=(100) is not present in table "pktable". -- Check FKTABLE SELECT * FROM FKTABLE; ftest1 | ftest2 @@ -285,7 +285,7 @@ SELECT * FROM PKTABLE; -- Delete a row from PK TABLE (should fail) DELETE FROM PKTABLE WHERE ptest1=1; ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "fktable" -DETAIL: Key (ptest1)=(1) is still referenced from "fktable". +DETAIL: Key (ptest1)=(1) is still referenced from table "fktable". -- Delete a row from PK TABLE (should succeed) DELETE FROM PKTABLE WHERE ptest1=5; -- Check PKTABLE for deletes @@ -301,7 +301,7 @@ SELECT * FROM PKTABLE; -- Update a row from PK TABLE (should fail) UPDATE PKTABLE SET ptest1=0 WHERE ptest1=2; ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "fktable" -DETAIL: Key (ptest1)=(2) is still referenced from "fktable". +DETAIL: Key (ptest1)=(2) is still referenced from table "fktable". -- Update a row from PK TABLE (should succeed) UPDATE PKTABLE SET ptest1=0 WHERE ptest1=4; -- Check PKTABLE for updates @@ -322,7 +322,7 @@ CREATE TABLE PKTABLE ( ptest1 int, ptest2 int, ptest3 int, ptest4 text, PRIMARY NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, ftest4 int, CONSTRAINT constrname3 FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks -- Insert Primary Key values INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1'); INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2'); @@ -336,8 +336,8 @@ INSERT INTO FKTABLE VALUES (NULL, 2, 7, 4); INSERT INTO FKTABLE VALUES (NULL, 3, 4, 5); -- Insert a failed values INSERT INTO FKTABLE VALUES (1, 2, 7, 6); -ERROR: insert or update on "fktable" violates foreign key constraint "constrname3" -DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3" +DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in table "pktable". -- Show FKTABLE SELECT * from FKTABLE; ftest1 | ftest2 | ftest3 | ftest4 @@ -352,13 +352,13 @@ SELECT * from FKTABLE; -- Try to update something that should fail UPDATE PKTABLE set ptest2=5 where ptest2=2; ERROR: update or delete on "pktable" violates foreign key constraint "constrname3" on "fktable" -DETAIL: Key (ptest1,ptest2,ptest3)=(1,2,3) is still referenced from "fktable". +DETAIL: Key (ptest1,ptest2,ptest3)=(1,2,3) is still referenced from table "fktable". -- Try to update something that should succeed UPDATE PKTABLE set ptest1=1 WHERE ptest2=3; -- Try to delete something that should fail DELETE FROM PKTABLE where ptest1=1 and ptest2=2 and ptest3=3; ERROR: update or delete on "pktable" violates foreign key constraint "constrname3" on "fktable" -DETAIL: Key (ptest1,ptest2,ptest3)=(1,2,3) is still referenced from "fktable". +DETAIL: Key (ptest1,ptest2,ptest3)=(1,2,3) is still referenced from table "fktable". -- Try to delete something that should work DELETE FROM PKTABLE where ptest1=2; -- Show PKTABLE and FKTABLE @@ -388,7 +388,7 @@ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" fo CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, ftest4 int, CONSTRAINT constrname3 FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE ON DELETE CASCADE ON UPDATE CASCADE); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks -- Insert Primary Key values INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1'); INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2'); @@ -402,8 +402,8 @@ INSERT INTO FKTABLE VALUES (NULL, 2, 7, 4); INSERT INTO FKTABLE VALUES (NULL, 3, 4, 5); -- Insert a failed values INSERT INTO FKTABLE VALUES (1, 2, 7, 6); -ERROR: insert or update on "fktable" violates foreign key constraint "constrname3" -DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3" +DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in table "pktable". -- Show FKTABLE SELECT * from FKTABLE; ftest1 | ftest2 | ftest3 | ftest4 @@ -486,7 +486,7 @@ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" fo CREATE TABLE FKTABLE ( ftest1 int DEFAULT 0, ftest2 int, ftest3 int, ftest4 int, CONSTRAINT constrname3 FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE ON DELETE SET DEFAULT ON UPDATE SET NULL); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks -- Insert Primary Key values INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1'); INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2'); @@ -501,8 +501,8 @@ INSERT INTO FKTABLE VALUES (NULL, 2, 7, 4); INSERT INTO FKTABLE VALUES (NULL, 3, 4, 5); -- Insert a failed values INSERT INTO FKTABLE VALUES (1, 2, 7, 6); -ERROR: insert or update on "fktable" violates foreign key constraint "constrname3" -DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3" +DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in table "pktable". -- Show FKTABLE SELECT * from FKTABLE; ftest1 | ftest2 | ftest3 | ftest4 @@ -591,7 +591,7 @@ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" fo CREATE TABLE FKTABLE ( ftest1 int DEFAULT 0, ftest2 int DEFAULT -1, ftest3 int, ftest4 int, CONSTRAINT constrname3 FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE ON DELETE SET NULL ON UPDATE SET DEFAULT); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks -- Insert Primary Key values INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1'); INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2'); @@ -608,8 +608,8 @@ INSERT INTO FKTABLE VALUES (NULL, 2, 7, 4); INSERT INTO FKTABLE VALUES (NULL, 3, 4, 5); -- Insert a failed values INSERT INTO FKTABLE VALUES (1, 2, 7, 6); -ERROR: insert or update on "fktable" violates foreign key constraint "constrname3" -DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3" +DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in table "pktable". -- Show FKTABLE SELECT * from FKTABLE; ftest1 | ftest2 | ftest3 | ftest4 @@ -625,8 +625,8 @@ SELECT * from FKTABLE; -- Try to update something that will fail UPDATE PKTABLE set ptest2=5 where ptest2=2; -ERROR: insert or update on "fktable" violates foreign key constraint "constrname3" -DETAIL: Key (ftest1,ftest2,ftest3)=(1,-1,3) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3" +DETAIL: Key (ftest1,ftest2,ftest3)=(1,-1,3) is not present in table "pktable". -- Try to update something that will set default UPDATE PKTABLE set ptest1=0, ptest2=5, ptest3=10 where ptest2=2; UPDATE PKTABLE set ptest2=10 where ptest2=4; @@ -707,10 +707,10 @@ DROP TABLE PKTABLE; CREATE TABLE PKTABLE (ptest1 int PRIMARY KEY); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" CREATE TABLE FKTABLE_FAIL1 ( ftest1 int, CONSTRAINT fkfail1 FOREIGN KEY (ftest2) REFERENCES PKTABLE); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: column "ftest2" referenced in foreign key constraint does not exist CREATE TABLE FKTABLE_FAIL2 ( ftest1 int, CONSTRAINT fkfail1 FOREIGN KEY (ftest1) REFERENCES PKTABLE(ptest2)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: column "ptest2" referenced in foreign key constraint does not exist DROP TABLE FKTABLE_FAIL1; ERROR: table "fktable_fail1" does not exist @@ -721,8 +721,8 @@ DROP TABLE PKTABLE; CREATE TABLE PKTABLE (ptest1 int, ptest2 int, UNIQUE(ptest1, ptest2)); NOTICE: CREATE TABLE / UNIQUE will create implicit index "pktable_ptest1_key" for table "pktable" CREATE TABLE FKTABLE_FAIL1 (ftest1 int REFERENCES pktable(ptest1)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) -ERROR: there is no UNIQUE constraint matching given keys for referenced table "pktable" +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks +ERROR: there is no unique constraint matching given keys for referenced table "pktable" DROP TABLE FKTABLE_FAIL1; ERROR: table "fktable_fail1" does not exist DROP TABLE PKTABLE; @@ -734,23 +734,23 @@ CREATE TABLE PKTABLE (ptest1 int PRIMARY KEY); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -- This next should fail, because inet=int does not exist CREATE TABLE FKTABLE (ftest1 inet REFERENCES pktable); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- This should also fail for the same reason, but here we -- give the column name CREATE TABLE FKTABLE (ftest1 inet REFERENCES pktable(ptest1)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- This should succeed, even though they are different types -- because varchar=int does exist CREATE TABLE FKTABLE (ftest1 varchar REFERENCES pktable); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks DROP TABLE FKTABLE; -- As should this CREATE TABLE FKTABLE (ftest1 varchar REFERENCES pktable(ptest1)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks DROP TABLE FKTABLE; DROP TABLE PKTABLE; -- Two columns, two tables @@ -758,36 +758,36 @@ CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, PRIMARY KEY(ptest1, ptest2)); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -- This should fail, because we just chose really odd types CREATE TABLE FKTABLE (ftest1 cidr, ftest2 timestamp, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: cidr = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- Again, so should this... CREATE TABLE FKTABLE (ftest1 cidr, ftest2 timestamp, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest1, ptest2)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: cidr = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- This fails because we mixed up the column ordering CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest2, ftest1) REFERENCES pktable); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- As does this... CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest2, ftest1) REFERENCES pktable(ptest1, ptest2)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- And again.. CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest2, ptest1)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: integer = inet -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- This works... CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest2, ftest1) REFERENCES pktable(ptest2, ptest1)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks DROP TABLE FKTABLE; -- As does this CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest1, ptest2)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks DROP TABLE FKTABLE; DROP TABLE PKTABLE; -- Two columns, same table @@ -795,35 +795,35 @@ DROP TABLE PKTABLE; CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3, ptest4) REFERENCES pktable(ptest1, ptest2)); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks DROP TABLE PKTABLE; -- And this, CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3, ptest4) REFERENCES pktable); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks DROP TABLE PKTABLE; -- This shouldn't (mixed up columns) CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3, ptest4) REFERENCES pktable(ptest2, ptest1)); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: integer = inet -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- Nor should this... (same reason, we have 4,3 referencing 1,2 which mismatches types CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest4, ptest3) REFERENCES pktable(ptest1, ptest2)); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- Not this one either... Same as the last one except we didn't defined the columns being referenced. CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest4, ptest3) REFERENCES pktable); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- -- Now some cases with inheritance -- Basic 2 table case: 1 column of matching types. @@ -832,26 +832,26 @@ create table pktable (ptest1 int, primary key(base1), unique(base1, ptest1)) inh NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" NOTICE: CREATE TABLE / UNIQUE will create implicit index "pktable_base1_key" for table "pktable" create table fktable (ftest1 int references pktable(base1)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks -- now some ins, upd, del insert into pktable(base1) values (1); insert into pktable(base1) values (2); -- let's insert a non-existant fktable value insert into fktable(ftest1) values (3); -ERROR: insert or update on "fktable" violates foreign key constraint "$1" -DETAIL: Key (ftest1)=(3) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "$1" +DETAIL: Key (ftest1)=(3) is not present in table "pktable". -- let's make a valid row for that insert into pktable(base1) values (3); insert into fktable(ftest1) values (3); -- let's try removing a row that should fail from pktable delete from pktable where base1>2; ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "fktable" -DETAIL: Key (base1)=(3) is still referenced from "fktable". +DETAIL: Key (base1)=(3) is still referenced from table "fktable". -- okay, let's try updating all of the base1 values to *4 -- which should fail. update pktable set base1=base1*4; ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "fktable" -DETAIL: Key (base1)=(3) is still referenced from "fktable". +DETAIL: Key (base1)=(3) is still referenced from table "fktable". -- okay, let's try an update that should work. update pktable set base1=base1*4 where base1<3; -- and a delete that should work @@ -861,26 +861,26 @@ drop table fktable; delete from pktable; -- Now 2 columns 2 tables, matching types create table fktable (ftest1 int, ftest2 int, foreign key(ftest1, ftest2) references pktable(base1, ptest1)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks -- now some ins, upd, del insert into pktable(base1, ptest1) values (1, 1); insert into pktable(base1, ptest1) values (2, 2); -- let's insert a non-existant fktable value insert into fktable(ftest1, ftest2) values (3, 1); -ERROR: insert or update on "fktable" violates foreign key constraint "$1" -DETAIL: Key (ftest1,ftest2)=(3,1) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "$1" +DETAIL: Key (ftest1,ftest2)=(3,1) is not present in table "pktable". -- let's make a valid row for that insert into pktable(base1,ptest1) values (3, 1); insert into fktable(ftest1, ftest2) values (3, 1); -- let's try removing a row that should fail from pktable delete from pktable where base1>2; ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "fktable" -DETAIL: Key (base1,ptest1)=(3,1) is still referenced from "fktable". +DETAIL: Key (base1,ptest1)=(3,1) is still referenced from table "fktable". -- okay, let's try updating all of the base1 values to *4 -- which should fail. update pktable set base1=base1*4; ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "fktable" -DETAIL: Key (base1,ptest1)=(3,1) is still referenced from "fktable". +DETAIL: Key (base1,ptest1)=(3,1) is still referenced from table "fktable". -- okay, let's try an update that should work. update pktable set base1=base1*4 where base1<3; -- and a delete that should work @@ -894,23 +894,23 @@ create table pktable_base(base1 int not null, base2 int); create table pktable(ptest1 int, ptest2 int, primary key(base1, ptest1), foreign key(base2, ptest2) references pktable(base1, ptest1)) inherits (pktable_base); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks insert into pktable (base1, ptest1, base2, ptest2) values (1, 1, 1, 1); insert into pktable (base1, ptest1, base2, ptest2) values (2, 1, 1, 1); insert into pktable (base1, ptest1, base2, ptest2) values (2, 2, 2, 1); insert into pktable (base1, ptest1, base2, ptest2) values (1, 3, 2, 2); -- fails (3,2) isn't in base1, ptest1 insert into pktable (base1, ptest1, base2, ptest2) values (2, 3, 3, 2); -ERROR: insert or update on "pktable" violates foreign key constraint "$1" -DETAIL: Key (base2,ptest2)=(3,2) is not present in "pktable". +ERROR: insert or update on table "pktable" violates foreign key constraint "$1" +DETAIL: Key (base2,ptest2)=(3,2) is not present in table "pktable". -- fails (2,2) is being referenced delete from pktable where base1=2; ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "pktable" -DETAIL: Key (base1,ptest1)=(2,2) is still referenced from "pktable". +DETAIL: Key (base1,ptest1)=(2,2) is still referenced from table "pktable". -- fails (1,1) is being referenced (twice) update pktable set base1=3 where base1=1; ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "pktable" -DETAIL: Key (base1,ptest1)=(1,1) is still referenced from "pktable". +DETAIL: Key (base1,ptest1)=(1,1) is still referenced from table "pktable". -- this sequence of two deletes will work, since after the first there will be no (2,*) references delete from pktable where base2=2; delete from pktable where base1=2; @@ -922,26 +922,26 @@ create table pktable(ptest1 inet, primary key(base1, ptest1)) inherits (pktable_ NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -- just generally bad types (with and without column references on the referenced table) create table fktable(ftest1 cidr, ftest2 int[], foreign key (ftest1, ftest2) references pktable); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: cidr = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. create table fktable(ftest1 cidr, ftest2 int[], foreign key (ftest1, ftest2) references pktable(base1, ptest1)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: cidr = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- let's mix up which columns reference which create table fktable(ftest1 int, ftest2 inet, foreign key(ftest2, ftest1) references pktable); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. create table fktable(ftest1 int, ftest2 inet, foreign key(ftest2, ftest1) references pktable(base1, ptest1)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. create table fktable(ftest1 int, ftest2 inet, foreign key(ftest1, ftest2) references pktable(ptest1, base1)); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: integer = inet -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. drop table pktable; drop table pktable_base; -- 2 columns (1 table), mismatched types @@ -949,27 +949,27 @@ create table pktable_base(base1 int not null, base2 int); create table pktable(ptest1 inet, ptest2 inet[], primary key(base1, ptest1), foreign key(base2, ptest2) references pktable(base1, ptest1)) inherits (pktable_base); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet[] = inet -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. create table pktable(ptest1 inet, ptest2 inet, primary key(base1, ptest1), foreign key(base2, ptest2) references pktable(ptest1, base1)) inherits (pktable_base); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: integer = inet -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. create table pktable(ptest1 inet, ptest2 inet, primary key(base1, ptest1), foreign key(ptest2, base2) references pktable(base1, ptest1)) inherits (pktable_base); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. create table pktable(ptest1 inet, ptest2 inet, primary key(base1, ptest1), foreign key(ptest2, base2) references pktable(base1, ptest1)) inherits (pktable_base); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks ERROR: operator does not exist: inet = integer -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. drop table pktable; ERROR: table "pktable" does not exist drop table pktable_base; @@ -988,11 +988,11 @@ CREATE TABLE fktable ( fk INT4 REFERENCES pktable DEFERRABLE ); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "fktable_pkey" for table "fktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks -- default to immediate: should fail INSERT INTO fktable VALUES (5, 10); -ERROR: insert or update on "fktable" violates foreign key constraint "$1" -DETAIL: Key (fk)=(10) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "$1" +DETAIL: Key (fk)=(10) is not present in table "pktable". -- explicitely defer the constraint BEGIN; SET CONSTRAINTS ALL DEFERRED; @@ -1011,7 +1011,7 @@ CREATE TABLE fktable ( fk INT4 REFERENCES pktable DEFERRABLE INITIALLY DEFERRED ); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "fktable_pkey" for table "fktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks -- default to deferred, should succeed BEGIN; INSERT INTO fktable VALUES (100, 200); @@ -1022,8 +1022,8 @@ BEGIN; SET CONSTRAINTS ALL IMMEDIATE; -- should fail INSERT INTO fktable VALUES (500, 1000); -ERROR: insert or update on "fktable" violates foreign key constraint "$1" -DETAIL: Key (fk)=(1000) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "$1" +DETAIL: Key (fk)=(1000) is not present in table "pktable". COMMIT; DROP TABLE fktable, pktable; -- tricky behavior: according to SQL99, if a deferred constraint is set @@ -1040,17 +1040,17 @@ CREATE TABLE fktable ( fk INT4 REFERENCES pktable DEFERRABLE ); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "fktable_pkey" for table "fktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks BEGIN; SET CONSTRAINTS ALL DEFERRED; -- should succeed, for now INSERT INTO fktable VALUES (1000, 2000); -- should cause transaction abort, due to preceding error SET CONSTRAINTS ALL IMMEDIATE; -ERROR: insert or update on "fktable" violates foreign key constraint "$1" -DETAIL: Key (fk)=(2000) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "$1" +DETAIL: Key (fk)=(2000) is not present in table "pktable". INSERT INTO pktable VALUES (2000, 3); -- too late -ERROR: current transaction is aborted, queries ignored until end of transaction block +ERROR: current transaction is aborted, commands ignored until end of transaction block COMMIT; DROP TABLE fktable, pktable; -- deferrable, initially deferred @@ -1064,11 +1064,11 @@ CREATE TABLE fktable ( fk INT4 REFERENCES pktable DEFERRABLE INITIALLY DEFERRED ); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "fktable_pkey" for table "fktable" -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks BEGIN; -- no error here INSERT INTO fktable VALUES (100, 200); -- error here on commit COMMIT; -ERROR: insert or update on "fktable" violates foreign key constraint "$1" -DETAIL: Key (fk)=(200) is not present in "pktable". +ERROR: insert or update on table "fktable" violates foreign key constraint "$1" +DETAIL: Key (fk)=(200) is not present in table "pktable". diff --git a/src/test/regress/expected/horology.out b/src/test/regress/expected/horology.out index 940707e90f..b135eb5b91 100644 --- a/src/test/regress/expected/horology.out +++ b/src/test/regress/expected/horology.out @@ -82,7 +82,7 @@ SELECT timestamp with time zone '12/27/2001 04:05:06.789-08'; -- should fail in mdy mode: SELECT timestamp with time zone '27/12/2001 04:05:06.789-08'; ERROR: date/time field value out of range: "27/12/2001 04:05:06.789-08" -HINT: Perhaps you need a different DateStyle setting. +HINT: Perhaps you need a different "datestyle" setting. set datestyle to dmy; SELECT timestamp with time zone '27/12/2001 04:05:06.789-08'; timestamptz @@ -306,7 +306,7 @@ SELECT date '1991-02-03' - time '04:05:06' AS "Subtract Time"; SELECT date '1991-02-03' - time with time zone '04:05:06 UTC' AS "Subtract Time UTC"; ERROR: operator does not exist: date - time with time zone -HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts. +HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. -- -- timestamp, interval arithmetic -- @@ -2356,7 +2356,7 @@ SELECT '' AS two, d1 AS "timestamp", abstime(d1) AS abstime SELECT '' AS three, f1 as abstime, cast(f1 as timestamp) AS "timestamp" FROM ABSTIME_TBL WHERE NOT isfinite(f1); -ERROR: cannot convert "invalid" abstime to timestamp +ERROR: cannot convert abstime "invalid" to timestamp SELECT '' AS ten, f1 AS interval, reltime(f1) AS reltime FROM INTERVAL_TBL; ten | interval | reltime diff --git a/src/test/regress/expected/inet.out b/src/test/regress/expected/inet.out index b9ed16cd4f..7a8e038dbf 100644 --- a/src/test/regress/expected/inet.out +++ b/src/test/regress/expected/inet.out @@ -27,7 +27,7 @@ INSERT INTO INET_TBL (c, i) VALUES ('192.168.1.2/24', '192.168.1.226'); ERROR: invalid cidr value: "192.168.1.2/24" DETAIL: Value has bits set to right of mask. INSERT INTO INET_TBL (c, i) VALUES ('1234::1234::1234', '::1.2.3.4'); -ERROR: invalid input syntax for cidr: "1234::1234::1234" +ERROR: invalid input syntax for type cidr: "1234::1234::1234" -- check that CIDR rejects invalid input when converting from text: INSERT INTO INET_TBL (c, i) VALUES (cidr('192.168.1.2/24'), '192.168.1.226'); ERROR: invalid cidr value: "192.168.1.2/24" diff --git a/src/test/regress/expected/inherit.out b/src/test/regress/expected/inherit.out index 28c9a785ca..f1890595ea 100644 --- a/src/test/regress/expected/inherit.out +++ b/src/test/regress/expected/inherit.out @@ -5,8 +5,8 @@ CREATE TABLE a (aa TEXT); CREATE TABLE b (bb TEXT) INHERITS (a); CREATE TABLE c (cc TEXT) INHERITS (a); CREATE TABLE d (dd TEXT) INHERITS (b,c,a); -NOTICE: merging multiple inherited definitions of attribute "aa" -NOTICE: merging multiple inherited definitions of attribute "aa" +NOTICE: merging multiple inherited definitions of column "aa" +NOTICE: merging multiple inherited definitions of column "aa" INSERT INTO a(aa) VALUES('aaa'); INSERT INTO a(aa) VALUES('aaaa'); INSERT INTO a(aa) VALUES('aaaaa'); @@ -538,7 +538,7 @@ SELECT relname, d.* FROM ONLY d, pg_class where d.tableoid = pg_class.oid; CREATE TEMP TABLE z (b TEXT, PRIMARY KEY(aa, b)) inherits (a); NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "z_pkey" for table "z" INSERT INTO z VALUES (NULL, 'text'); -- should fail -ERROR: null value for attribute "aa" violates NOT NULL constraint +ERROR: null value in column "aa" violates not-null constraint -- Check UPDATE with inherited target and an inherited source table create temp table foo(f1 int, f2 int); create temp table foo2(f3 int) inherits (foo); @@ -604,7 +604,7 @@ SELECT * FROM a; /* Has ee entry */ (1 row) CREATE TABLE inhf (LIKE inhx, LIKE inhx); /* Throw error */ -ERROR: attribute "xx" duplicated +ERROR: column "xx" duplicated CREATE TABLE inhf (LIKE inhx INCLUDING DEFAULTS); INSERT INTO inhf DEFAULT VALUES; SELECT * FROM inhf; /* Single entry with value 'text' */ diff --git a/src/test/regress/expected/insert.out b/src/test/regress/expected/insert.out index 758e319ab0..10d5ce49d5 100644 --- a/src/test/regress/expected/insert.out +++ b/src/test/regress/expected/insert.out @@ -3,7 +3,7 @@ -- create table inserttest (col1 int4, col2 int4 NOT NULL, col3 text default 'testing'); insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT); -ERROR: null value for attribute "col2" violates NOT NULL constraint +ERROR: null value in column "col2" violates not-null constraint insert into inserttest (col2, col3) values (3, DEFAULT); insert into inserttest (col1, col2, col3) values (DEFAULT, 5, DEFAULT); insert into inserttest values (DEFAULT, 5, 'test'); diff --git a/src/test/regress/expected/int2.out b/src/test/regress/expected/int2.out index 35ebcb6c26..6da403c3e7 100644 --- a/src/test/regress/expected/int2.out +++ b/src/test/regress/expected/int2.out @@ -14,7 +14,7 @@ INSERT INTO INT2_TBL(f1) VALUES ('32767'); INSERT INTO INT2_TBL(f1) VALUES ('-32767'); -- bad input values -- should give warnings INSERT INTO INT2_TBL(f1) VALUES ('100000'); -ERROR: 100000 is out of range for int2 +ERROR: value "100000" is out of range for type shortint INSERT INTO INT2_TBL(f1) VALUES ('asdf'); ERROR: invalid input syntax for integer: "asdf" SELECT '' AS five, INT2_TBL.*; diff --git a/src/test/regress/expected/int4.out b/src/test/regress/expected/int4.out index b8d7bcf7bf..633eb578d5 100644 --- a/src/test/regress/expected/int4.out +++ b/src/test/regress/expected/int4.out @@ -14,7 +14,7 @@ INSERT INTO INT4_TBL(f1) VALUES ('2147483647'); INSERT INTO INT4_TBL(f1) VALUES ('-2147483647'); -- bad input values -- should give warnings INSERT INTO INT4_TBL(f1) VALUES ('1000000000000'); -ERROR: 1000000000000 is out of range for int4 +ERROR: value "1000000000000" is out of range for type integer INSERT INTO INT4_TBL(f1) VALUES ('asdf'); ERROR: invalid input syntax for integer: "asdf" SELECT '' AS five, INT4_TBL.*; diff --git a/src/test/regress/expected/interval.out b/src/test/regress/expected/interval.out index 54a611b469..8ba178c8bf 100644 --- a/src/test/regress/expected/interval.out +++ b/src/test/regress/expected/interval.out @@ -58,9 +58,9 @@ INSERT INTO INTERVAL_TBL (f1) VALUES ('5 months'); INSERT INTO INTERVAL_TBL (f1) VALUES ('5 months 12 hours'); -- badly formatted interval INSERT INTO INTERVAL_TBL (f1) VALUES ('badly formatted interval'); -ERROR: invalid input syntax for interval: "badly formatted interval" +ERROR: invalid input syntax for type interval: "badly formatted interval" INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 30 eons ago'); -ERROR: invalid input syntax for interval: "@ 30 eons ago" +ERROR: invalid input syntax for type interval: "@ 30 eons ago" -- test interval operators SELECT '' AS ten, INTERVAL_TBL.*; ten | f1 diff --git a/src/test/regress/expected/join.out b/src/test/regress/expected/join.out index 2ce1d7b177..471e149b8c 100644 --- a/src/test/regress/expected/join.out +++ b/src/test/regress/expected/join.out @@ -1849,7 +1849,7 @@ SELECT '' AS "xxx", * -- UNION JOIN isn't implemented yet SELECT '' AS "xxx", * FROM J1_TBL UNION JOIN J2_TBL; -ERROR: UNION JOIN is not implemented yet +ERROR: UNION JOIN is not implemented -- -- Multiway full join -- diff --git a/src/test/regress/expected/lseg.out b/src/test/regress/expected/lseg.out index ab9f41cfad..9e0e6cb2df 100644 --- a/src/test/regress/expected/lseg.out +++ b/src/test/regress/expected/lseg.out @@ -11,13 +11,13 @@ INSERT INTO LSEG_TBL VALUES ('[-1e6,2e2,3e5, -4e1]'); INSERT INTO LSEG_TBL VALUES ('(11,22,33,44)'); -- bad values for parser testing INSERT INTO LSEG_TBL VALUES ('(3asdf,2 ,3,4r2)'); -ERROR: invalid input syntax for lseg: "(3asdf,2 ,3,4r2)" +ERROR: invalid input syntax for type lseg: "(3asdf,2 ,3,4r2)" INSERT INTO LSEG_TBL VALUES ('[1,2,3, 4'); -ERROR: invalid input syntax for lseg: "[1,2,3, 4" +ERROR: invalid input syntax for type lseg: "[1,2,3, 4" INSERT INTO LSEG_TBL VALUES ('[(,2),(3,4)]'); -ERROR: invalid input syntax for lseg: "[(,2),(3,4)]" +ERROR: invalid input syntax for type lseg: "[(,2),(3,4)]" INSERT INTO LSEG_TBL VALUES ('[(1,2),(3,4)'); -ERROR: invalid input syntax for lseg: "[(1,2),(3,4)" +ERROR: invalid input syntax for type lseg: "[(1,2),(3,4)" select * from LSEG_TBL; s ------------------------------- diff --git a/src/test/regress/expected/numeric.out b/src/test/regress/expected/numeric.out index ae4438c41c..e1c7361b64 100644 --- a/src/test/regress/expected/numeric.out +++ b/src/test/regress/expected/numeric.out @@ -676,12 +676,12 @@ INSERT INTO fract_only VALUES (1, '0.0'); INSERT INTO fract_only VALUES (2, '0.1'); INSERT INTO fract_only VALUES (3, '1.0'); -- should fail ERROR: numeric field overflow -DETAIL: ABS(value) >= 10^0 for field with precision 4, scale 4. +DETAIL: The absolute value is greater than or equal to 10^0 for field with precision 4, scale 4. INSERT INTO fract_only VALUES (4, '-0.9999'); INSERT INTO fract_only VALUES (5, '0.99994'); INSERT INTO fract_only VALUES (6, '0.99995'); -- should fail ERROR: numeric field overflow -DETAIL: ABS(value) >= 10^0 for field with precision 4, scale 4. +DETAIL: The absolute value is greater than or equal to 10^0 for field with precision 4, scale 4. INSERT INTO fract_only VALUES (7, '0.00001'); INSERT INTO fract_only VALUES (8, '0.00017'); SELECT * FROM fract_only; diff --git a/src/test/regress/expected/oid.out b/src/test/regress/expected/oid.out index cbf722b26d..f3fc452587 100644 --- a/src/test/regress/expected/oid.out +++ b/src/test/regress/expected/oid.out @@ -10,9 +10,9 @@ INSERT INTO OID_TBL(f1) VALUES ('99999999'); INSERT INTO OID_TBL(f1) VALUES (''); -- bad inputs INSERT INTO OID_TBL(f1) VALUES ('asdfasd'); -ERROR: invalid input syntax for OID: "asdfasd" +ERROR: invalid input syntax for type "oid": "asdfasd" INSERT INTO OID_TBL(f1) VALUES ('99asdfasd'); -ERROR: invalid input syntax for OID: "99asdfasd" +ERROR: invalid input syntax for type "oid": "99asdfasd" SELECT '' AS six, OID_TBL.*; six | f1 -----+------------ diff --git a/src/test/regress/expected/path.out b/src/test/regress/expected/path.out index ab4e3e32ab..f5671c7a13 100644 --- a/src/test/regress/expected/path.out +++ b/src/test/regress/expected/path.out @@ -13,9 +13,9 @@ INSERT INTO PATH_TBL VALUES ('[11,12,13,14]'); INSERT INTO PATH_TBL VALUES ('(11,12,13,14)'); -- bad values for parser testing INSERT INTO PATH_TBL VALUES ('[(,2),(3,4)]'); -ERROR: invalid input syntax for path: "[(,2),(3,4)]" +ERROR: invalid input syntax for type path: "[(,2),(3,4)]" INSERT INTO PATH_TBL VALUES ('[(1,2),(3,4)'); -ERROR: invalid input syntax for path: "[(1,2),(3,4)" +ERROR: invalid input syntax for type path: "[(1,2),(3,4)" SELECT f1 FROM PATH_TBL; f1 --------------------------- diff --git a/src/test/regress/expected/plpgsql.out b/src/test/regress/expected/plpgsql.out index 3bfb4d42dc..a7a380b5c6 100644 --- a/src/test/regress/expected/plpgsql.out +++ b/src/test/regress/expected/plpgsql.out @@ -1515,7 +1515,7 @@ select * from PField_v1 where pfname = 'PF0_2' order by slotname; -- Finally we want errors -- insert into PField values ('PF1_1', 'should fail due to unique index'); -ERROR: duplicate key violates UNIQUE constraint "pfield_name" +ERROR: duplicate key violates unique constraint "pfield_name" update PSlot set backlink = 'WS.not.there' where slotname = 'PS.base.a1'; ERROR: WS.not.there does not exist CONTEXT: PL/pgSQL function "tg_backlink_a" line 16 at assignment @@ -1529,7 +1529,7 @@ update PSlot set slotlink = 'XX.illegal' where slotname = 'PS.base.a1'; ERROR: illegal slotlink beginning with XX CONTEXT: PL/pgSQL function "tg_slotlink_a" line 16 at assignment insert into HSlot values ('HS', 'base.hub1', 1, ''); -ERROR: duplicate key violates UNIQUE constraint "hslot_name" +ERROR: duplicate key violates unique constraint "hslot_name" insert into HSlot values ('HS', 'base.hub1', 20, ''); ERROR: no manual manipulation of HSlot delete from HSlot; diff --git a/src/test/regress/expected/point.out b/src/test/regress/expected/point.out index 1a5f29eee9..1ad75abdb2 100644 --- a/src/test/regress/expected/point.out +++ b/src/test/regress/expected/point.out @@ -9,12 +9,12 @@ INSERT INTO POINT_TBL(f1) VALUES ('(5.1, 34.5)'); INSERT INTO POINT_TBL(f1) VALUES ('(-5.0,-12.0)'); -- bad format points INSERT INTO POINT_TBL(f1) VALUES ('asdfasdf'); -ERROR: invalid input syntax for point: "asdfasdf" +ERROR: invalid input syntax for type point: "asdfasdf" INSERT INTO POINT_TBL(f1) VALUES ('10.0,10.0'); INSERT INTO POINT_TBL(f1) VALUES ('(10.0 10.0)'); -ERROR: invalid input syntax for point: "(10.0 10.0)" +ERROR: invalid input syntax for type point: "(10.0 10.0)" INSERT INTO POINT_TBL(f1) VALUES ('(10.0,10.0'); -ERROR: invalid input syntax for point: "(10.0,10.0" +ERROR: invalid input syntax for type point: "(10.0,10.0" SELECT '' AS six, POINT_TBL.*; six | f1 -----+------------ diff --git a/src/test/regress/expected/polygon.out b/src/test/regress/expected/polygon.out index da7e397e2e..5ffa39b1bc 100644 --- a/src/test/regress/expected/polygon.out +++ b/src/test/regress/expected/polygon.out @@ -21,15 +21,15 @@ INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0,0.0)'); INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0,1.0),(0.0,1.0)'); -- bad polygon input strings INSERT INTO POLYGON_TBL(f1) VALUES ('0.0'); -ERROR: invalid input syntax for polygon: "0.0" +ERROR: invalid input syntax for type polygon: "0.0" INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0 0.0'); -ERROR: invalid input syntax for polygon: "(0.0 0.0" +ERROR: invalid input syntax for type polygon: "(0.0 0.0" INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2)'); -ERROR: invalid input syntax for polygon: "(0,1,2)" +ERROR: invalid input syntax for type polygon: "(0,1,2)" INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2,3'); -ERROR: invalid input syntax for polygon: "(0,1,2,3" +ERROR: invalid input syntax for type polygon: "(0,1,2,3" INSERT INTO POLYGON_TBL(f1) VALUES ('asdf'); -ERROR: invalid input syntax for polygon: "asdf" +ERROR: invalid input syntax for type polygon: "asdf" SELECT '' AS four, POLYGON_TBL.*; four | f1 ------+--------------------- diff --git a/src/test/regress/expected/polymorphism.out b/src/test/regress/expected/polymorphism.out index bc6b9e4d85..55687467a0 100644 --- a/src/test/regress/expected/polymorphism.out +++ b/src/test/regress/expected/polymorphism.out @@ -76,8 +76,8 @@ CREATE AGGREGATE myaggp01a(BASETYPE = "ANY", SFUNC = stfnp, STYPE = int4[], -- should ERROR: stfnp(anyarray) not matched by stfnp(int[]) CREATE AGGREGATE myaggp02a(BASETYPE = "ANY", SFUNC = stfnp, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. -- N P -- should CREATE CREATE AGGREGATE myaggp03a(BASETYPE = "ANY", SFUNC = stfp, STYPE = int4[], @@ -88,12 +88,12 @@ CREATE AGGREGATE myaggp03b(BASETYPE = "ANY", SFUNC = stfp, STYPE = int4[], -- should ERROR: we have no way to resolve S CREATE AGGREGATE myaggp04a(BASETYPE = "ANY", SFUNC = stfp, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. CREATE AGGREGATE myaggp04b(BASETYPE = "ANY", SFUNC = stfp, STYPE = anyarray, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. -- Case2 (R = P) && ((B = P) || (B = N)) -- ------------------------------------- -- S tf1 B tf2 @@ -147,14 +147,14 @@ ERROR: function tfp(integer[], anyelement) does not exist -- should ERROR: tfnp(anyarray, int) not matched by tfnp(int[],int) CREATE AGGREGATE myaggp13a(BASETYPE = int, SFUNC = tfnp, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. -- P N N P -- should ERROR: tf2p(anyarray, int) not matched by tf2p(int[],anyelement) CREATE AGGREGATE myaggp14a(BASETYPE = int, SFUNC = tf2p, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. -- P N P N -- should ERROR: tfnp(anyarray, anyelement) not matched by tfnp(int[],int) CREATE AGGREGATE myaggp15a(BASETYPE = anyelement, SFUNC = tfnp, @@ -169,22 +169,22 @@ ERROR: function tf2p(anyarray, anyelement) does not exist -- should ERROR: we have no way to resolve S CREATE AGGREGATE myaggp17a(BASETYPE = int, SFUNC = tf1p, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. CREATE AGGREGATE myaggp17b(BASETYPE = int, SFUNC = tf1p, STYPE = anyarray, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. -- P P N P -- should ERROR: tfp(anyarray, int) not matched by tfp(anyarray, anyelement) CREATE AGGREGATE myaggp18a(BASETYPE = int, SFUNC = tfp, STYPE = anyarray, FINALFUNC = ffp, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. CREATE AGGREGATE myaggp18b(BASETYPE = int, SFUNC = tfp, STYPE = anyarray, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. -- P P P N -- should ERROR: tf1p(anyarray, anyelement) not matched by tf1p(anyarray, int) CREATE AGGREGATE myaggp19a(BASETYPE = anyelement, SFUNC = tf1p, @@ -213,12 +213,12 @@ CREATE AGGREGATE myaggn01b(BASETYPE = "ANY", SFUNC = stfnp, STYPE = int4[], -- should ERROR: stfnp(anyarray) not matched by stfnp(int[]) CREATE AGGREGATE myaggn02a(BASETYPE = "ANY", SFUNC = stfnp, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. CREATE AGGREGATE myaggn02b(BASETYPE = "ANY", SFUNC = stfnp, STYPE = anyarray, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. -- N P -- should CREATE CREATE AGGREGATE myaggn03a(BASETYPE = "ANY", SFUNC = stfp, STYPE = int4[], @@ -227,8 +227,8 @@ CREATE AGGREGATE myaggn03a(BASETYPE = "ANY", SFUNC = stfp, STYPE = int4[], -- should ERROR: ffnp(anyarray) not matched by ffnp(int[]) CREATE AGGREGATE myaggn04a(BASETYPE = "ANY", SFUNC = stfp, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. -- Case4 (R = N) && ((B = P) || (B = N)) -- ------------------------------------- -- S tf1 B tf2 @@ -281,22 +281,22 @@ ERROR: function tfp(integer[], anyelement) does not exist -- should ERROR: tfnp(anyarray, int) not matched by tfnp(int[],int) CREATE AGGREGATE myaggn13a(BASETYPE = int, SFUNC = tfnp, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. CREATE AGGREGATE myaggn13b(BASETYPE = int, SFUNC = tfnp, STYPE = anyarray, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. -- P N N P -- should ERROR: tf2p(anyarray, int) not matched by tf2p(int[],anyelement) CREATE AGGREGATE myaggn14a(BASETYPE = int, SFUNC = tf2p, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. CREATE AGGREGATE myaggn14b(BASETYPE = int, SFUNC = tf2p, STYPE = anyarray, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. -- P N P N -- should ERROR: tfnp(anyarray, anyelement) not matched by tfnp(int[],int) CREATE AGGREGATE myaggn15a(BASETYPE = anyelement, SFUNC = tfnp, @@ -317,14 +317,14 @@ ERROR: function tf2p(anyarray, anyelement) does not exist -- should ERROR: ffnp(anyarray) not matched by ffnp(int[]) CREATE AGGREGATE myaggn17a(BASETYPE = int, SFUNC = tf1p, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. -- P P N P -- should ERROR: tfp(anyarray, int) not matched by tfp(anyarray, anyelement) CREATE AGGREGATE myaggn18a(BASETYPE = int, SFUNC = tfp, STYPE = anyarray, FINALFUNC = ffnp, INITCOND = '{}'); -ERROR: cannot determine transition datatype -DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type. +ERROR: cannot determine transition data type +DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type. -- P P P N -- should ERROR: tf1p(anyarray, anyelement) not matched by tf1p(anyarray, int) CREATE AGGREGATE myaggn19a(BASETYPE = anyelement, SFUNC = tf1p, diff --git a/src/test/regress/expected/reltime.out b/src/test/regress/expected/reltime.out index f209a06d0b..50f2dba138 100644 --- a/src/test/regress/expected/reltime.out +++ b/src/test/regress/expected/reltime.out @@ -10,9 +10,9 @@ INSERT INTO RELTIME_TBL (f1) VALUES ('@ 3 months'); INSERT INTO RELTIME_TBL (f1) VALUES ('@ 14 seconds ago'); -- badly formatted reltimes INSERT INTO RELTIME_TBL (f1) VALUES ('badly formatted reltime'); -ERROR: invalid input syntax for reltime: "badly formatted reltime" +ERROR: invalid input syntax for type reltime: "badly formatted reltime" INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago'); -ERROR: invalid input syntax for reltime: "@ 30 eons ago" +ERROR: invalid input syntax for type reltime: "@ 30 eons ago" -- test reltime operators SELECT '' AS six, RELTIME_TBL.*; six | f1 diff --git a/src/test/regress/expected/rules.out b/src/test/regress/expected/rules.out index a00959e0f7..fcd7b470e8 100644 --- a/src/test/regress/expected/rules.out +++ b/src/test/regress/expected/rules.out @@ -1180,7 +1180,7 @@ drop rule foorule on foo; -- this should fail because f1 is not exposed for unqualified reference: create rule foorule as on insert to foo where f1 < 100 do instead insert into foo2 values (f1); -ERROR: attribute "f1" not found +ERROR: column "f1" does not exist -- this is the correct way: create rule foorule as on insert to foo where f1 < 100 do instead insert into foo2 values (new.f1); diff --git a/src/test/regress/expected/select_implicit.out b/src/test/regress/expected/select_implicit.out index 9da225e272..906cbbf338 100644 --- a/src/test/regress/expected/select_implicit.out +++ b/src/test/regress/expected/select_implicit.out @@ -44,7 +44,7 @@ SELECT count(*) FROM test_missing_target GROUP BY test_missing_target.c ORDER BY -- w/o existing GROUP BY target and w/o existing a different ORDER BY target -- failure expected SELECT count(*) FROM test_missing_target GROUP BY a ORDER BY b; -ERROR: attribute "test_missing_target.b" must be GROUPed or used in an aggregate function +ERROR: column "test_missing_target.b" must appear in GROUP BY clause or used in an aggregate function -- w/o existing GROUP BY target and w/o existing same ORDER BY target SELECT count(*) FROM test_missing_target GROUP BY b ORDER BY b; count @@ -114,7 +114,7 @@ SELECT c, count(*) FROM test_missing_target GROUP BY 1 ORDER BY 1; -- group using reference number out of range -- failure expected SELECT c, count(*) FROM test_missing_target GROUP BY 3; -ERROR: GROUP BY position 3 is not in target list +ERROR: GROUP BY position 3 is not in select list -- group w/o existing GROUP BY and ORDER BY target under ambiguous condition -- failure expected SELECT count(*) FROM test_missing_target x, test_missing_target y @@ -235,7 +235,7 @@ ORDER BY lower(test_missing_target.c); -- w/o existing GROUP BY target and w/o existing a different ORDER BY target -- failure expected SELECT count(a) FROM test_missing_target GROUP BY a ORDER BY b; -ERROR: attribute "test_missing_target.b" must be GROUPed or used in an aggregate function +ERROR: column "test_missing_target.b" must appear in GROUP BY clause or used in an aggregate function -- w/o existing GROUP BY target and w/o existing same ORDER BY target SELECT count(b) FROM test_missing_target GROUP BY b/2 ORDER BY b/2; count diff --git a/src/test/regress/expected/sequence.out b/src/test/regress/expected/sequence.out index fe102adab8..49b783a805 100644 --- a/src/test/regress/expected/sequence.out +++ b/src/test/regress/expected/sequence.out @@ -3,13 +3,13 @@ --- CREATE TABLE serialTest (f1 text, f2 serial); -NOTICE: CREATE TABLE will create implicit sequence "serialtest_f2_seq" for SERIAL column "serialtest.f2" +NOTICE: CREATE TABLE will create implicit sequence "serialtest_f2_seq" for "serial" column "serialtest.f2" INSERT INTO serialTest VALUES ('foo'); INSERT INTO serialTest VALUES ('bar'); INSERT INTO serialTest VALUES ('force', 100); INSERT INTO serialTest VALUES ('wrong', NULL); -ERROR: null value for attribute "f2" violates NOT NULL constraint +ERROR: null value in column "f2" violates not-null constraint SELECT * FROM serialTest; f1 | f2 diff --git a/src/test/regress/expected/temp.out b/src/test/regress/expected/temp.out index f88bfeb641..650f5f704e 100644 --- a/src/test/regress/expected/temp.out +++ b/src/test/regress/expected/temp.out @@ -81,4 +81,4 @@ SELECT * FROM temptest; ERROR: relation "temptest" does not exist -- ON COMMIT is only allowed for TEMP CREATE TABLE temptest(col int) ON COMMIT DELETE ROWS; -ERROR: ON COMMIT can only be used on TEMP tables +ERROR: ON COMMIT can only be used on temporary tables diff --git a/src/test/regress/expected/timestamp.out b/src/test/regress/expected/timestamp.out index 2ea2371c68..f037d576ec 100644 --- a/src/test/regress/expected/timestamp.out +++ b/src/test/regress/expected/timestamp.out @@ -11,7 +11,7 @@ CREATE TABLE TIMESTAMP_TBL ( d1 timestamp(2) without time zone); -- statements. INSERT INTO TIMESTAMP_TBL VALUES ('now'); INSERT INTO TIMESTAMP_TBL VALUES ('current'); -ERROR: "current" is no longer supported +ERROR: date/time value "current" is no longer supported INSERT INTO TIMESTAMP_TBL VALUES ('today'); INSERT INTO TIMESTAMP_TBL VALUES ('yesterday'); INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow'); @@ -60,13 +60,13 @@ INSERT INTO TIMESTAMP_TBL VALUES ('infinity'); INSERT INTO TIMESTAMP_TBL VALUES ('epoch'); -- Obsolete special values INSERT INTO TIMESTAMP_TBL VALUES ('invalid'); -ERROR: "invalid" is no longer supported +ERROR: date/time value "invalid" is no longer supported -- Postgres v6.0 standard output format INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST'); INSERT INTO TIMESTAMP_TBL VALUES ('Invalid Abstime'); -ERROR: "Invalid Abstime" is no longer supported +ERROR: date/time value "Invalid Abstime" is no longer supported INSERT INTO TIMESTAMP_TBL VALUES ('Undefined Abstime'); -ERROR: "Undefined Abstime" is no longer supported +ERROR: date/time value "Undefined Abstime" is no longer supported -- Variations on Postgres v6.1 standard output format INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01.000001 1997 PST'); INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01.999999 1997 PST'); diff --git a/src/test/regress/expected/timestamptz.out b/src/test/regress/expected/timestamptz.out index 9214ae76e8..3453c49d77 100644 --- a/src/test/regress/expected/timestamptz.out +++ b/src/test/regress/expected/timestamptz.out @@ -6,7 +6,7 @@ SET australian_timezones = 'off'; CREATE TABLE TIMESTAMPTZ_TBL ( d1 timestamp(2) with time zone); INSERT INTO TIMESTAMPTZ_TBL VALUES ('now'); INSERT INTO TIMESTAMPTZ_TBL VALUES ('current'); -ERROR: "current" is no longer supported +ERROR: date/time value "current" is no longer supported INSERT INTO TIMESTAMPTZ_TBL VALUES ('today'); INSERT INTO TIMESTAMPTZ_TBL VALUES ('yesterday'); INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow'); @@ -55,13 +55,13 @@ INSERT INTO TIMESTAMPTZ_TBL VALUES ('infinity'); INSERT INTO TIMESTAMPTZ_TBL VALUES ('epoch'); -- Obsolete special values INSERT INTO TIMESTAMPTZ_TBL VALUES ('invalid'); -ERROR: "invalid" is no longer supported +ERROR: date/time value "invalid" is no longer supported -- Postgres v6.0 standard output format INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST'); INSERT INTO TIMESTAMPTZ_TBL VALUES ('Invalid Abstime'); -ERROR: "Invalid Abstime" is no longer supported +ERROR: date/time value "Invalid Abstime" is no longer supported INSERT INTO TIMESTAMPTZ_TBL VALUES ('Undefined Abstime'); -ERROR: "Undefined Abstime" is no longer supported +ERROR: date/time value "Undefined Abstime" is no longer supported -- Variations on Postgres v6.1 standard output format INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.000001 1997 PST'); INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.999999 1997 PST'); diff --git a/src/test/regress/expected/tinterval.out b/src/test/regress/expected/tinterval.out index 3d4a2bee26..3cb215a470 100644 --- a/src/test/regress/expected/tinterval.out +++ b/src/test/regress/expected/tinterval.out @@ -17,10 +17,10 @@ INSERT INTO TINTERVAL_TBL (f1) -- badly formatted tintervals INSERT INTO TINTERVAL_TBL (f1) VALUES ('["bad time specifications" ""]'); -ERROR: invalid input syntax for abstime: "bad time specifications" +ERROR: invalid input syntax for type abstime: "bad time specifications" INSERT INTO TINTERVAL_TBL (f1) VALUES ('["" "infinity"]'); -ERROR: invalid input syntax for abstime: "" +ERROR: invalid input syntax for type abstime: "" -- test tinterval operators SELECT '' AS five, TINTERVAL_TBL.*; five | f1 diff --git a/src/test/regress/expected/truncate.out b/src/test/regress/expected/truncate.out index 2cd41f83ba..c71c20f3e9 100644 --- a/src/test/regress/expected/truncate.out +++ b/src/test/regress/expected/truncate.out @@ -32,7 +32,7 @@ SELECT * FROM truncate_a; -- Test foreign constraint check CREATE TABLE truncate_b(col1 integer references truncate_a); -NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s) +NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks INSERT INTO truncate_a VALUES (1); SELECT * FROM truncate_a; col1 diff --git a/src/test/regress/expected/union.out b/src/test/regress/expected/union.out index 49a37bc526..b2b94a7894 100644 --- a/src/test/regress/expected/union.out +++ b/src/test/regress/expected/union.out @@ -404,7 +404,7 @@ ORDER BY q2,q1; -- This should fail, because q2 isn't a name of an EXCEPT output column SELECT q1 FROM int8_tbl EXCEPT SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1; -ERROR: attribute "q2" not found +ERROR: column "q2" does not exist -- But this should work: SELECT q1 FROM int8_tbl EXCEPT (((SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1))); q1