Message editing: remove gratuitous variations in message wording, standardize
terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
This commit is contained in:
parent
42013caf64
commit
feb4f44d29
|
@ -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++)
|
||||
|
|
|
@ -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)));
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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))));
|
||||
|
||||
|
|
|
@ -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.")));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)));
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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))));
|
||||
|
||||
|
|
|
@ -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)));
|
||||
|
||||
|
|
|
@ -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))));
|
||||
|
||||
|
|
|
@ -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)));
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.")));
|
||||
|
||||
/*
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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))));
|
||||
|
||||
/*
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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))));
|
||||
}
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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))));
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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.")));
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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... */
|
||||
}
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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")));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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")));
|
||||
}
|
||||
;
|
||||
|
||||
|
|
|
@ -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)));
|
||||
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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))));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 ...
|
||||
|
|
|
@ -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)));
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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))));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)));
|
||||
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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)));
|
||||
}
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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++] =
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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))))));
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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++;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) ||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.")));
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue