*
*
* 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
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++)
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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
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)));
*
*
* 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
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++)
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));
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 */
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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))));
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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?)
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.")));
}
/*
*
*
* 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
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,
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,
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,
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)));
*
*
* 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
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);
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);
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
*/
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)
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))));
*
*
* 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
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)));
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)));
* 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 $
*
*-------------------------------------------------------------------------
*/
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))));
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)));
* 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 $
*
*-------------------------------------------------------------------------
*/
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:
{
LWLockRelease(ctl->locks->ControlLock);
ereport(LOG,
- (errmsg("could not truncate \"%s\": apparent wraparound",
+ (errmsg("could not truncate directory \"%s\": apparent wraparound",
ctl->Dir)));
return;
}
*
*
* 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:
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)));
}
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
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)));
}
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;
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;
}
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
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
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);
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);
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
{
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)));
}
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);
}
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);
}
{
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;
}
{
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;
}
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;
}
{
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;
}
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);
}
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);
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
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);
}
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;
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;
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;
}
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;
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;
}
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
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
*
*
* 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
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')
{
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')
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))));
}
}
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)));
}
}
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)));
/*
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
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.
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...
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.
*
*
* 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
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
* 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 $
*
*-------------------------------------------------------------------------
*/
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();
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
!(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));
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);
!(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.")));
/*
*
*
* 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.
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,
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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 */
*
*
* 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
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))));
/*
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
/* 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;
/* 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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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))));
}
/* 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")));
}
}
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);
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
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 */
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);
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);
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);
}
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 */
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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))
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);
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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
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
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 */
#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)));
}
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);
{
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;
}
}
*
*
* 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
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)));
/*
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);
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),
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;
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,
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;
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 */
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)));
}
}
* 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 $
*
*-------------------------------------------------------------------------
*/
{
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))));
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
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;
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;
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 */
if (new->increment_by == 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("cannot increment by zero")));
+ errmsg("INCREMENT must not be zero")));
}
/* MAXVALUE */
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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
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;
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
if (strcmp(coldef->colname, restdef->colname) == 0)
ereport(ERROR,
(errcode(ERRCODE_DUPLICATE_COLUMN),
- errmsg("attribute \"%s\" duplicated",
+ errmsg("column \"%s\" duplicated",
coldef->colname)));
}
}
* 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),
* 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),
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.")));
}
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)));
}
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);
if (attnum < 0)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("cannot rename system attribute \"%s\"",
+ errmsg("cannot rename system column \"%s\"",
oldattname)));
/*
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 */
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);
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")));
}
/*
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;
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)));
/*
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)));
}
}
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)));
/*
if (isnull)
ereport(ERROR,
(errcode(ERRCODE_NOT_NULL_VIOLATION),
- errmsg("attribute \"%s\" contains NULL values",
+ errmsg("column \"%s\" contains null values",
colName)));
}
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)));
/*
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)));
/*
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))));
}
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 */
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 */
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)));
/*
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))));
/*
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
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
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++)
{
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))));
/*
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);
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)
{
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))));
}
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))));
}
* 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 $
*
*-------------------------------------------------------------------------
*/
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:
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))));
}
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()))
{
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))));
}
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);
*
*
* 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
{
/* 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);
{
/* 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)
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)
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))));
}
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);
{
/* 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);
{
/* 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);
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);
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))));
}
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
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...
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.
* 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 $
*
*-------------------------------------------------------------------------
*/
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
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')
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);
/*
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);
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
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);
/*
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);
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)
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);
if (sysid <= 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("group id must be positive")));
+ errmsg("group ID must be positive")));
havesysid = true;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
(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();
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();
}
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",
* 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",
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),
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.")));
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,
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.")));
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
}
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",
}
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",
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),
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,
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
if (interactive)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("invalid list syntax for datestyle")));
+ errmsg("invalid list syntax for parameter \"datestyle\"")));
return NULL;
}
if (interactive)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("unrecognized datestyle keyword: \"%s\"",
+ errmsg("unrecognized \"datestyle\" key word: \"%s\"",
tok)));
ok = false;
break;
if (interactive)
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("conflicting datestyle specifications")));
+ errmsg("conflicting \"datestyle\" specifications")));
return NULL;
}
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;
}
{
ereport(interactive ? ERROR : LOG,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("unrecognized timezone name: \"%s\"",
+ errmsg("unrecognized time zone name: \"%s\"",
value)));
return NULL;
}
{
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;
}
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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.
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... */
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
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))));
}
}
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)));
}
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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,
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,
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;
}
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
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));
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:
!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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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))));
}
{
if (es->qd)
{
- errcontext("SQL function \"%s\" query %d",
+ errcontext("SQL function \"%s\" statement %d",
fn_name, query_num);
break;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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")));
}
/*
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
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);
}
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
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
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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 =
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",
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
/*
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;
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
{
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 */
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;
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);
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\"",
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;
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);
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;
}
{
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 */
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)
{
|| 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;
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;
if (retval != PAM_SUCCESS)
{
ereport(LOG,
- (errmsg("failed to release PAM authenticator: %s",
+ (errmsg("could not release PAM authenticator: %s",
pam_strerror(pamh, retval))));
}
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 */
}
*
*
* 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
{
/* 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;
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);
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
{
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 = '/';
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);
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);
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);
{
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)
{
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
{
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;
}
{
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;
{
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;
{
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;
/* 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;
}
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;
}
/* 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;
}
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;
}
{
ereport(LOG,
(errcode_for_socket_access(),
- errmsg("could not receive credentials: %m")));
+ errmsg("could not get peer credentials: %m")));
return false;
}
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;
}
#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
* 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 $
*
*-------------------------------------------------------------------------
*/
{
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,
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.",
{
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;
}
{
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;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
{
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);
}
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);
}
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);
}
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);
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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 */
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
*/
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",
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;
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 */
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)
{
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
*/
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",
* 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 $
*
*-------------------------------------------------------------------------
*/
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)));
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;
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;
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;
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++)
{
{
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 */
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
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);
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
((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 ||
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;
*
*
* 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
{
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
*/
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;
}
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)
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*/
{
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
{
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")));
}
;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)));
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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.
* 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
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")));
}
/*
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)));
}
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 */
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);
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)));
}
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)));
}
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)));
}
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));
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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))));
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))));
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))));
}
/* 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))));
/* 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\"")));
}
/*
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;
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;
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;
}
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;
}
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;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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))
{
((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")));
}
/*
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);
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)
{
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))));
}
else
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_COLUMN),
- errmsg("attribute \"%s\" not found", name)));
+ errmsg("column \"%s\" does not exist", name)));
}
break;
}
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))));
}
}
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))));
}
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
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))));
}
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),
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.")));
}
/*
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;
}
/*
- * 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,
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)));
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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.")));
}
/*
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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
{
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);
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;
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;
/* 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 */
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)));
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;
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);
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
*
* 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"
{
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;
}
{
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;
}
{
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;
}
{
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;
}
{
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;
}
/* 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);
}
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);
continue;
ereport(LOG,
(errcode_for_socket_access(),
- errmsg("select failed in statistics collector: %m")));
+ errmsg("select() failed in statistics collector: %m")));
exit(1);
}
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! */
{
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);
}
continue;
ereport(LOG,
(errcode_for_socket_access(),
- errmsg("select failed in statistics buffer: %m")));
+ errmsg("select() failed in statistics buffer: %m")));
exit(1);
}
{
ereport(LOG,
(errcode_for_socket_access(),
- errmsg("failed to read statistics message: %m")));
+ errmsg("could not read statistics message: %m")));
exit(1);
}
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 */
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;
}
{
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;
}
{
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
{
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)));
}
}
HASH_REMOVE, NULL) == NULL)
{
ereport(LOG,
- (errmsg("dead-backend hash table corrupted "
+ (errmsg("dead-server-process hash table corrupted "
"during cleanup --- abort")));
exit(1);
}
*
*
* 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
*
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);
}
default:
fprintf(stderr,
- gettext("Try '%s --help' for more information.\n"),
+ gettext("Try \"%s --help\" for more information.\n"),
progname);
ExitPostmaster(1);
}
{
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);
}
#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)
ListenSocket, MAXLISTEN);
if (status != STATUS_OK)
ereport(FATAL,
- (errmsg("could not create UNIX stream port")));
+ (errmsg("could not create Unix-domain socket")));
#endif
XLOGPathInit();
#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);
}
continue;
ereport(LOG,
(errcode_for_socket_access(),
- errmsg("select failed in postmaster: %m")));
+ errmsg("select() failed in postmaster: %m")));
return STATUS_ERROR;
}
* 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,
* 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,
* 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)));
}
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;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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, ...
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
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);
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,
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 ...
* 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 $
*
*-------------------------------------------------------------------------
*/
((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)));
/*
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)));
/*
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
{
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))));
}
}
* 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:
*
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)));
* 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:
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)));
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
*
*
* 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:
*
{
/* 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,
{
/* 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,
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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 */
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.")));
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;
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;
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;
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;
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;
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)));
}
*
*
* 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.
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.
*
*
* 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
/* 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
/* 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;
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 */
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")));
}
/*
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);
}
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 */
*/
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
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");
}
/*
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
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);
* 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 $
*
*-------------------------------------------------------------------------
*/
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),
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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? */
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)
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)
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)
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)
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++] =
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
* 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"
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
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);
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);
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))))));
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))))));
{
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;
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);
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))))));
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))))));
{
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))))));
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))))));
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
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;
(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,
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;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
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;
*/
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for bytea")));
+ errmsg("invalid input syntax for type bytea")));
}
len++;
*/
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for bytea")));
+ errmsg("invalid input syntax for type bytea")));
}
len++;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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 */
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 */
}
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
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)));
}
/*
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
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);
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);
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
|| (*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)
|| (*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
#else
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("line not yet implemented")));
+ errmsg("type \"line\" not yet implemented")));
result = NULL;
#endif
{
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("line not yet implemented")));
+ errmsg("type \"line\" not yet implemented")));
return 0;
}
{
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("line not yet implemented")));
+ errmsg("type \"line\" not yet implemented")));
return 0;
}
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))
&& (!((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);
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));
|| (*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]);
/* 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();
}
/* 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();
}
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 */
|| (*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);
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("poly_distance not implemented")));
+ errmsg("function \"poly_distance\" not implemented")));
PG_RETURN_NULL();
}
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("path_center not implemented")));
+ errmsg("function \"path_center\" not implemented")));
PG_RETURN_NULL();
}
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++;
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)
{
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);
}
* 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 $
*
*-------------------------------------------------------------------------
*/
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 */
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;
/*
* 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"
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) ||
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)));
}
}
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])));
}
}
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;
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;
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)
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;
/*
* 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
*/
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)));
/*
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.")));
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
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++;
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;
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++;
}
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;
}
/* 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)));
}
/* 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)));
}
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 */
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
)
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)
{
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)));
}
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;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.81 2003/08/04 02:40:05 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.82 2003/09/25 06:58:04 petere Exp $
*
*-------------------------------------------------------------------------
*/
if (matches == 0)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_FUNCTION),
- errmsg("no procedure with name %s", pro_name_or_oid)));
+ errmsg("function \"%s\" does not exist", pro_name_or_oid)));
else if (matches > 1)
ereport(ERROR,
(errcode(ERRCODE_AMBIGUOUS_FUNCTION),
- errmsg("more than one procedure named %s",
+ errmsg("more than one function named \"%s\"",
pro_name_or_oid)));
PG_RETURN_OID(result);
if (clist == NULL)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_FUNCTION),
- errmsg("no procedure with name %s", pro_name_or_oid)));
+ errmsg("function \"%s\" does not exist", pro_name_or_oid)));
else if (clist->next != NULL)
ereport(ERROR,
(errcode(ERRCODE_AMBIGUOUS_FUNCTION),
- errmsg("more than one procedure named %s",
+ errmsg("more than one function named \"%s\"",
pro_name_or_oid)));
result = clist->oid;
if (clist == NULL)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_FUNCTION),
- errmsg("no procedure with name %s", pro_name_or_oid)));
+ errmsg("function \"%s\" does not exist", pro_name_or_oid)));
result = clist->oid;
if (matches == 0)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_FUNCTION),
- errmsg("no operator with name %s", opr_name_or_oid)));
+ errmsg("operator does not exist: %s", opr_name_or_oid)));
else if (matches > 1)
ereport(ERROR,
(errcode(ERRCODE_AMBIGUOUS_FUNCTION),
if (clist == NULL)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_FUNCTION),
- errmsg("no operator with name %s", opr_name_or_oid)));
+ errmsg("operator does not exist: %s", opr_name_or_oid)));
else if (clist->next != NULL)
ereport(ERROR,
(errcode(ERRCODE_AMBIGUOUS_FUNCTION),
if (clist == NULL)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_FUNCTION),
- errmsg("no operator with name %s", opr_name_or_oid)));
+ errmsg("operator does not exist: %s", opr_name_or_oid)));
result = clist->oid;
else
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_TABLE),
- errmsg("no class with name %s", class_name_or_oid)));
+ errmsg("relation \"%s\" does not exist", class_name_or_oid)));
/* We assume there can be only one match */
else
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("no type with name %s", typ_name_or_oid)));
+ errmsg("type \"%s\" does not exist", typ_name_or_oid)));
/* We assume there can be only one match */
*
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.56 2003/09/09 23:22:21 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.57 2003/09/25 06:58:04 petere Exp $
*
* ----------
*/
*/
ereport(ERROR,
(errcode(ERRCODE_FOREIGN_KEY_VIOLATION),
- errmsg("insert or update on \"%s\" violates foreign key constraint \"%s\"",
+ errmsg("insert or update on table \"%s\" violates foreign key constraint \"%s\"",
RelationGetRelationName(trigdata->tg_relation),
tgargs[RI_CONSTRAINT_NAME_ARGNO]),
- errdetail("MATCH FULL does not allow mixing of NULL and non-NULL key values.")));
+ errdetail("MATCH FULL does not allow mixing of null and nonnull key values.")));
heap_close(pk_rel, RowShareLock);
return PointerGetDatum(NULL);
(tgnargs % 2) != 0)
ereport(ERROR,
(errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
- errmsg("%s() called with wrong number of trigger arguments",
+ errmsg("function \"%s\" called with wrong number of trigger arguments",
"RI_FKey_keyequal_upd")));
/*
if (!OidIsValid(trigdata->tg_trigger->tgconstrrelid))
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("no target table given for trigger \"%s\" on \"%s\"",
+ errmsg("no target table given for trigger \"%s\" on table \"%s\"",
trigdata->tg_trigger->tgname,
RelationGetRelationName(trigdata->tg_relation)),
- errhint("Remove this RI trigger and its mates, then do ALTER TABLE ADD CONSTRAINT.")));
+ errhint("Remove this referential integrity trigger and its mates, then do ALTER TABLE ADD CONSTRAINT.")));
fk_rel = heap_open(trigdata->tg_trigger->tgconstrrelid, AccessShareLock);
pk_rel = trigdata->tg_relation;
if (fno == SPI_ERROR_NOATTRIBUTE)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_COLUMN),
- errmsg("table \"%s\" does not have attribute \"%s\" referenced by constraint \"%s\"",
+ errmsg("table \"%s\" does not have column \"%s\" referenced by constraint \"%s\"",
RelationGetRelationName(fk_rel),
argv[j],
argv[RI_CONSTRAINT_NAME_ARGNO])));
if (fno == SPI_ERROR_NOATTRIBUTE)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_COLUMN),
- errmsg("table \"%s\" does not have attribute \"%s\" referenced by constraint \"%s\"",
+ errmsg("table \"%s\" does not have column \"%s\" referenced by constraint \"%s\"",
RelationGetRelationName(pk_rel),
argv[j + 1],
argv[RI_CONSTRAINT_NAME_ARGNO])));
if (!CALLED_AS_TRIGGER(fcinfo))
ereport(ERROR,
(errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
- errmsg("%s() was not fired by trigger manager", funcname)));
+ errmsg("function \"%s\" was not called by trigger manager", funcname)));
/*
* Check proper event
!TRIGGER_FIRED_FOR_ROW(trigdata->tg_event))
ereport(ERROR,
(errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
- errmsg("%s() must be fired AFTER ROW", funcname)));
+ errmsg("function \"%s\" must be fired AFTER ROW", funcname)));
switch (tgkind)
{
if (!TRIGGER_FIRED_BY_INSERT(trigdata->tg_event))
ereport(ERROR,
(errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
- errmsg("%s() must be fired for INSERT", funcname)));
+ errmsg("function \"%s\" must be fired for INSERT", funcname)));
break;
case RI_TRIGTYPE_UPDATE:
if (!TRIGGER_FIRED_BY_UPDATE(trigdata->tg_event))
ereport(ERROR,
(errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
- errmsg("%s() must be fired for UPDATE", funcname)));
+ errmsg("function \"%s\" must be fired for UPDATE", funcname)));
break;
case RI_TRIGTYPE_INUP:
if (!TRIGGER_FIRED_BY_INSERT(trigdata->tg_event) &&
!TRIGGER_FIRED_BY_UPDATE(trigdata->tg_event))
ereport(ERROR,
(errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
- errmsg("%s() must be fired for INSERT or UPDATE",
+ errmsg("function \"%s\" must be fired for INSERT or UPDATE",
funcname)));
break;
case RI_TRIGTYPE_DELETE:
if (!TRIGGER_FIRED_BY_DELETE(trigdata->tg_event))
ereport(ERROR,
(errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
- errmsg("%s() must be fired for DELETE", funcname)));
+ errmsg("function \"%s\" must be fired for DELETE", funcname)));
break;
}
(tgnargs % 2) != 0)
ereport(ERROR,
(errcode(ERRCODE_E_R_I_E_TRIGGER_PROTOCOL_VIOLATED),
- errmsg("%s() called with wrong number of trigger arguments",
+ errmsg("function \"%s\" called with wrong number of trigger arguments",
funcname)));
/*
if (!OidIsValid(trigdata->tg_trigger->tgconstrrelid))
ereport(ERROR,
(errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
- errmsg("no target table given for trigger \"%s\" on \"%s\"",
+ errmsg("no target table given for trigger \"%s\" on table \"%s\"",
trigdata->tg_trigger->tgname,
RelationGetRelationName(trigdata->tg_relation)),
errhint("Remove this RI trigger and its mates, then do ALTER TABLE ADD CONSTRAINT.")));
{
ereport(ERROR,
(errcode(ERRCODE_FOREIGN_KEY_VIOLATION),
- errmsg("insert or update on \"%s\" violates foreign key constraint \"%s\"",
+ errmsg("insert or update on table \"%s\" violates foreign key constraint \"%s\"",
RelationGetRelationName(fk_rel), constrname),
errdetail("No rows were found in \"%s\".",
RelationGetRelationName(pk_rel))));
if (onfk)
ereport(ERROR,
(errcode(ERRCODE_FOREIGN_KEY_VIOLATION),
- errmsg("insert or update on \"%s\" violates foreign key constraint \"%s\"",
+ errmsg("insert or update on table \"%s\" violates foreign key constraint \"%s\"",
RelationGetRelationName(fk_rel), constrname),
- errdetail("Key (%s)=(%s) is not present in \"%s\".",
+ errdetail("Key (%s)=(%s) is not present in table \"%s\".",
key_names, key_values,
RelationGetRelationName(pk_rel))));
else
errmsg("update or delete on \"%s\" violates foreign key constraint \"%s\" on \"%s\"",
RelationGetRelationName(pk_rel),
constrname, RelationGetRelationName(fk_rel)),
- errdetail("Key (%s)=(%s) is still referenced from \"%s\".",
+ errdetail("Key (%s)=(%s) is still referenced from table \"%s\".",
key_names, key_values,
RelationGetRelationName(fk_rel))));
}
if (fno == SPI_ERROR_NOATTRIBUTE)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_COLUMN),
- errmsg("table \"%s\" does not have attribute \"%s\" referenced by constraint \"%s\"",
+ errmsg("table \"%s\" does not have column \"%s\" referenced by constraint \"%s\"",
RelationGetRelationName(pk_rel),
argv[j],
argv[RI_CONSTRAINT_NAME_ARGNO])));
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.145 2003/08/08 21:42:10 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.146 2003/09/25 06:58:04 petere Exp $
*
*-------------------------------------------------------------------------
*/
if (typeid == BYTEAOID)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("regex matching not supported on type bytea")));
+ errmsg("regular-expression matching not supported on type bytea")));
/* the right-hand const is type text for all of these */
patt = DatumGetCString(DirectFunctionCall1(textout, patt_const->constvalue));
if (typeid == BYTEAOID)
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("regex matching not supported on type bytea")));
+ errmsg("regular-expression matching not supported on type bytea")));
/* the right-hand const is type text for all of these */
patt = DatumGetCString(DirectFunctionCall1(textout, patt_const->constvalue));
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.40 2003/08/11 20:46:46 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/tid.c,v 1.41 2003/09/25 06:58:04 petere Exp $
*
* NOTES
* input routine largely stolen from boxin().
if (i < NTIDARGS)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for tid: \"%s\"",
+ errmsg("invalid input syntax for type tid: \"%s\"",
str)));
errno = 0;
if (errno || *badp != DELIM)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for tid: \"%s\"",
+ errmsg("invalid input syntax for type tid: \"%s\"",
str)));
hold_offset = strtol(coord[1], &badp, 10);
hold_offset > USHRT_MAX || hold_offset < 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for tid: \"%s\"",
+ errmsg("invalid input syntax for type tid: \"%s\"",
str)));
offsetNumber = hold_offset;
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.94 2003/08/27 23:29:29 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.95 2003/09/25 06:58:04 petere Exp $
*
*-------------------------------------------------------------------------
*/
case DTK_INVALID:
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("\"%s\" is no longer supported", str)));
+ errmsg("date/time value \"%s\" is no longer supported", str)));
TIMESTAMP_NOEND(result);
break;
case DTK_INVALID:
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("\"%s\" is no longer supported", str)));
+ errmsg("date/time value \"%s\" is no longer supported", str)));
TIMESTAMP_NOEND(result);
break;
case DTK_INVALID:
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("\"%s\" is no longer supported", str)));
+ errmsg("date/time value \"%s\" is no longer supported", str)));
break;
default:
{
ereport(ERROR,
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
- errmsg("cannot subtract non-finite timestamps")));
+ errmsg("cannot subtract infinite timestamps")));
result->time = 0;
}
if (VARSIZE(str) - VARHDRSZ > MAXDATELEN)
ereport(ERROR,
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
- errmsg("invalid input syntax for timestamp: \"%s\"",
+ errmsg("invalid input syntax for type timestamp: \"%s\"",
DatumGetCString(DirectFunctionCall1(textout,
PointerGetDatum(str))))));
if (VARSIZE(str) - VARHDRSZ > MAXDATELEN)
ereport(ERROR,
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
- errmsg("invalid input syntax for timestamp with time zone: \"%s\"",
+ errmsg("invalid input syntax for type timestamp with time zone: \"%s\"",
DatumGetCString(DirectFunctionCall1(textout,
PointerGetDatum(str))))));
if (VARSIZE(str) - VARHDRSZ > MAXDATELEN)
ereport(ERROR,
(errcode(ERRCODE_INVALID_DATETIME_FORMAT),
- errmsg("invalid input syntax for interval: \"%s\"",
+ errmsg("invalid input syntax for type interval: \"%s\"",
DatumGetCString(DirectFunctionCall1(textout,
PointerGetDatum(str))))));
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.36 2003/09/15 20:03:37 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varbit.c,v 1.37 2003/09/25 06:58:05 petere Exp $
*
*-------------------------------------------------------------------------
*/
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("\"%c\" is not a valid hex digit",
+ errmsg("\"%c\" is not a valid hexadecimal digit",
*sp)));
if (bc)
else
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("\"%c\" is not a valid hex digit",
+ errmsg("\"%c\" is not a valid hexadecimal digit",
*sp)));
if (bc)
#else
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("int64 is not supported on this platform")));
+ errmsg("64-bit integers not supported on this platform")));
PG_RETURN_NULL();
#endif
#else
ereport(ERROR,
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
- errmsg("int64 is not supported on this platform")));
+ errmsg("64-bit integers not supported on this platform")));
PG_RETURN_NULL();
#endif
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.105 2003/08/04 04:03:10 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.106 2003/09/25 06:58:05 petere Exp $
*
*-------------------------------------------------------------------------
*/
*/
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for bytea")));
+ errmsg("invalid input syntax for type bytea")));
}
}
*/
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
- errmsg("invalid input syntax for bytea")));
+ errmsg("invalid input syntax for type bytea")));
}
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.189 2003/09/24 18:54:01 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.190 2003/09/25 06:58:05 petere Exp $
*
*-------------------------------------------------------------------------
*/
*/
ereport(WARNING,
(errcode_for_file_access(),
- errmsg("could not create init file \"%s\": %m",
+ errmsg("could not create relation-cache initialization file \"%s\": %m",
tempfilename),
errdetail("Continuing anyway, but there's something wrong.")));
return;
{
ereport(WARNING,
(errcode_for_file_access(),
- errmsg("could not rename init file \"%s\" to \"%s\": %m",
+ errmsg("could not rename relation-cache initialization file \"%s\" to \"%s\": %m",
tempfilename, finalfilename),
errdetail("Continuing anyway, but there's something wrong.")));
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.122 2003/09/03 15:49:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.123 2003/09/25 06:58:05 petere Exp $
*
*-------------------------------------------------------------------------
*/
0666)) < 0)
ereport(FATAL,
(errcode_for_file_access(),
- errmsg("failed to open \"%s\": %m", OutputFileName)));
+ errmsg("could not open file \"%s\": %m", OutputFileName)));
istty = isatty(fd);
close(fd);
if (!freopen(OutputFileName, "a", stderr))
ereport(FATAL,
(errcode_for_file_access(),
- errmsg("failed to reopen \"%s\" as stderr: %m",
+ errmsg("could not reopen file \"%s\" as stderr: %m",
OutputFileName)));
/*
if (!freopen(OutputFileName, "a", stdout))
ereport(FATAL,
(errcode_for_file_access(),
- errmsg("failed to reopen \"%s\" as stdout: %m",
+ errmsg("could not reopen file \"%s\" as stdout: %m",
OutputFileName)));
}
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.65 2003/09/07 02:18:01 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.66 2003/09/25 06:58:05 petere Exp $
*
*-------------------------------------------------------------------------
*/
if (len == 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_NAME),
- errmsg("zero-length component in DYNAMIC_LIBRARY_PATH")));
+ errmsg("zero-length component in parameter \"dynamic_library_path\"")));
piece = palloc(len + 1);
strncpy(piece, p, len);
if (!is_absolute_path(mangled))
ereport(ERROR,
(errcode(ERRCODE_INVALID_NAME),
- errmsg("DYNAMIC_LIBRARY_PATH component is not absolute")));
+ errmsg("component in parameter \"dynamic_library_path\" is not an absolute path")));
full = palloc(strlen(mangled) + 1 + baselen + 1);
sprintf(full, "%s/%s", mangled, basename);
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.75 2003/08/04 02:40:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.76 2003/09/25 06:58:05 petere Exp $
*
*-------------------------------------------------------------------------
*/
if (fbp == NULL)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_FUNCTION),
- errmsg("internal function \"%s\" is not in table",
+ errmsg("internal function \"%s\" is not in internal lookup table",
prosrc)));
pfree(prosrc);
/* Should we check that nargs, strict, retset match the table? */
*/
ereport(ERROR,
(errcode(ERRCODE_TOO_MANY_ARGUMENTS),
- errmsg("function %u has too many arguments (%d > %d)",
+ errmsg("function %u has too many arguments (%d, maximum is %d)",
fcinfo->flinfo->fn_oid, n_arguments, 16)));
returnValue = NULL; /* keep compiler quiet */
break;
if (n_arguments > FUNC_MAX_ARGS)
ereport(ERROR,
(errcode(ERRCODE_TOO_MANY_ARGUMENTS),
- errmsg("function %u has too many arguments (%d > %d)",
+ errmsg("function %u has too many arguments (%d, maximum is %d)",
flinfo.fn_oid, n_arguments, FUNC_MAX_ARGS)));
va_start(pvar, procedureId);
for (i = 0; i < n_arguments; i++)
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.114 2003/09/24 18:54:01 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.115 2003/09/25 06:58:05 petere Exp $
*
*-------------------------------------------------------------------------
*/
if (!HeapTupleIsValid(tuple))
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("invalid user id: %d", userid)));
+ errmsg("invalid user ID: %d", userid)));
result = pstrdup(NameStr(((Form_pg_shadow) GETSTRUCT(tuple))->usename));
errmsg("lock file \"%s\" already exists",
filename),
isDDLock ?
- errhint("Is another %s (pid %d) running in \"%s\"?",
+ errhint("Is another %s (PID %d) running in data directory \"%s\"?",
(encoded_pid < 0 ? "postgres" : "postmaster"),
(int) other_pid, refName) :
- errhint("Is another %s (pid %d) using \"%s\"?",
+ errhint("Is another %s (PID %d) using socket file \"%s\"?",
(encoded_pid < 0 ? "postgres" : "postmaster"),
(int) other_pid, refName)));
}
ereport(FATAL,
(errcode(ERRCODE_LOCK_FILE_EXISTS),
errmsg("pre-existing shared memory block "
- "(key %lu, id %lu) is still in use",
+ "(key %lu, ID %lu) is still in use",
id1, id2),
errhint("If you're sure there are no old "
- "backends still running, remove "
+ "server processes still running, remove "
"the shared memory block with "
- "ipcrm(1), or just delete \"%s\".",
+ "the command \"ipcrm\", or just delete the file \"%s\".",
filename)));
}
}
errmsg("could not remove old lock file \"%s\": %m",
filename),
errhint("The file seems accidentally left over, but "
- "I couldn't remove it. Please remove the file "
+ "it could not be removed. Please remove the file "
"by hand and try again.")));
}
{
ereport(LOG,
(errcode_for_file_access(),
- errmsg("could not rewrite \"%s\": %m",
+ errmsg("could not open file \"%s\": %m",
directoryLockFile)));
return;
}
{
ereport(LOG,
(errcode_for_file_access(),
- errmsg("could not read \"%s\": %m",
+ errmsg("could not read from file \"%s\": %m",
directoryLockFile)));
close(fd);
return;
errno = ENOSPC;
ereport(LOG,
(errcode_for_file_access(),
- errmsg("could not write \"%s\": %m",
+ errmsg("could not write to file \"%s\": %m",
directoryLockFile)));
close(fd);
return;
freeList(elemlist);
ereport(LOG,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("invalid list syntax for preload_libraries configuration option")));
+ errmsg("invalid list syntax for parameter \"preload_libraries\"")));
return;
}
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.126 2003/08/04 02:40:06 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.127 2003/09/25 06:58:05 petere Exp $
*
*
*-------------------------------------------------------------------------
ereport(WARNING,
(errcode(ERRCODE_UNDEFINED_OBJECT),
errmsg("no users are defined in this database system"),
- errhint("You should immediately run 'CREATE USER \"%s\" WITH SYSID %d CREATEUSER;'.",
+ errhint("You should immediately run CREATE USER \"%s\" WITH SYSID %d CREATEUSER;.",
username, BOOTSTRAP_USESYSID)));
}
else
* (currently mule internal code (mic) is used)
* Tatsuo Ishii
*
- * $Header: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v 1.43 2003/08/04 00:43:27 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/mb/mbutils.c,v 1.44 2003/09/25 06:58:05 petere Exp $
*/
#include "postgres.h"
{
ereport(LOG,
(errcode(ERRCODE_UNDEFINED_FUNCTION),
- errmsg("default conversion proc for %s to %s does not exist",
+ errmsg("default conversion function for encoding \"%s\" to \"%s\" does not exist",
pg_encoding_to_char(src_encoding),
pg_encoding_to_char(dest_encoding))));
return src;
/*
* conversion functions between pg_wchar and multibyte streams.
* Tatsuo Ishii
- * $Id: wchar.c,v 1.33 2003/08/04 00:43:27 momjian Exp $
+ * $Id: wchar.c,v 1.34 2003/09/25 06:58:05 petere Exp $
*
* WIN1250 client encoding updated by Pavel Behal
*
return false;
ereport(ERROR,
(errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE),
- errmsg("UNICODE characters >= 0x10000 are not supported")));
+ errmsg("Unicode characters greater than or equal to 0x10000 are not supported")));
}
l = pg_mblen(mbstr);
ereport(ERROR,
(errcode(ERRCODE_CHARACTER_NOT_IN_REPERTOIRE),
- errmsg("invalid %s character sequence: 0x%s",
+ errmsg("invalid byte sequence for encoding \"%s\": 0x%s",
GetDatabaseEncodingName(), buf)));
}
}
}
#endif
+
+
+
*
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v 1.18 2003/08/04 23:59:39 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v 1.19 2003/09/25 06:58:05 petere Exp $
*/
%{
if (errno != ENOENT)
ereport(elevel,
(errcode_for_file_access(),
- errmsg("could not read configuration file \"" CONFIG_FILENAME "\": %m")));
+ errmsg("could not open configuration file \"%s\": %m", CONFIG_FILENAME)));
return;
}
free_name_value_list(head);
ereport(elevel,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("syntax error in \"" CONFIG_FILENAME "\" line %u, near token \"%s\"",
- ConfigFileLineno, yytext)));
+ errmsg("syntax error in file \"%s\" line %u, near token \"%s\"",
+ CONFIG_FILENAME, ConfigFileLineno, yytext)));
return;
out_of_memory:
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.158 2003/09/15 22:28:58 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.159 2003/09/25 06:58:05 petere Exp $
*
*--------------------------------------------------------------------
*/
/* UNGROUPED */
gettext_noop("Ungrouped"),
/* CONN_AUTH */
- gettext_noop("Connections & Authentication"),
+ gettext_noop("Connections and Authentication"),
/* CONN_AUTH_SETTINGS */
- gettext_noop("Connections & Authentication / Connection Settings"),
+ gettext_noop("Connections and Authentication / Connection Settings"),
/* CONN_AUTH_SECURITY */
- gettext_noop("Connections & Authentication / Security & Authentication"),
+ gettext_noop("Connections and Authentication / Security and Authentication"),
/* RESOURCES */
gettext_noop("Resource Usage"),
/* RESOURCES_MEM */
/* RESOURCES_KERNEL */
gettext_noop("Resource Usage / Kernel Resources"),
/* WAL */
- gettext_noop("Write Ahead Log"),
+ gettext_noop("Write-Ahead Log"),
/* WAL_SETTINGS */
- gettext_noop("Write Ahead Log / Settings"),
+ gettext_noop("Write-Ahead Log / Settings"),
/* WAL_CHECKPOINTS */
- gettext_noop("Write Ahead Log / Checkpoints"),
+ gettext_noop("Write-Ahead Log / Checkpoints"),
/* QUERY_TUNING */
gettext_noop("Query Tuning"),
/* QUERY_TUNING_METHOD */
/* QUERY_TUNING_OTHER */
gettext_noop("Query Tuning / Other Planner Options"),
/* LOGGING */
- gettext_noop("Reporting & Logging"),
+ gettext_noop("Reporting and Logging"),
/* LOGGING_SYSLOG */
- gettext_noop("Reporting & Logging / Syslog"),
+ gettext_noop("Reporting and Logging / Syslog"),
/* LOGGING_WHEN */
- gettext_noop("Reporting & Logging / When To Log"),
+ gettext_noop("Reporting and Logging / When to Log"),
/* LOGGING_WHAT */
- gettext_noop("Reporting & Logging / What To Log"),
+ gettext_noop("Reporting and Logging / What to Log"),
/* STATS */
gettext_noop("Statistics"),
/* STATS_MONITORING */
gettext_noop("Statistics / Monitoring"),
/* STATS_COLLECTOR */
- gettext_noop("Statistics / Query & Index Statistics Collector"),
+ gettext_noop("Statistics / Query and Index Statistics Collector"),
/* CLIENT_CONN */
gettext_noop("Client Connection Defaults"),
/* CLIENT_CONN_STATEMENT */
/* LOCK_MANAGEMENT */
gettext_noop("Lock Management"),
/* COMPAT_OPTIONS */
- gettext_noop("Version & Platform Compatibility"),
+ gettext_noop("Version and Platform Compatibility"),
/* COMPAT_OPTIONS_PREVIOUS */
- gettext_noop("Version & Platform Compatibility / Previous Postgres Versions"),
+ gettext_noop("Version and Platform Compatibility / Previous PostgreSQL Versions"),
/* COMPAT_OPTIONS_CLIENT */
- gettext_noop("Version & Platform Compatibility / Other Platforms & Clients"),
+ gettext_noop("Version and Platform Compatibility / Other Platforms and Clients"),
/* DEVELOPER_OPTIONS */
gettext_noop("Developer Options"),
/* help_config wants this array to be null-terminated */
{
{
{"enable_seqscan", PGC_USERSET, QUERY_TUNING_METHOD,
- gettext_noop("Enable planner's use of sequential-scan plans"),
+ gettext_noop("enable planner's use of sequential-scan plans"),
NULL
},
&enable_seqscan,
},
{
{"enable_indexscan", PGC_USERSET, QUERY_TUNING_METHOD,
- gettext_noop("Enable planner's use of index-scan plans"),
+ gettext_noop("enable planner's use of index-scan plans"),
NULL
},
&enable_indexscan,
},
{
{"enable_tidscan", PGC_USERSET, QUERY_TUNING_METHOD,
- gettext_noop("Enable planner's use of TID scan plans"),
+ gettext_noop("enable planner's use of TID scan plans"),
NULL
},
&enable_tidscan,
},
{
{"enable_sort", PGC_USERSET, QUERY_TUNING_METHOD,
- gettext_noop("Enable planner's use of explicit sort steps"),
+ gettext_noop("enable planner's use of explicit sort steps"),
NULL
},
&enable_sort,
},
{
{"enable_hashagg", PGC_USERSET, QUERY_TUNING_METHOD,
- gettext_noop("Enable planner's use of hashed aggregation plans"),
+ gettext_noop("enable planner's use of hashed aggregation plans"),
NULL
},
&enable_hashagg,
},
{
{"enable_nestloop", PGC_USERSET, QUERY_TUNING_METHOD,
- gettext_noop("Enable planner's use of nested-loop join plans"),
+ gettext_noop("enable planner's use of nested-loop join plans"),
NULL
},
&enable_nestloop,
},
{
{"enable_mergejoin", PGC_USERSET, QUERY_TUNING_METHOD,
- gettext_noop("Enable planner's use of merge join plans"),
+ gettext_noop("enable planner's use of merge join plans"),
NULL
},
&enable_mergejoin,
},
{
{"enable_hashjoin", PGC_USERSET, QUERY_TUNING_METHOD,
- gettext_noop("Enable planner's use of hash join plans"),
+ gettext_noop("enable planner's use of hash join plans"),
NULL
},
&enable_hashjoin,
},
{
{"geqo", PGC_USERSET, QUERY_TUNING_GEQO,
- gettext_noop("Enable genetic query optimization"),
+ gettext_noop("enable genetic query optimization"),
gettext_noop("This algorithm attempts to do planning without "
"exhaustive searching")
},
{
/* Not for general use --- used by SET SESSION AUTHORIZATION */
{"is_superuser", PGC_INTERNAL, UNGROUPED,
- gettext_noop("Set to indicate current user's privilege status"),
+ gettext_noop("set to indicate current user's privilege status"),
NULL,
GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
},
{
{"tcpip_socket", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
- gettext_noop("Accept TCP/IP connections"),
+ gettext_noop("accept TCP/IP connections"),
NULL
},
&NetServer,
},
{
{"ssl", PGC_POSTMASTER, CONN_AUTH_SECURITY,
- gettext_noop("Enables SSL connections"),
+ gettext_noop("enable SSL connections"),
NULL
},
&EnableSSL,
},
{
{"fsync", PGC_SIGHUP, WAL_SETTINGS,
- gettext_noop("If on, server physically writes updates to disk"),
- gettext_noop("It will use the fsync() system call in several places to make "
+ gettext_noop("force synchronization of updates to disk"),
+ gettext_noop("The server will use the fsync() system call in several places to make "
"sure that updates are physically written to disk. This insures "
"that a database cluster will recover to a consistent state after "
- "an operating system or hardware crash")
+ "an operating system or hardware crash.")
},
&enableFsync,
true, NULL, NULL
},
{
{"zero_damaged_pages", PGC_SUSET, DEVELOPER_OPTIONS,
- gettext_noop("Continues processing past damaged page headers"),
+ gettext_noop("continue processing past damaged page headers"),
gettext_noop("Detection of a damaged page header normally causes PostgreSQL to "
"report an error, aborting the current transaction. Setting "
"zero_damaged_pages to true causes the system to instead report a "
"warning, zero out the damaged page, and continue processing. This "
- "behavior will destroy data, namely all the rows on the damaged page"),
+ "behavior will destroy data, namely all the rows on the damaged page."),
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
&zero_damaged_pages,
},
{
{"silent_mode", PGC_POSTMASTER, LOGGING_WHEN,
- gettext_noop("Runs the server silently"),
- gettext_noop("If this option is set, the server will automatically run in the"
- "background and any controlling terminals are disassociated")
+ gettext_noop("run the server silently"),
+ gettext_noop("If this option is set, the server will automatically run in the "
+ "background and any controlling terminals are dissociated.")
},
&SilentMode,
false, NULL, NULL
},
{
{"log_connections", PGC_BACKEND, LOGGING_WHAT,
- gettext_noop("Logs each successful connection"),
+ gettext_noop("log each successful connection"),
NULL
},
&Log_connections,
},
{
{"log_timestamp", PGC_SIGHUP, LOGGING_WHAT,
- gettext_noop("Prefixes server log messages with a time stamp"),
+ gettext_noop("prefix server log messages with a time stamp"),
NULL
},
&Log_timestamp,
},
{
{"log_pid", PGC_SIGHUP, LOGGING_WHAT,
- gettext_noop("Prefixes server log messages with the server PID"),
+ gettext_noop("prefix server log messages with the server PID"),
NULL
},
&Log_pid,
#ifdef USE_ASSERT_CHECKING
{
{"debug_assertions", PGC_USERSET, DEVELOPER_OPTIONS,
- gettext_noop("Turns on various assertion checks"),
- gettext_noop("This is a debugging aid. To use this option, "
- "PostgreSQL must be built with the configure option --enable-cassert"),
+ gettext_noop("turn on various assertion checks"),
+ gettext_noop("This is a debugging aid."),
GUC_NOT_IN_SAMPLE
},
&assert_enabled,
{
/* currently undocumented, so don't show in SHOW ALL */
{"exit_on_error", PGC_USERSET, UNGROUPED,
- gettext_noop("No Description Available"),
+ gettext_noop("no description available"),
NULL,
GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
},
},
{
{"log_statement", PGC_USERLIMIT, LOGGING_WHAT,
- gettext_noop("Causes each SQL statement to be logged"),
+ gettext_noop("log each SQL statement"),
NULL
},
&log_statement,
},
{
{"log_duration", PGC_USERLIMIT, LOGGING_WHAT,
- gettext_noop("Duration of every completed statement is logged"),
+ gettext_noop("log duration each completed SQL statement"),
NULL
},
&log_duration,
},
{
{"debug_print_parse", PGC_USERSET, LOGGING_WHAT,
- gettext_noop("Parse tree printed to server logs"),
- gettext_noop("Parsed for each executed query")
+ gettext_noop("print parse tree to server logs"),
+ NULL
},
&Debug_print_parse,
false, NULL, NULL
},
{
{"debug_print_rewritten", PGC_USERSET, LOGGING_WHAT,
- gettext_noop("Prints query rewriter output to server log"),
+ gettext_noop("print parse tree after rewriting to server log"),
NULL
},
&Debug_print_rewritten,
},
{
{"debug_print_plan", PGC_USERSET, LOGGING_WHAT,
- gettext_noop("Prints execution plan to the server log"),
+ gettext_noop("print execution plan to the server log"),
NULL
},
&Debug_print_plan,
},
{
{"debug_pretty_print", PGC_USERSET, LOGGING_WHAT,
- gettext_noop("Indents displays from parse, rewritten and plan"),
+ gettext_noop("indent parse and plan tree displays"),
NULL
},
&Debug_pretty_print,
},
{
{"log_parser_stats", PGC_USERLIMIT, STATS_MONITORING,
- gettext_noop("Write parser performance stats to server log"),
+ gettext_noop("write parser performance statistics to server log"),
NULL
},
&log_parser_stats,
},
{
{"log_planner_stats", PGC_USERLIMIT, STATS_MONITORING,
- gettext_noop("Write planner performance stats to server log"),
+ gettext_noop("write planner performance statistics to server log"),
NULL
},
&log_planner_stats,
},
{
{"log_executor_stats", PGC_USERLIMIT, STATS_MONITORING,
- gettext_noop("Write executor performance stats to server log"),
+ gettext_noop("write executor performance statistics to server log"),
NULL
},
&log_executor_stats,
},
{
{"log_statement_stats", PGC_USERLIMIT, STATS_MONITORING,
- gettext_noop("Write statement performance stats to server log"),
+ gettext_noop("write cumulative performance statistics to server log"),
NULL
},
&log_statement_stats,
#ifdef BTREE_BUILD_STATS
{
{"log_btree_build_stats", PGC_SUSET, DEVELOPER_OPTIONS,
- gettext_noop("No Description Available"),
+ gettext_noop("no description available"),
NULL,
GUC_NOT_IN_SAMPLE
},
{
{"explain_pretty_print", PGC_USERSET, CLIENT_CONN_OTHER,
- gettext_noop("Use indented output format for EXPLAIN VERBOSE"),
+ gettext_noop("use indented output format for EXPLAIN VERBOSE"),
NULL
},
&Explain_pretty_print,
},
{
{"stats_start_collector", PGC_POSTMASTER, STATS_COLLECTOR,
- gettext_noop("Start server statistics-collection subprocess"),
+ gettext_noop("start server statistics-collection subprocess"),
NULL
},
&pgstat_collect_startcollector,
},
{
{"stats_reset_on_server_start", PGC_POSTMASTER, STATS_COLLECTOR,
- gettext_noop("Collected statistics zeroed out on server restart"),
+ gettext_noop("zero collected statistics on server restart"),
NULL
},
&pgstat_collect_resetonpmstart,
},
{
{"stats_command_string", PGC_SUSET, STATS_COLLECTOR,
- gettext_noop("Enable stat collection of executing commands"),
+ gettext_noop("collect statistics about executing commands"),
gettext_noop("Enables the collection of statistics on the currently "
"executing command of each session, along with the time "
"at which that command began execution.")
},
{
{"stats_row_level", PGC_SUSET, STATS_COLLECTOR,
- gettext_noop("Enable collection of row-level stats on db activity"),
+ gettext_noop("collect row-level statistics on database activity"),
NULL
},
&pgstat_collect_tuplelevel,
},
{
{"stats_block_level", PGC_SUSET, STATS_COLLECTOR,
- gettext_noop("Enables collection of block-level stats on db activity"),
+ gettext_noop("collect block-level statistics on database activity"),
NULL
},
&pgstat_collect_blocklevel,
{
{"trace_notify", PGC_USERSET, DEVELOPER_OPTIONS,
- gettext_noop("Generates debugging output for LISTEN and NOTIFY"),
+ gettext_noop("generate debugging output for LISTEN and NOTIFY"),
NULL,
GUC_NOT_IN_SAMPLE
},
#ifdef LOCK_DEBUG
{
{"trace_locks", PGC_SUSET, DEVELOPER_OPTIONS,
- gettext_noop("No Description Available"),
+ gettext_noop("no description available"),
NULL,
GUC_NOT_IN_SAMPLE
},
},
{
{"trace_userlocks", PGC_SUSET, DEVELOPER_OPTIONS,
- gettext_noop("No Description Available"),
+ gettext_noop("no description available"),
NULL,
GUC_NOT_IN_SAMPLE
},
},
{
{"trace_lwlocks", PGC_SUSET, DEVELOPER_OPTIONS,
- gettext_noop("No Description Available"),
+ gettext_noop("no description available"),
NULL,
GUC_NOT_IN_SAMPLE
},
},
{
{"debug_deadlocks", PGC_SUSET, DEVELOPER_OPTIONS,
- gettext_noop("No Description Available"),
+ gettext_noop("no description available"),
NULL,
GUC_NOT_IN_SAMPLE
},
{
{"log_hostname", PGC_SIGHUP, LOGGING_WHAT,
- gettext_noop("Log hostname to connection logs"),
+ gettext_noop("log host name in connection logs"),
gettext_noop("By default, connection logs only show the IP address "
"of the connecting host. If you want them to show the host name you "
"can turn this on, but depending on your host name resolution "
- "setup it might impose a non-negligible performance penalty")
+ "setup it might impose a non-negligible performance penalty.")
},
&log_hostname,
false, NULL, NULL
},
{
{"log_source_port", PGC_SIGHUP, LOGGING_WHAT,
- gettext_noop("Log outgoing port number of the connecting host"),
+ gettext_noop("log outgoing port number of the connecting host"),
NULL
},
&LogSourcePort,
{
{"sql_inheritance", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
- gettext_noop("This controls the inheritance semantics"),
- gettext_noop("In particular, whether subtables are included by "
- "various commands by default")
+ gettext_noop("include subtables by default in various commands"),
+ NULL
},
&SQL_inheritance,
true, NULL, NULL
},
{
{"australian_timezones", PGC_USERSET, CLIENT_CONN_LOCALE,
- gettext_noop("If true, ACST, CST, EST, and SAT are interpreted "
- "as Australian time zones"),
+ gettext_noop("interpret ACST, CST, EST, and SAT as Australian time zones"),
gettext_noop("Otherwise they are interpreted as North/South American "
- "time zones and Saturday")
+ "time zones and Saturday.")
},
&Australian_timezones,
false, ClearDateCache, NULL
},
{
{"password_encryption", PGC_USERSET, CONN_AUTH_SECURITY,
- gettext_noop("If unspecified the password is encrypted"),
+ gettext_noop("encrypt passwords"),
gettext_noop("When a password is specified in CREATE USER or "
"ALTER USER without writing either ENCRYPTED or UNENCRYPTED, "
- "this option determines whether the password is to be encrypted")
+ "this option determines whether the password is to be encrypted.")
},
&Password_encryption,
true, NULL, NULL
},
{
{"transform_null_equals", PGC_USERSET, COMPAT_OPTIONS_CLIENT,
- gettext_noop("expr=NULL treated as expr IS NULL"),
+ gettext_noop("treat \"expr=NULL\" as \"expr IS NULL\""),
gettext_noop("When turned on, expressions of the form expr = NULL "
"(or NULL = expr) are treated as expr IS NULL, that is, they "
"return true if expr evaluates to the null value, and false "
"otherwise. The correct behavior of expr = NULL is to always "
- "return null (unknown)")
+ "return null (unknown).")
},
&Transform_null_equals,
false, NULL, NULL
},
{
{"db_user_namespace", PGC_SIGHUP, CONN_AUTH_SECURITY,
- gettext_noop("This allows per-database user names"),
+ gettext_noop("enable per-database user names"),
NULL
},
&Db_user_namespace,
{
/* only here for backwards compatibility */
{"autocommit", PGC_USERSET, CLIENT_CONN_STATEMENT,
- gettext_noop("This var doesn't do anything"),
- gettext_noop("It's just here so that we won't choke on SET AUTOCOMMIT "
+ gettext_noop("no effect"),
+ gettext_noop("This parameter doesn't do anything. It's just here so that we won't choke on SET AUTOCOMMIT "
"TO ON from 7.3-vintage clients."),
GUC_NO_SHOW_ALL | GUC_NOT_IN_SAMPLE
},
},
{
{"default_transaction_read_only", PGC_USERSET, CLIENT_CONN_STATEMENT,
- gettext_noop("Controls default read-only status of new transactions"),
+ gettext_noop("default read-only status of new transactions"),
NULL
},
&DefaultXactReadOnly,
},
{
{"transaction_read_only", PGC_USERSET, CLIENT_CONN_STATEMENT,
- gettext_noop("Current transaction's read-only status"),
+ gettext_noop("current transaction's read-only status"),
NULL,
GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
},
{
{"add_missing_from", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
- gettext_noop("Add missing table references to FROM clauses"),
+ gettext_noop("automatically add missing table references to FROM clauses"),
NULL
},
&add_missing_from,
{
{
{"default_statistics_target", PGC_USERSET, QUERY_TUNING_OTHER,
- gettext_noop("Sets the default statistics target"),
+ gettext_noop("set the default statistics target"),
gettext_noop("This applies to table columns that have not had a "
- "column-specific target set via ALTER TABLE SET STATISTICS")
+ "column-specific target set via ALTER TABLE SET STATISTICS.")
},
&default_statistics_target,
10, 1, 1000, NULL, NULL
},
{
{"from_collapse_limit", PGC_USERSET, QUERY_TUNING_OTHER,
- gettext_noop("From list size beyond which sub-queries are not "
+ gettext_noop("FROM-list size beyond which subqueries are not "
"collapsed"),
- gettext_noop("The planner will merge sub-queries into upper "
+ gettext_noop("The planner will merge subqueries into upper "
"queries if the resulting FROM list would have no more than "
- "this many items")
+ "this many items.")
},
&from_collapse_limit,
8, 1, INT_MAX, NULL, NULL
},
{
{"join_collapse_limit", PGC_USERSET, QUERY_TUNING_OTHER,
- gettext_noop("From list size beyond which JOIN constructs not "
+ gettext_noop("FROM-list size beyond which JOIN constructs are not "
"flattened"),
gettext_noop("The planner will flatten explicit inner JOIN "
"constructs into lists of FROM items whenever a list of no more "
- "than this many items would result")
+ "than this many items would result.")
},
&join_collapse_limit,
8, 1, INT_MAX, NULL, NULL
},
{
{"geqo_threshold", PGC_USERSET, QUERY_TUNING_GEQO,
- gettext_noop("Threshold of FROM items beyond which geqo is used"),
+ gettext_noop("threshold of FROM items beyond which GEQO is used"),
NULL
},
&geqo_threshold,
},
{
{"geqo_pool_size", PGC_USERSET, QUERY_TUNING_GEQO,
- gettext_noop("The number of individuals in one population"),
+ gettext_noop("GEQO: number of individuals in one population"),
NULL
},
&Geqo_pool_size,
},
{
{"geqo_effort", PGC_USERSET, QUERY_TUNING_GEQO,
- gettext_noop("Effort is used to calculate a default for generations"),
+ gettext_noop("GEQO: effort is used to calculate a default for generations"),
NULL
},
&Geqo_effort,
},
{
{"geqo_generations", PGC_USERSET, QUERY_TUNING_GEQO,
- gettext_noop("Specifies the number of iterations in the algorithm"),
+ gettext_noop("GEQO: number of iterations in the algorithm"),
gettext_noop("The number must be a positive integer. If 0 is "
- "specified then Effort * Log2(PoolSize) is used")
+ "specified then effort * log2(poolsize) is used")
},
&Geqo_generations,
0, 0, INT_MAX, NULL, NULL
{
{"deadlock_timeout", PGC_SIGHUP, LOCK_MANAGEMENT,
- gettext_noop("Time to wait on lock (msec) before checking for deadlock"),
+ gettext_noop("time in milliseconds to wait on lock before checking for deadlock"),
NULL
},
&DeadlockTimeout,
#ifdef HAVE_SYSLOG
{
{"syslog", PGC_SIGHUP, LOGGING_SYSLOG,
- gettext_noop("Allows the use of syslog for logging"),
+ gettext_noop("use syslog for logging"),
gettext_noop("If this option is 1, messages go both to syslog "
"and the standard output. A value of 2 sends output only to syslog. "
"(Some messages will still go to the standard output/error.) The "
- "default is 0, which means syslog is off")
+ "default is 0, which means syslog is off.")
},
&Use_syslog,
0, 0, 2, NULL, NULL
*/
{
{"max_connections", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
- gettext_noop("Max number of concurrent connections"),
+ gettext_noop("maximum number of concurrent connections"),
NULL
},
&MaxBackends,
{
{"superuser_reserved_connections", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
- gettext_noop("Number of connection \"slots\" reserved for superusers"),
+ gettext_noop("number of connection slots reserved for superusers"),
NULL
},
&ReservedBackends,
{
{"shared_buffers", PGC_POSTMASTER, RESOURCES_MEM,
- gettext_noop("The number of shared memory buffers used by the server"),
+ gettext_noop("number of shared memory buffers used by the server"),
NULL
},
&NBuffers,
{
{"port", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
- gettext_noop("The TCP port the server listens on"),
+ gettext_noop("TCP port the server listens on"),
NULL
},
&PostPortNumber,
{
{"unix_socket_permissions", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
- gettext_noop("Sets the access permissions of the Unix domain socket"),
- gettext_noop("Unix domain sockets use the usual Unix file system "
+ gettext_noop("access permissions of the Unix-domain socket"),
+ gettext_noop("Unix-domain sockets use the usual Unix file system "
"permission set. The option value is expected to be an numeric mode "
"specification in the form accepted by the chmod and umask system "
"calls. (To use the customary octal format the number must start with "
{
{"sort_mem", PGC_USERSET, RESOURCES_MEM,
- gettext_noop("Max memory to be used for sorts and hash tables"),
+ gettext_noop("maximum memory to be used for sorts and hash tables"),
gettext_noop("Specifies the amount of memory to be used by internal "
"sort operations and hash tables before switching to temporary disk "
"files")
{
{"vacuum_mem", PGC_USERSET, RESOURCES_MEM,
- gettext_noop("Max mem used to keep track of to-be-reclaimed tuples"),
+ gettext_noop("maximum memory used to keep track of to-be-reclaimed rows"),
NULL
},
&VacuumMem,
{
{"max_files_per_process", PGC_BACKEND, RESOURCES_KERNEL,
- gettext_noop("Max num of simultaneously open files for each subprocess"),
+ gettext_noop("maximum number of simultaneously open files for each server process"),
NULL
},
&max_files_per_process,
#ifdef LOCK_DEBUG
{
{"trace_lock_oidmin", PGC_SUSET, DEVELOPER_OPTIONS,
- gettext_noop("No Description Available"),
+ gettext_noop("no description available"),
NULL,
GUC_NOT_IN_SAMPLE
},
},
{
{"trace_lock_table", PGC_SUSET, DEVELOPER_OPTIONS,
- gettext_noop("No Description Available"),
+ gettext_noop("no description available"),
NULL,
GUC_NOT_IN_SAMPLE
},
#endif
{
{"max_expr_depth", PGC_USERSET, CLIENT_CONN_OTHER,
- gettext_noop("Max expression nesting depth"),
+ gettext_noop("maximum expression nesting depth"),
NULL
},
&max_expr_depth,
{
{"statement_timeout", PGC_USERSET, CLIENT_CONN_STATEMENT,
- gettext_noop("Max allowed duration (msec) of any statement"),
- gettext_noop("A value of 0 turns off the timeout")
+ gettext_noop("maximum allowed duration (in milliseconds) of any statement"),
+ gettext_noop("A value of 0 turns off the timeout.")
},
&StatementTimeout,
0, 0, INT_MAX, NULL, NULL
{
{"max_fsm_relations", PGC_POSTMASTER, RESOURCES_FSM,
- gettext_noop("Max num. of tables+indexes for which free space is "
+ gettext_noop("maximum number of tables and indexes for which free space is "
"tracked"),
NULL
},
},
{
{"max_fsm_pages", PGC_POSTMASTER, RESOURCES_FSM,
- gettext_noop("Max num. of disk pages for which free space is "
+ gettext_noop("maximum number of disk pages for which free space is "
"tracked"),
NULL
},
{
{"max_locks_per_transaction", PGC_POSTMASTER, LOCK_MANAGEMENT,
- gettext_noop("Max locks per transaction"),
+ gettext_noop("maximum number of locks per transaction"),
gettext_noop("The shared lock table is sized on the assumption that "
"at most max_locks_per_transaction * max_connections distinct "
"objects will need to be locked at any one time.")
{
{"authentication_timeout", PGC_SIGHUP, CONN_AUTH_SECURITY,
- gettext_noop("Max time (sec) to complete client authentication"),
+ gettext_noop("maximum time in seconds to complete client authentication"),
NULL
},
&AuthenticationTimeout,
{
/* Not for general use */
{"pre_auth_delay", PGC_SIGHUP, DEVELOPER_OPTIONS,
- gettext_noop("No Description Available"),
+ gettext_noop("no description available"),
NULL,
GUC_NOT_IN_SAMPLE
},
{
{"checkpoint_segments", PGC_SIGHUP, WAL_CHECKPOINTS,
- gettext_noop("Max distance between automatic WAL checkpoints"),
+ gettext_noop("maximum distance between automatic WAL checkpoints"),
NULL
},
&CheckPointSegments,
{
{"checkpoint_timeout", PGC_SIGHUP, WAL_CHECKPOINTS,
- gettext_noop("Max time (sec) between automatic WAL checkpoints"),
+ gettext_noop("maximum time in seconds between automatic WAL checkpoints"),
NULL
},
&CheckPointTimeout,
{
{"checkpoint_warning", PGC_SIGHUP, WAL_CHECKPOINTS,
- gettext_noop("Log if filling of checkpoint segments happens more "
- "frequently than this (sec)"),
+ gettext_noop("log if filling of checkpoint segments happens more "
+ "frequently than this (in seconds)"),
gettext_noop("Send a message to the server logs if checkpoints "
"caused by the filling of checkpoint segment files happens more "
"frequently than this number of seconds. Zero turns off the warning.")
{
{"wal_buffers", PGC_POSTMASTER, WAL_SETTINGS,
- gettext_noop("Disk-page buffers in shared memory for WAL logging"),
+ gettext_noop("disk-page buffers in shared memory for WAL"),
NULL
},
&XLOGbuffers,
{
{"wal_debug", PGC_SUSET, DEVELOPER_OPTIONS,
- gettext_noop("If nonzero, log WAL-related debugging output"),
+ gettext_noop("if nonzero, log WAL-related debugging output"),
NULL,
GUC_NOT_IN_SAMPLE
},
{
{"commit_delay", PGC_USERSET, WAL_CHECKPOINTS,
- gettext_noop("Delay (usec) between transaction commit and "
+ gettext_noop("delay in microseconds between transaction commit and "
"flushing WAL to disk"),
NULL
},
{
{"commit_siblings", PGC_USERSET, WAL_CHECKPOINTS,
- gettext_noop("Min concurrent open trans. before performing "
- "COMMIT_DELAY"),
+ gettext_noop("minimum concurrent open transactions before performing "
+ "commit_delay"),
NULL
},
&CommitSiblings,
{
{"extra_float_digits", PGC_USERSET, CLIENT_CONN_LOCALE,
- gettext_noop("Adjusts number of digits displayed for "
- "floating-point values"),
- gettext_noop("This affects float4, float8, and geometric data types. "
+ gettext_noop("number of digits displayed for floating-point values"),
+ gettext_noop("This affects real, double precision, and geometric data types. "
"The parameter value is added to the standard number of digits "
- "(FLT_DIG or DBL_DIG as appropriate)")
+ "(FLT_DIG or DBL_DIG as appropriate).")
},
&extra_float_digits,
0, -15, 2, NULL, NULL
{
{"log_min_duration_statement", PGC_USERLIMIT, LOGGING_WHEN,
- gettext_noop("Min execution time (msec) above which statements will "
+ gettext_noop("minimum execution time in milliseconds above which statements will "
"be logged"),
gettext_noop("The default is 0 (turning this feature off).")
},
{
{
{"effective_cache_size", PGC_USERSET, QUERY_TUNING_COST,
- gettext_noop("Planner's assumption about size of the disk cache"),
+ gettext_noop("planner's assumption about size of the disk cache"),
gettext_noop("That is, the portion of the kernel's disk cache that "
"will be used for PostgreSQL data files. This is measured in disk "
"pages, which are normally 8 kB each.")
},
{
{"random_page_cost", PGC_USERSET, QUERY_TUNING_COST,
- gettext_noop("Planner's estimate of the cost of a nonsequentially "
+ gettext_noop("planner's estimate of the cost of a nonsequentially "
"fetched disk page"),
gettext_noop("This is measured as a multiple of the cost of a "
"sequential page fetch. A higher value makes it more likely a "
},
{
{"cpu_tuple_cost", PGC_USERSET, QUERY_TUNING_COST,
- gettext_noop("Planner's estimate of the cost of processing each tuple"),
+ gettext_noop("planner's estimate of the cost of processing each tuple (row)"),
gettext_noop("This is measured as a fraction of the cost of a "
"sequential page fetch.")
},
},
{
{"cpu_index_tuple_cost", PGC_USERSET, QUERY_TUNING_COST,
- gettext_noop("Planner's estimate of processing cost for each "
- "index tuple during index scan"),
+ gettext_noop("planner's estimate of processing cost for each "
+ "index tuple (row) during index scan"),
gettext_noop("This is measured as a fraction of the cost of a "
"sequential page fetch.")
},
},
{
{"cpu_operator_cost", PGC_USERSET, QUERY_TUNING_COST,
- gettext_noop("Planner's estimate of processing cost of each op. in WHERE"),
+ gettext_noop("planner's estimate of processing cost of each operator in WHERE"),
gettext_noop("This is measured as a fraction of the cost of a sequential "
"page fetch.")
},
{
{"geqo_selection_bias", PGC_USERSET, QUERY_TUNING_GEQO,
- gettext_noop("The selective pressure within the population"),
+ gettext_noop("GEQO: selective pressure within the population"),
NULL
},
&Geqo_selection_bias,
{
{"seed", PGC_USERSET, UNGROUPED,
- gettext_noop("Seed for random-number generation"),
+ gettext_noop("seed for random-number generation"),
NULL,
GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
{
{
{"client_encoding", PGC_USERSET, CLIENT_CONN_LOCALE,
- gettext_noop("Client's character set encoding"),
+ gettext_noop("client's character set encoding"),
NULL,
GUC_REPORT
},
{
{"client_min_messages", PGC_USERSET, LOGGING_WHEN,
- gettext_noop("Controls which message levels are sent to the client"),
+ gettext_noop("message levels that are sent to the client"),
gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, "
"DEBUG1, LOG, NOTICE, WARNING, and ERROR. Each level includes all the "
"levels that follow it. The later the level, the fewer messages are "
{
{"log_min_messages", PGC_USERLIMIT, LOGGING_WHEN,
- gettext_noop("Controls which message levels logged"),
+ gettext_noop("message levels that are logged"),
gettext_noop("Valid values are DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1, "
"INFO, NOTICE, WARNING, ERROR, LOG, FATAL, and PANIC. Each level "
- "includes all the levels that follow it")
+ "includes all the levels that follow it.")
},
&log_min_messages_str,
"notice", assign_log_min_messages, NULL
{
{"log_error_verbosity", PGC_SUSET, LOGGING_WHEN,
- gettext_noop("Controls verbosity of logged messages"),
- gettext_noop("Valid values are 'terse', 'default', and 'verbose'")
+ gettext_noop("verbosity of logged messages"),
+ gettext_noop("Valid values are \"terse\", \"default\", and \"verbose\".")
},
&log_error_verbosity_str,
"default", assign_log_error_verbosity, NULL
{
{"log_min_error_statement", PGC_USERLIMIT, LOGGING_WHEN,
- gettext_noop("Controls whether the erroneous statement is logged"),
+ gettext_noop("log statement generating error at or above this level"),
gettext_noop("All SQL statements that cause an error of the "
- "specified level, or a higher level, are logged")
+ "specified level or a higher level are logged.")
},
&log_min_error_statement_str,
"panic", assign_min_error_statement, NULL
{
{"DateStyle", PGC_USERSET, CLIENT_CONN_LOCALE,
- gettext_noop("Sets display format for date and time values"),
+ gettext_noop("display format for date and time values"),
gettext_noop("Also controls interpretation of ambiguous "
- "date inputs"),
+ "date inputs."),
GUC_LIST_INPUT | GUC_REPORT
},
&datestyle_string,
{
{"default_transaction_isolation", PGC_USERSET, CLIENT_CONN_STATEMENT,
- gettext_noop("The default isolation level of each new transaction"),
+ gettext_noop("transaction isolation level of each new transaction"),
gettext_noop("Each SQL transaction has an isolation level, which "
"can be either \"read committed\" or \"serializable\".")
},
{
{"dynamic_library_path", PGC_SUSET, CLIENT_CONN_OTHER,
- gettext_noop("Path for dynamically loadable modules"),
+ gettext_noop("path for dynamically loadable modules"),
gettext_noop("If a dynamically loadable module needs to be opened and "
"the specified name does not have a directory component (i.e. the "
"name does not contain a slash), the system will search this path for "
{
{"krb_server_keyfile", PGC_POSTMASTER, CONN_AUTH_SECURITY,
- gettext_noop("The location of the Kerberos server key file"),
+ gettext_noop("location of the Kerberos server key file"),
NULL
},
&pg_krb_server_keyfile,
{
{"rendezvous_name", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
- gettext_noop("The Rendezvous broadcast service name"),
+ gettext_noop("Rendezvous broadcast service name"),
NULL
},
&rendezvous_name,
{
{"lc_collate", PGC_INTERNAL, CLIENT_CONN_LOCALE,
- gettext_noop("Locale collation order"),
+ gettext_noop("collation order locale"),
NULL,
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
{
{"lc_ctype", PGC_INTERNAL, CLIENT_CONN_LOCALE,
- gettext_noop("Locale character classification and case conversion"),
+ gettext_noop("character classification and case conversion locale"),
NULL,
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
{
{"lc_messages", PGC_SUSET, CLIENT_CONN_LOCALE,
- gettext_noop("Language in which messages are displayed"),
+ gettext_noop("language in which messages are displayed"),
NULL
},
&locale_messages,
{
{"lc_monetary", PGC_USERSET, CLIENT_CONN_LOCALE,
- gettext_noop("Locale for formatting monetary amounts"),
+ gettext_noop("locale for formatting monetary amounts"),
NULL
},
&locale_monetary,
{
{"lc_numeric", PGC_USERSET, CLIENT_CONN_LOCALE,
- gettext_noop("Locale for formatting numbers"),
+ gettext_noop("locale for formatting numbers"),
NULL
},
&locale_numeric,
{
{"lc_time", PGC_USERSET, CLIENT_CONN_LOCALE,
- gettext_noop("Locale for formatting date and time values"),
+ gettext_noop("locale for formatting date and time values"),
NULL
},
&locale_time,
{
{"preload_libraries", PGC_POSTMASTER, RESOURCES_KERNEL,
- gettext_noop("Shared libraries to preload into postmaster"),
+ gettext_noop("shared libraries to preload into server"),
NULL,
GUC_LIST_INPUT | GUC_LIST_QUOTE
},
{
{"regex_flavor", PGC_USERSET, COMPAT_OPTIONS_PREVIOUS,
- gettext_noop("Regular expression \"flavor\""),
- gettext_noop("This can be set to advanced, extended, or basic")
+ gettext_noop("regular expression \"flavor\""),
+ gettext_noop("This can be set to advanced, extended, or basic.")
},
®ex_flavor_string,
"advanced", assign_regex_flavor, NULL
{
{"search_path", PGC_USERSET, CLIENT_CONN_STATEMENT,
- gettext_noop("Schema search order for names not schema-qualified"),
+ gettext_noop("schema search order for names not schema-qualified"),
NULL,
GUC_LIST_INPUT | GUC_LIST_QUOTE
},
{
/* Can't be set in postgresql.conf */
{"server_encoding", PGC_INTERNAL, CLIENT_CONN_LOCALE,
- gettext_noop("Server (database) character set encoding"),
+ gettext_noop("server (database) character set encoding"),
NULL,
GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
{
/* Can't be set in postgresql.conf */
{"server_version", PGC_INTERNAL, UNGROUPED,
- gettext_noop("Server version"),
+ gettext_noop("server version"),
NULL,
GUC_REPORT | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
{
/* Not for general use --- used by SET SESSION AUTHORIZATION */
{"session_authorization", PGC_USERSET, UNGROUPED,
- gettext_noop("Current session userid"),
+ gettext_noop("session user name"),
NULL,
GUC_REPORT | GUC_NO_SHOW_ALL | GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
{
{"syslog_facility", PGC_POSTMASTER, LOGGING_SYSLOG,
gettext_noop("syslog \"facility\" to be used when syslog enabled"),
- gettext_noop("You may choose from LOCAL0, LOCAL1, LOCAL2, LOCAL3, "
- "LOCAL4, LOCAL5, LOCAL6, LOCAL7")
+ gettext_noop("Valid values are LOCAL0, LOCAL1, LOCAL2, LOCAL3, "
+ "LOCAL4, LOCAL5, LOCAL6, LOCAL7.")
},
&Syslog_facility,
"LOCAL0", assign_facility, NULL
},
{
{"syslog_ident", PGC_POSTMASTER, LOGGING_SYSLOG,
- gettext_noop("Program name used to identify PostgreSQL messages "
+ gettext_noop("program name used to identify PostgreSQL messages "
"in syslog"),
NULL
},
{
{"TimeZone", PGC_USERSET, CLIENT_CONN_LOCALE,
- gettext_noop("Time zone for displaying and interpreting time stamps"),
+ gettext_noop("time zone for displaying and interpreting time stamps"),
NULL
},
&timezone_string,
{
{"transaction_isolation", PGC_USERSET, CLIENT_CONN_STATEMENT,
- gettext_noop("Current transaction's isolation level"),
+ gettext_noop("current transaction's isolation level"),
NULL,
GUC_NO_RESET_ALL | GUC_NOT_IN_SAMPLE | GUC_DISALLOW_IN_FILE
},
{
{"unix_socket_group", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
- gettext_noop("The owning group of the Unix-domain socket"),
+ gettext_noop("owning group of the Unix-domain socket"),
gettext_noop("(The owning user of the socket is always the user "
"that starts the server.)")
},
{
{"unix_socket_directory", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
- gettext_noop("Directory where the Unix-domain socket will be created"),
+ gettext_noop("directory where the Unix-domain socket will be created"),
NULL
},
&UnixSocketDir,
{
{"virtual_host", PGC_POSTMASTER, CONN_AUTH_SETTINGS,
- gettext_noop("The host name or IP address to listen to"),
+ gettext_noop("host name or IP address to listen to"),
NULL
},
&VirtualHost,
{
{"wal_sync_method", PGC_SIGHUP, WAL_SETTINGS,
- gettext_noop("Method used for forcing WAL updates out to disk"),
+ gettext_noop("method used for forcing WAL updates out to disk"),
NULL
},
&XLOG_sync_method,
{
ereport(elevel,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("\"%s\" is not a recognized option", name)));
+ errmsg("unrecognized configuration parameter \"%s\"", name)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
- errmsg("\"%s\" cannot be changed",
+ errmsg("parameter \"%s\" cannot be changed",
name)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
- errmsg("\"%s\" cannot be changed after server start",
+ errmsg("parameter \"%s\" cannot be changed after server start",
name)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
- errmsg("\"%s\" cannot be changed now",
+ errmsg("parameter \"%s\" cannot be changed now",
name)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_CANT_CHANGE_RUNTIME_PARAM),
- errmsg("\"%s\" cannot be set after connection start",
+ errmsg("parameter \"%s\" cannot be set after connection start",
name)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("permission denied to set option \"%s\"",
+ errmsg("permission denied to set parameter \"%s\"",
name)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("\"%s\" requires a boolean value",
+ errmsg("parameter \"%s\" requires a Boolean value",
name)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("permission denied to set option \"%s\"",
+ errmsg("permission denied to set parameter \"%s\"",
name),
errhint("Must be superuser to change this value to false.")));
return false;
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("invalid value for \"%s\": %d",
+ errmsg("invalid value for parameter \"%s\": %d",
name, (int) newval)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("\"%s\" requires an integer value",
+ errmsg("parameter \"%s\" requires an integer value",
name)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("%d is outside the valid range for \"%s\" (%d .. %d)",
+ errmsg("%d is outside the valid range for parameter \"%s\" (%d .. %d)",
newval, name, conf->min, conf->max)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("permission denied to set option \"%s\"",
+ errmsg("permission denied to set parameter \"%s\"",
name),
errhint("Must be superuser to increase this value or set it to zero.")));
return false;
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("invalid value for \"%s\": %d",
+ errmsg("invalid value for parameter \"%s\": %d",
name, newval)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("\"%s\" requires a numeric value",
+ errmsg("parameter \"%s\" requires a numeric value",
name)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("%g is outside the valid range for \"%s\" (%g .. %g)",
+ errmsg("%g is outside the valid range for parameter \"%s\" (%g .. %g)",
newval, name, conf->min, conf->max)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("permission denied to set option \"%s\"",
+ errmsg("permission denied to set parameter \"%s\"",
name),
errhint("Must be superuser to increase this value.")));
return false;
{
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("invalid value for \"%s\": %g",
+ errmsg("invalid value for parameter \"%s\": %g",
name, newval)));
return false;
}
{
ereport(elevel,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
- errmsg("permission denied to set option \"%s\"",
+ errmsg("permission denied to set parameter \"%s\"",
name),
errhint("Must be superuser to increase this value.")));
return false;
free(newval);
ereport(elevel,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
- errmsg("invalid value for \"%s\": \"%s\"",
+ errmsg("invalid value for parameter \"%s\": \"%s\"",
name, value ? value : "")));
return false;
}
if (record == NULL)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("\"%s\" is not a recognized option", name)));
+ errmsg("unrecognized configuration parameter \"%s\"", name)));
switch (record->vartype)
{
if (record == NULL)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("\"%s\" is not a recognized option", name)));
+ errmsg("unrecognized configuration parameter \"%s\"", name)));
switch (record->vartype)
{
if (record == NULL)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("\"%s\" is not a recognized option", name)));
+ errmsg("unrecognized configuration parameter \"%s\"", name)));
flags = record->flags;
if (PG_ARGISNULL(0))
ereport(ERROR,
(errcode(ERRCODE_NULL_VALUE_NOT_ALLOWED),
- errmsg("SET variable name is required")));
+ errmsg("SET requires parameter name")));
/* Get the GUC variable name */
name = DatumGetCString(DirectFunctionCall1(textout, PG_GETARG_DATUM(0)));
if (record == NULL)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_OBJECT),
- errmsg("\"%s\" is not a recognized option", name)));
+ errmsg("unrecognized configuration parameter \"%s\"", name)));
if (varname)
*varname = record->name;
free(filename);
ereport(elevel,
(errcode_for_file_access(),
- errmsg("could not write exec config params file \""
- CONFIG_EXEC_PARAMS "\": %m")));
+ errmsg("could not write to file \"%s\": %m", CONFIG_EXEC_PARAMS)));
return;
}
if (errno != ENOENT)
ereport(FATAL,
(errcode_for_file_access(),
- errmsg("could not read exec config params file \""
- CONFIG_EXEC_PARAMS "\": %m")));
+ errmsg("could not read from file \"%s\": %m", CONFIG_EXEC_PARAMS)));
return;
}
{
ereport(WARNING,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("could not parse setting for \"%s\"", name)));
+ errmsg("could not parse setting for parameter \"%s\"", name)));
free(name);
continue;
}
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/help_config.c,v 1.5 2003/08/08 21:42:24 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/help_config.c,v 1.6 2003/09/25 06:58:06 petere Exp $
*
*-------------------------------------------------------------------------
*/
};
static const char *const GENERIC_FORMAT[] = {
- gettext_noop("Name : %-20s \nContext : %-20s \nGroup : %-20s\n"),
- gettext_noop("%s\t%s\t%s\t")
+ gettext_noop("Name: %-20s\nContext: %-20s\nGroup: %-20s\n"),
+ "%s\t%s\t%s\t"
};
static const char *const GENERIC_DESC[] = {
gettext_noop("Description: %s\n%s\n"),
- gettext_noop("%s %s\n")
+ "%s\t%s\n"
};
static const char *const BOOL_FORMAT[] = {
- gettext_noop("Type : BOOL\nReset Value: %-s \n"),
- gettext_noop("BOOL\t%s\t\t\t")
+ gettext_noop("Type: Boolean\nReset value: %-s\n"),
+ "BOOL\t%s\t\t\t"
};
static const char *const INT_FORMAT[] = {
- gettext_noop("Type : INT\nReset Value: %-20d \nMin Value : %-20d \nMax Value : %-20d \n"),
- gettext_noop("INT\t%d\t%d\t%d\t")
+ gettext_noop("Type: integer\nReset value: %-20d\nMin value: %-20d\nMax value: %-20d\n"),
+ "INT\t%d\t%d\t%d\t"
};
static const char *const REAL_FORMAT[] = {
- gettext_noop("Type : REAL\nReset Value: %-20g \nMin Value : %-20g \nMax Value : %-20g \n"),
- gettext_noop("REAL\t%g\t%g\t%g\t")
+ gettext_noop("Type: real\nReset value: %-20g\nMin value: %-20g\nMax value: %-20g\n"),
+ "REAL\t%g\t%g\t%g\t"
};
static const char *const STRING_FORMAT[] = {
- gettext_noop("Type : STRING\nReset Value: %-s \n"),
- gettext_noop("STRING\t%s\t\t\t")
+ gettext_noop("Type: string\nReset value: %-s\n"),
+ "STRING\t%s\t\t\t"
};
static const char *const COLUMN_HEADER[] = {
"",
-- what happens if we specify slightly misformatted abstime?
INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 35, 1946 10:00:00');
ERROR: date/time field value out of range: "Feb 35, 1946 10:00:00"
-HINT: Perhaps you need a different DateStyle setting.
+HINT: Perhaps you need a different "datestyle" setting.
INSERT INTO ABSTIME_TBL (f1) VALUES ('Feb 28, 1984 25:08:10');
ERROR: date/time field value out of range: "Feb 28, 1984 25:08:10"
-- badly formatted abstimes: these should result in invalid abstimes
INSERT INTO ABSTIME_TBL (f1) VALUES ('bad date format');
-ERROR: invalid input syntax for abstime: "bad date format"
+ERROR: invalid input syntax for type abstime: "bad date format"
INSERT INTO ABSTIME_TBL (f1) VALUES ('Jun 10, 1843');
-- test abstime operators
SELECT '' AS eight, ABSTIME_TBL.*;
INSERT INTO tmp3 values (5,50);
-- Try (and fail) to add constraint due to invalid source columns
ALTER TABLE tmp3 add constraint tmpconstr foreign key(c) references tmp2 match full;
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
ERROR: column "c" referenced in foreign key constraint does not exist
-- Try (and fail) to add constraint due to invalide destination columns explicitly given
ALTER TABLE tmp3 add constraint tmpconstr foreign key(a) references tmp2(b) match full;
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
ERROR: column "b" referenced in foreign key constraint does not exist
-- Try (and fail) to add constraint due to invalid data
ALTER TABLE tmp3 add constraint tmpconstr foreign key (a) references tmp2 match full;
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
-ERROR: insert or update on "tmp3" violates foreign key constraint "tmpconstr"
-DETAIL: Key (a)=(5) is not present in "tmp2".
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
+ERROR: insert or update on table "tmp3" violates foreign key constraint "tmpconstr"
+DETAIL: Key (a)=(5) is not present in table "tmp2".
-- Delete failing row
DELETE FROM tmp3 where a=5;
-- Try (and succeed)
ALTER TABLE tmp3 add constraint tmpconstr foreign key (a) references tmp2 match full;
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
-- Try (and fail) to create constraint from tmp5(a) to tmp4(a) - unique constraint on
-- tmp4 is a,b
ALTER TABLE tmp5 add constraint tmpconstr foreign key(a) references tmp4(a) match full;
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
-ERROR: there is no UNIQUE constraint matching given keys for referenced table "tmp4"
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
+ERROR: there is no unique constraint matching given keys for referenced table "tmp4"
DROP TABLE tmp5;
DROP TABLE tmp4;
DROP TABLE tmp3;
CREATE TEMP TABLE FKTABLE (ftest1 inet);
-- This next should fail, because inet=int does not exist
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- This should also fail for the same reason, but here we
-- give the column name
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable(ptest1);
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- This should succeed, even though they are different types
-- because varchar=int does exist
DROP TABLE FKTABLE;
CREATE TEMP TABLE FKTABLE (ftest1 varchar);
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable;
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
-- As should this
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1) references pktable(ptest1);
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
DROP TABLE pktable cascade;
NOTICE: drop cascades to constraint $2 on table fktable
NOTICE: drop cascades to constraint $1 on table fktable
-- This should fail, because we just chose really odd types
CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 timestamp);
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2) references pktable;
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: cidr = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
DROP TABLE FKTABLE;
-- Again, so should this...
CREATE TEMP TABLE FKTABLE (ftest1 cidr, ftest2 timestamp);
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2)
references pktable(ptest1, ptest2);
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: cidr = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
DROP TABLE FKTABLE;
-- This fails because we mixed up the column ordering
CREATE TEMP TABLE FKTABLE (ftest1 int, ftest2 inet);
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest1, ftest2)
references pktable(ptest2, ptest1);
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: integer = inet
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- As does this...
ALTER TABLE FKTABLE ADD FOREIGN KEY(ftest2, ftest1)
references pktable(ptest1, ptest2);
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- temp tables should go away by themselves, need not drop them.
-- test check constraint adding
create table atacc1 ( test int );
alter table atacc1 add constraint atacc_test1 check (test>3);
-- should fail
insert into atacc1 (test) values (2);
-ERROR: new row for relation "atacc1" violates CHECK constraint "atacc_test1"
+ERROR: new row for relation "atacc1" violates check constraint "atacc_test1"
-- should succeed
insert into atacc1 (test) values (4);
drop table atacc1;
insert into atacc1 (test) values (2);
-- add a check constraint (fails)
alter table atacc1 add constraint atacc_test1 check (test>3);
-ERROR: CHECK constraint "atacc_test1" is violated at some row(s)
+ERROR: check constraint "atacc_test1" is violated by some row
insert into atacc1 (test) values (4);
drop table atacc1;
-- let's do one where the check fails because the column doesn't exist
create table atacc1 ( test int );
-- add a check constraint (fails)
alter table atacc1 add constraint atacc_test1 check (test1>3);
-ERROR: attribute "test1" not found
+ERROR: column "test1" does not exist
drop table atacc1;
-- something a little more complicated
create table atacc1 ( test int, test2 int, test3 int);
alter table atacc1 add constraint atacc_test1 check (test+test2<test3*4);
-- should fail
insert into atacc1 (test,test2,test3) values (4,4,2);
-ERROR: new row for relation "atacc1" violates CHECK constraint "atacc_test1"
+ERROR: new row for relation "atacc1" violates check constraint "atacc_test1"
-- should succeed
insert into atacc1 (test,test2,test3) values (4,4,5);
drop table atacc1;
alter table atacc1 add check (test2>test);
-- should fail for $2
insert into atacc1 (test2, test) values (3, 4);
-ERROR: new row for relation "atacc1" violates CHECK constraint "$1"
+ERROR: new row for relation "atacc1" violates check constraint "$1"
drop table atacc1;
-- inheritance related tests
create table atacc1 (test int);
alter table atacc2 add constraint foo check (test2>0);
-- fail and then succeed on atacc2
insert into atacc2 (test2) values (-3);
-ERROR: new row for relation "atacc2" violates CHECK constraint "foo"
+ERROR: new row for relation "atacc2" violates check constraint "foo"
insert into atacc2 (test2) values (3);
-- fail and then succeed on atacc3
insert into atacc3 (test2) values (-3);
-ERROR: new row for relation "atacc3" violates CHECK constraint "foo"
+ERROR: new row for relation "atacc3" violates check constraint "foo"
insert into atacc3 (test2) values (3);
drop table atacc3;
drop table atacc2;
alter table only atacc2 add constraint foo check (test2>0);
-- fail and then succeed on atacc2
insert into atacc2 (test2) values (-3);
-ERROR: new row for relation "atacc2" violates CHECK constraint "foo"
+ERROR: new row for relation "atacc2" violates check constraint "foo"
insert into atacc2 (test2) values (3);
-- both succeed on atacc3
insert into atacc3 (test2) values (-3);
insert into atacc1 (test) values (2);
-- should fail
insert into atacc1 (test) values (2);
-ERROR: duplicate key violates UNIQUE constraint "atacc_test1"
+ERROR: duplicate key violates unique constraint "atacc_test1"
-- should succeed
insert into atacc1 (test) values (4);
-- try adding a unique oid constraint
insert into atacc1 (test,test2) values (4,4);
-- should fail
insert into atacc1 (test,test2) values (4,4);
-ERROR: duplicate key violates UNIQUE constraint "atacc_test1"
+ERROR: duplicate key violates unique constraint "atacc_test1"
-- should all succeed
insert into atacc1 (test,test2) values (4,5);
insert into atacc1 (test,test2) values (5,4);
-- should fail for @@ second one @@
insert into atacc1 (test2, test) values (3, 3);
insert into atacc1 (test2, test) values (2, 3);
-ERROR: duplicate key violates UNIQUE constraint "atacc1_test_key"
+ERROR: duplicate key violates unique constraint "atacc1_test_key"
drop table atacc1;
-- test primary key constraint adding
create table atacc1 ( test int );
insert into atacc1 (test) values (2);
-- should fail
insert into atacc1 (test) values (2);
-ERROR: duplicate key violates UNIQUE constraint "atacc_test1"
+ERROR: duplicate key violates unique constraint "atacc_test1"
-- should succeed
insert into atacc1 (test) values (4);
-- inserting NULL should fail
insert into atacc1 (test) values(NULL);
-ERROR: null value for attribute "test" violates NOT NULL constraint
+ERROR: null value in column "test" violates not-null constraint
-- try adding a second primary key (should fail)
alter table atacc1 add constraint atacc_oid1 primary key(oid);
ERROR: multiple primary keys for table "atacc1" are not allowed
-- add a primary key (fails)
alter table atacc1 add constraint atacc_test1 primary key (test);
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "atacc_test1" for table "atacc1"
-ERROR: attribute "test" contains NULL values
+ERROR: column "test" contains null values
insert into atacc1 (test) values (3);
drop table atacc1;
-- let's do one where the primary key constraint fails
insert into atacc1 (test,test2) values (4,4);
-- should fail
insert into atacc1 (test,test2) values (4,4);
-ERROR: duplicate key violates UNIQUE constraint "atacc_test1"
+ERROR: duplicate key violates unique constraint "atacc_test1"
insert into atacc1 (test,test2) values (NULL,3);
-ERROR: null value for attribute "test" violates NOT NULL constraint
+ERROR: null value in column "test" violates not-null constraint
insert into atacc1 (test,test2) values (3, NULL);
-ERROR: null value for attribute "test2" violates NOT NULL constraint
+ERROR: null value in column "test2" violates not-null constraint
insert into atacc1 (test,test2) values (NULL,NULL);
-ERROR: null value for attribute "test" violates NOT NULL constraint
+ERROR: null value in column "test" violates not-null constraint
-- should all succeed
insert into atacc1 (test,test2) values (4,5);
insert into atacc1 (test,test2) values (5,4);
-- only first should succeed
insert into atacc1 (test2, test) values (3, 3);
insert into atacc1 (test2, test) values (2, 3);
-ERROR: duplicate key violates UNIQUE constraint "atacc1_pkey"
+ERROR: duplicate key violates unique constraint "atacc1_pkey"
insert into atacc1 (test2, test) values (1, NULL);
-ERROR: null value for attribute "test" violates NOT NULL constraint
+ERROR: null value in column "test" violates not-null constraint
drop table atacc1;
-- alter table / alter column [set/drop] not null tests
-- try altering system catalogs, should fail
alter table atacc1 add constraint "atacc1_pkey" primary key (test);
NOTICE: ALTER TABLE / ADD PRIMARY KEY will create implicit index "atacc1_pkey" for table "atacc1"
alter table atacc1 alter column test drop not null;
-ERROR: attribute "test" is in a primary key
+ERROR: column "test" is in a primary key
alter table atacc1 drop constraint "atacc1_pkey";
alter table atacc1 alter column test drop not null;
insert into atacc1 values (null);
alter table atacc1 alter test set not null;
-ERROR: attribute "test" contains NULL values
+ERROR: column "test" contains null values
delete from atacc1;
alter table atacc1 alter test set not null;
-- try altering a non-existent column, should fail
alter table atacc1 alter bar set not null;
-ERROR: attribute "bar" of relation "atacc1" does not exist
+ERROR: column "bar" of relation "atacc1" does not exist
alter table atacc1 alter bar drop not null;
-ERROR: attribute "bar" of relation "atacc1" does not exist
+ERROR: column "bar" of relation "atacc1" does not exist
-- try altering the oid column, should fail
alter table atacc1 alter oid set not null;
-ERROR: cannot alter system attribute "oid"
+ERROR: cannot alter system column "oid"
alter table atacc1 alter oid drop not null;
-ERROR: cannot alter system attribute "oid"
+ERROR: cannot alter system column "oid"
-- try creating a view and altering that, should fail
create view myview as select * from atacc1;
alter table myview alter column test drop not null;
create table child (b varchar(255)) inherits (parent);
alter table parent alter a set not null;
insert into parent values (NULL);
-ERROR: null value for attribute "a" violates NOT NULL constraint
+ERROR: null value in column "a" violates not-null constraint
insert into child (a, b) values (NULL, 'foo');
-ERROR: null value for attribute "a" violates NOT NULL constraint
+ERROR: null value in column "a" violates not-null constraint
alter table parent alter a drop not null;
insert into parent values (NULL);
insert into child (a, b) values (NULL, 'foo');
alter table only parent alter a set not null;
-ERROR: attribute "a" contains NULL values
+ERROR: column "a" contains null values
alter table child alter a set not null;
-ERROR: attribute "a" contains NULL values
+ERROR: column "a" contains null values
delete from parent;
alter table only parent alter a set not null;
insert into parent values (NULL);
-ERROR: null value for attribute "a" violates NOT NULL constraint
+ERROR: null value in column "a" violates not-null constraint
alter table child alter a set not null;
insert into child (a, b) values (NULL, 'foo');
-ERROR: null value for attribute "a" violates NOT NULL constraint
+ERROR: null value in column "a" violates not-null constraint
delete from child;
alter table child alter a set not null;
insert into child (a, b) values (NULL, 'foo');
-ERROR: null value for attribute "a" violates NOT NULL constraint
+ERROR: null value in column "a" violates not-null constraint
drop table child;
drop table parent;
-- test setting and removing default values
alter table def_test alter column c2 set default 20;
-- set defaults on a non-existent column: this should fail
alter table def_test alter column c3 set default 30;
-ERROR: attribute "c3" of relation "def_test" does not exist
+ERROR: column "c3" of relation "def_test" does not exist
-- set defaults on views: we need to create a view, add a rule
-- to allow insertions into it, and then alter the view to add
-- a default
insert into atacc1 values (1, 2, 3, 4);
alter table atacc1 drop a;
alter table atacc1 drop a;
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
-- SELECTs
select * from atacc1;
b | c | d
(1 row)
select * from atacc1 order by a;
-ERROR: attribute "a" not found
+ERROR: column "a" does not exist
select * from atacc1 order by "........pg.dropped.1........";
-ERROR: attribute "........pg.dropped.1........" not found
+ERROR: column "........pg.dropped.1........" does not exist
select * from atacc1 group by a;
-ERROR: attribute "a" not found
+ERROR: column "a" does not exist
select * from atacc1 group by "........pg.dropped.1........";
-ERROR: attribute "........pg.dropped.1........" not found
+ERROR: column "........pg.dropped.1........" does not exist
select atacc1.* from atacc1;
b | c | d
---+---+---
(1 row)
select a from atacc1;
-ERROR: attribute "a" not found
+ERROR: column "a" does not exist
select atacc1.a from atacc1;
-ERROR: no such attribute atacc1.a
+ERROR: column atacc1.a does not exist
select b,c,d from atacc1;
b | c | d
---+---+---
(1 row)
select a,b,c,d from atacc1;
-ERROR: attribute "a" not found
+ERROR: column "a" does not exist
select * from atacc1 where a = 1;
-ERROR: attribute "a" not found
+ERROR: column "a" does not exist
select "........pg.dropped.1........" from atacc1;
-ERROR: attribute "........pg.dropped.1........" not found
+ERROR: column "........pg.dropped.1........" does not exist
select atacc1."........pg.dropped.1........" from atacc1;
-ERROR: no such attribute atacc1.........pg.dropped.1........
+ERROR: column atacc1.........pg.dropped.1........ does not exist
select "........pg.dropped.1........",b,c,d from atacc1;
-ERROR: attribute "........pg.dropped.1........" not found
+ERROR: column "........pg.dropped.1........" does not exist
select * from atacc1 where "........pg.dropped.1........" = 1;
-ERROR: attribute "........pg.dropped.1........" not found
+ERROR: column "........pg.dropped.1........" does not exist
-- UPDATEs
update atacc1 set a = 3;
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
update atacc1 set b = 2 where a = 3;
-ERROR: attribute "a" not found
+ERROR: column "a" does not exist
update atacc1 set "........pg.dropped.1........" = 3;
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
update atacc1 set b = 2 where "........pg.dropped.1........" = 3;
-ERROR: attribute "........pg.dropped.1........" not found
+ERROR: column "........pg.dropped.1........" does not exist
-- INSERTs
insert into atacc1 values (10, 11, 12, 13);
ERROR: INSERT has more expressions than target columns
ERROR: INSERT has more expressions than target columns
insert into atacc1 values (11, 12, 13);
insert into atacc1 (a) values (10);
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
insert into atacc1 (a) values (default);
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
insert into atacc1 (a,b,c,d) values (10,11,12,13);
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
insert into atacc1 (a,b,c,d) values (default,11,12,13);
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
insert into atacc1 (b,c,d) values (11,12,13);
insert into atacc1 ("........pg.dropped.1........") values (10);
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
insert into atacc1 ("........pg.dropped.1........") values (default);
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
insert into atacc1 ("........pg.dropped.1........",b,c,d) values (10,11,12,13);
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
insert into atacc1 ("........pg.dropped.1........",b,c,d) values (default,11,12,13);
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
-- DELETEs
delete from atacc1 where a = 3;
-ERROR: attribute "a" not found
+ERROR: column "a" does not exist
delete from atacc1 where "........pg.dropped.1........" = 3;
-ERROR: attribute "........pg.dropped.1........" not found
+ERROR: column "........pg.dropped.1........" does not exist
delete from atacc1;
-- try dropping a non-existent column, should fail
alter table atacc1 drop bar;
-ERROR: attribute "bar" of relation "atacc1" does not exist
+ERROR: column "bar" of relation "atacc1" does not exist
-- try dropping the oid column, should fail
alter table atacc1 drop oid;
-ERROR: cannot drop system attribute "oid"
+ERROR: cannot drop system column "oid"
-- try creating a view and altering that, should fail
create view myview as select * from atacc1;
select * from myview;
drop view myview;
-- test some commands to make sure they fail on the dropped column
analyze atacc1(a);
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
analyze atacc1("........pg.dropped.1........");
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
vacuum analyze atacc1(a);
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
vacuum analyze atacc1("........pg.dropped.1........");
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
comment on column atacc1.a is 'testing';
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
comment on column atacc1."........pg.dropped.1........" is 'testing';
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
alter table atacc1 alter a set storage plain;
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
alter table atacc1 alter "........pg.dropped.1........" set storage plain;
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
alter table atacc1 alter a set statistics 0;
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
alter table atacc1 alter "........pg.dropped.1........" set statistics 0;
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
alter table atacc1 alter a set default 3;
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
alter table atacc1 alter "........pg.dropped.1........" set default 3;
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
alter table atacc1 alter a drop default;
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
alter table atacc1 alter "........pg.dropped.1........" drop default;
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
alter table atacc1 alter a set not null;
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
alter table atacc1 alter "........pg.dropped.1........" set not null;
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
alter table atacc1 alter a drop not null;
-ERROR: attribute "a" of relation "atacc1" does not exist
+ERROR: column "a" of relation "atacc1" does not exist
alter table atacc1 alter "........pg.dropped.1........" drop not null;
-ERROR: attribute "........pg.dropped.1........" of relation "atacc1" does not exist
+ERROR: column "........pg.dropped.1........" of relation "atacc1" does not exist
alter table atacc1 rename a to x;
-ERROR: attribute "a" does not exist
+ERROR: column "a" does not exist
alter table atacc1 rename "........pg.dropped.1........" to x;
-ERROR: attribute "........pg.dropped.1........" does not exist
+ERROR: column "........pg.dropped.1........" does not exist
alter table atacc1 add primary key(a);
ERROR: column "a" named in key does not exist
alter table atacc1 add primary key("........pg.dropped.1........");
alter table atacc1 add unique("........pg.dropped.1........");
ERROR: column "........pg.dropped.1........" named in key does not exist
alter table atacc1 add check (a > 3);
-ERROR: attribute "a" not found
+ERROR: column "a" does not exist
alter table atacc1 add check ("........pg.dropped.1........" > 3);
-ERROR: attribute "........pg.dropped.1........" not found
+ERROR: column "........pg.dropped.1........" does not exist
create table atacc2 (id int4 unique);
NOTICE: CREATE TABLE / UNIQUE will create implicit index "atacc2_id_key" for table "atacc2"
alter table atacc1 add foreign key (a) references atacc2(id);
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
ERROR: column "a" referenced in foreign key constraint does not exist
alter table atacc1 add foreign key ("........pg.dropped.1........") references atacc2(id);
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
ERROR: column "........pg.dropped.1........" referenced in foreign key constraint does not exist
alter table atacc2 add foreign key (id) references atacc1(a);
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
ERROR: column "a" referenced in foreign key constraint does not exist
alter table atacc2 add foreign key (id) references atacc1("........pg.dropped.1........");
-NOTICE: ALTER TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: ALTER TABLE will create implicit triggers for foreign-key checks
ERROR: column "........pg.dropped.1........" referenced in foreign key constraint does not exist
drop table atacc2;
create index "testing_idx" on atacc1(a);
-ERROR: attribute "a" does not exist
+ERROR: column "a" does not exist
create index "testing_idx" on atacc1("........pg.dropped.1........");
-ERROR: attribute "........pg.dropped.1........" does not exist
+ERROR: column "........pg.dropped.1........" does not exist
-- test create as and select into
insert into atacc1 values (21, 22, 23);
create table test1 as select * from atacc1;
copy test to stdout;
2 3
copy test(a) to stdout;
-ERROR: attribute "a" of relation "test" does not exist
+ERROR: column "a" of relation "test" does not exist
copy test("........pg.dropped.1........") to stdout;
-ERROR: attribute "........pg.dropped.1........" of relation "test" does not exist
+ERROR: column "........pg.dropped.1........" of relation "test" does not exist
copy test from stdin;
ERROR: extra data after last expected column
CONTEXT: COPY FROM, line 1
(2 rows)
copy test(a) from stdin;
-ERROR: attribute "a" of relation "test" does not exist
+ERROR: column "a" of relation "test" does not exist
copy test("........pg.dropped.1........") from stdin;
-ERROR: attribute "........pg.dropped.1........" of relation "test" does not exist
+ERROR: column "........pg.dropped.1........" of relation "test" does not exist
copy test(b,c) from stdin;
select * from test;
b | c
create table dropColumnAnother (d int) inherits (dropColumnChild);
-- these two should fail
alter table dropColumnchild drop column a;
-ERROR: cannot drop inherited attribute "a"
+ERROR: cannot drop inherited column "a"
alter table only dropColumnChild drop column b;
-ERROR: cannot drop inherited attribute "b"
+ERROR: cannot drop inherited column "b"
-- these three should work
alter table only dropColumn drop column e;
alter table dropColumnChild drop column c;
create table renameColumnAnother (c int) inherits (renameColumnChild);
-- these three should fail
alter table renameColumnChild rename column a to d;
-ERROR: cannot rename inherited attribute "a"
+ERROR: cannot rename inherited column "a"
alter table only renameColumnChild rename column a to d;
-ERROR: inherited attribute "a" must be renamed in child tables too
+ERROR: inherited column "a" must be renamed in child tables too
alter table only renameColumn rename column a to d;
-ERROR: inherited attribute "a" must be renamed in child tables too
+ERROR: inherited column "a" must be renamed in child tables too
-- these should work
alter table renameColumn rename column a to d;
alter table renameColumnChild rename column b to a;
alter table renameColumn add column w int;
-- this should fail
alter table only renameColumn add column x int;
-ERROR: attribute must be added to child tables too
+ERROR: column must be added to child tables too
-- Test corner cases in dropping of inherited columns
create table p1 (f1 int, f2 int);
create table c1 (f1 int not null) inherits(p1);
-NOTICE: merging attribute "f1" with inherited definition
+NOTICE: merging column "f1" with inherited definition
-- should be rejected since c1.f1 is inherited
alter table c1 drop column f1;
-ERROR: cannot drop inherited attribute "f1"
+ERROR: cannot drop inherited column "f1"
-- should work
alter table p1 drop column f1;
-- c1.f1 is still there, but no longer inherited
alter table c1 drop column f1;
select f1 from c1;
-ERROR: attribute "f1" not found
+ERROR: column "f1" does not exist
drop table p1 cascade;
NOTICE: drop cascades to table c1
create table p1 (f1 int, f2 int);
create table c1 () inherits(p1);
-- should be rejected since c1.f1 is inherited
alter table c1 drop column f1;
-ERROR: cannot drop inherited attribute "f1"
+ERROR: cannot drop inherited column "f1"
alter table p1 drop column f1;
-- c1.f1 is dropped now, since there is no local definition for it
select f1 from c1;
-ERROR: attribute "f1" not found
+ERROR: column "f1" does not exist
drop table p1 cascade;
NOTICE: drop cascades to table c1
create table p1 (f1 int, f2 int);
create table c1 () inherits(p1);
-- should be rejected since c1.f1 is inherited
alter table c1 drop column f1;
-ERROR: cannot drop inherited attribute "f1"
+ERROR: cannot drop inherited column "f1"
alter table only p1 drop column f1;
-- c1.f1 is NOT dropped, but must now be considered non-inherited
alter table c1 drop column f1;
NOTICE: drop cascades to table c1
create table p1 (f1 int, f2 int);
create table c1 (f1 int not null) inherits(p1);
-NOTICE: merging attribute "f1" with inherited definition
+NOTICE: merging column "f1" with inherited definition
-- should be rejected since c1.f1 is inherited
alter table c1 drop column f1;
-ERROR: cannot drop inherited attribute "f1"
+ERROR: cannot drop inherited column "f1"
alter table only p1 drop column f1;
-- c1.f1 is still there, but no longer inherited
alter table c1 drop column f1;
create table p1(id int, name text);
create table p2(id2 int, name text, height int);
create table c1(age int) inherits(p1,p2);
-NOTICE: merging multiple inherited definitions of attribute "name"
+NOTICE: merging multiple inherited definitions of column "name"
create table gc1() inherits (c1);
select relname, attname, attinhcount, attislocal
from pg_class join pg_attribute on (pg_class.oid = pg_attribute.attrelid)
alter table p2 drop column name;
-- should be rejected since its inherited
alter table gc1 drop column name;
-ERROR: cannot drop inherited attribute "name"
+ERROR: cannot drop inherited column "name"
-- should work, and drop gc1.name along
alter table c1 drop column name;
-- should fail: column does not exist
alter table gc1 drop column name;
-ERROR: attribute "name" of relation "gc1" does not exist
+ERROR: column "name" of relation "gc1" does not exist
-- should work and drop the attribute in all tables
alter table p2 drop column height;
select relname, attname, attinhcount, attislocal
alter table altstartwith set without oids;
select oid > 0, * from altstartwith; -- fails
-ERROR: attribute "oid" not found
+ERROR: column "oid" does not exist
select * from altstartwith;
col
-----
alter table altwithoid set without oids;
alter table altinhoid set without oids;
select oid > 0, * from altwithoid; -- fails
-ERROR: attribute "oid" not found
+ERROR: column "oid" does not exist
select oid > 0, * from altinhoid; -- fails
-ERROR: attribute "oid" not found
+ERROR: column "oid" does not exist
select * from altwithoid;
col
-----
NOTICE: merging definition of column "f2" for child "c1"
insert into p1 values (1,2,'abc');
insert into c1 values(11,'xyz',33,0); -- should fail
-ERROR: new row for relation "c1" violates CHECK constraint "p1_a1"
+ERROR: new row for relation "c1" violates check constraint "p1_a1"
insert into c1 values(11,'xyz',33,22);
select * from p1;
f1 | a1 | f2
insert into arr_tbl values ('{1,2}');
-- failure expected:
insert into arr_tbl values ('{1,2,3}');
-ERROR: duplicate key violates UNIQUE constraint "arr_tbl_f1_key"
+ERROR: duplicate key violates unique constraint "arr_tbl_f1_key"
insert into arr_tbl values ('{2,3,4}');
insert into arr_tbl values ('{1,5,3}');
insert into arr_tbl values ('{1,2,10}');
-- For pre-v6.3 this evaluated to false - thomas 1997-10-23
INSERT INTO BOOLTBL2 (f1)
VALUES (bool 'XXX');
-ERROR: invalid input syntax for boolean: "XXX"
+ERROR: invalid input syntax for type boolean: "XXX"
-- BOOLTBL2 should be full of false's at this point
SELECT '' AS f_4, BOOLTBL2.*;
f_4 | f1
INSERT INTO BOX_TBL (f1) VALUES ('(3.0, 3.0,3.0,3.0)');
-- badly formatted box inputs
INSERT INTO BOX_TBL (f1) VALUES ('(2.3, 4.5)');
-ERROR: invalid input syntax for box: "(2.3, 4.5)"
+ERROR: invalid input syntax for type box: "(2.3, 4.5)"
INSERT INTO BOX_TBL (f1) VALUES ('asdfasdf(ad');
-ERROR: invalid input syntax for box: "asdfasdf(ad"
+ERROR: invalid input syntax for type box: "asdfasdf(ad"
SELECT '' AS four, BOX_TBL.*;
four | f1
------+---------------------
INSERT INTO CIRCLE_TBL VALUES ('<(100,1),115>');
-- bad values
INSERT INTO CIRCLE_TBL VALUES ('<(-100,0),-100>');
-ERROR: invalid input syntax for circle: "<(-100,0),-100>"
+ERROR: invalid input syntax for type circle: "<(-100,0),-100>"
INSERT INTO CIRCLE_TBL VALUES ('1abc,3,5');
-ERROR: invalid input syntax for circle: "1abc,3,5"
+ERROR: invalid input syntax for type circle: "1abc,3,5"
INSERT INTO CIRCLE_TBL VALUES ('(3,(1,2),3)');
-ERROR: invalid input syntax for circle: "(3,(1,2),3)"
+ERROR: invalid input syntax for type circle: "(3,(1,2),3)"
SELECT * FROM CIRCLE_TBL;
f1
----------------
--
CREATE TABLE clstr_tst_s (rf_a SERIAL PRIMARY KEY,
b INT);
-NOTICE: CREATE TABLE will create implicit sequence "clstr_tst_s_rf_a_seq" for SERIAL column "clstr_tst_s.rf_a"
+NOTICE: CREATE TABLE will create implicit sequence "clstr_tst_s_rf_a_seq" for "serial" column "clstr_tst_s.rf_a"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_tst_s_pkey" for table "clstr_tst_s"
CREATE TABLE clstr_tst (a SERIAL PRIMARY KEY,
b INT,
c TEXT,
d TEXT,
CONSTRAINT clstr_tst_con FOREIGN KEY (b) REFERENCES clstr_tst_s);
-NOTICE: CREATE TABLE will create implicit sequence "clstr_tst_a_seq" for SERIAL column "clstr_tst.a"
+NOTICE: CREATE TABLE will create implicit sequence "clstr_tst_a_seq" for "serial" column "clstr_tst.a"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "clstr_tst_pkey" for table "clstr_tst"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
CREATE INDEX clstr_tst_b ON clstr_tst (b);
CREATE INDEX clstr_tst_c ON clstr_tst (c);
CREATE INDEX clstr_tst_c_b ON clstr_tst (c,b);
-- Verify that foreign key link still works
INSERT INTO clstr_tst (b, c) VALUES (1111, 'this should fail');
-ERROR: insert or update on "clstr_tst" violates foreign key constraint "clstr_tst_con"
-DETAIL: Key (b)=(1111) is not present in "clstr_tst_s".
+ERROR: insert or update on table "clstr_tst" violates foreign key constraint "clstr_tst_con"
+DETAIL: Key (b)=(1111) is not present in table "clstr_tst_s".
SELECT conname FROM pg_constraint WHERE conrelid = 'clstr_tst'::regclass;
conname
----------------
d text not null,
e text
);
-NOTICE: CREATE TABLE will create implicit sequence "x_a_seq" for SERIAL column "x.a"
+NOTICE: CREATE TABLE will create implicit sequence "x_a_seq" for "serial" column "x.a"
CREATE FUNCTION fn_x_before () RETURNS TRIGGER AS '
BEGIN
NEW.e := ''before trigger fired''::text;
COPY x (a, b, c, d, e) from stdin;
-- non-existent column in column list: should fail
COPY x (xyz) from stdin;
-ERROR: attribute "xyz" of relation "x" does not exist
+ERROR: column "xyz" of relation "x" does not exist
-- too many columns in column list: should fail
COPY x (a, b, c, d, e, d, c) from stdin;
-ERROR: attribute "d" specified more than once
+ERROR: column "d" specified more than once
-- missing data: should fail
COPY x from stdin;
ERROR: invalid input syntax for integer: ""
INSERT INTO func_index_heap VALUES('QWE','RTY');
-- this should fail because of unique index:
INSERT INTO func_index_heap VALUES('ABCD', 'EF');
-ERROR: duplicate key violates UNIQUE constraint "func_index_index"
+ERROR: duplicate key violates unique constraint "func_index_index"
-- but this shouldn't:
INSERT INTO func_index_heap VALUES('QWERTY');
--
INSERT INTO func_index_heap VALUES('QWE','RTY');
-- this should fail because of unique index:
INSERT INTO func_index_heap VALUES('ABCD', 'EF');
-ERROR: duplicate key violates UNIQUE constraint "func_index_index"
+ERROR: duplicate key violates unique constraint "func_index_index"
-- but this shouldn't:
INSERT INTO func_index_heap VALUES('QWERTY');
--
CREATE TABLE stud_emp (
percent int4
) INHERITS (emp, student);
-NOTICE: merging multiple inherited definitions of attribute "name"
-NOTICE: merging multiple inherited definitions of attribute "age"
-NOTICE: merging multiple inherited definitions of attribute "location"
+NOTICE: merging multiple inherited definitions of column "name"
+NOTICE: merging multiple inherited definitions of column "age"
+NOTICE: merging multiple inherited definitions of column "location"
CREATE TABLE city (
name name,
location box,
CREATE TABLE d_star (
d float8
) INHERITS (b_star, c_star);
-NOTICE: merging multiple inherited definitions of attribute "class"
-NOTICE: merging multiple inherited definitions of attribute "a"
+NOTICE: merging multiple inherited definitions of column "class"
+NOTICE: merging multiple inherited definitions of column "a"
CREATE TABLE e_star (
e int2
) INHERITS (c_star);
, col5 dcheck CHECK (col5 IN ('c', 'd'))
);
INSERT INTO nulltest DEFAULT VALUES;
-ERROR: domain dnotnull does not allow NULL values
+ERROR: domain dnotnull does not allow null values
INSERT INTO nulltest values ('a', 'b', 'c', 'd', 'c'); -- Good
insert into nulltest values ('a', 'b', 'c', 'd', NULL);
-ERROR: domain dcheck does not allow NULL values
+ERROR: domain dcheck does not allow null values
insert into nulltest values ('a', 'b', 'c', 'd', 'a');
-ERROR: new row for relation "nulltest" violates CHECK constraint "nulltest_col5"
+ERROR: new row for relation "nulltest" violates check constraint "nulltest_col5"
INSERT INTO nulltest values (NULL, 'b', 'c', 'd', 'd');
-ERROR: domain dnotnull does not allow NULL values
+ERROR: domain dnotnull does not allow null values
INSERT INTO nulltest values ('a', NULL, 'c', 'd', 'c');
-ERROR: domain dnotnull does not allow NULL values
+ERROR: domain dnotnull does not allow null values
INSERT INTO nulltest values ('a', 'b', NULL, 'd', 'c');
-ERROR: null value for attribute "col3" violates NOT NULL constraint
+ERROR: null value in column "col3" violates not-null constraint
INSERT INTO nulltest values ('a', 'b', 'c', NULL, 'd'); -- Good
-- Test copy
COPY nulltest FROM stdin; --fail
-ERROR: domain dcheck does not allow NULL values
+ERROR: domain dcheck does not allow null values
CONTEXT: COPY FROM, line 1
-- Last row is bad
COPY nulltest FROM stdin;
-ERROR: new row for relation "nulltest" violates CHECK constraint "nulltest_col5"
+ERROR: new row for relation "nulltest" violates check constraint "nulltest_col5"
CONTEXT: COPY FROM, line 3
select * from nulltest;
col1 | col2 | col3 | col4 | col5
(1 row)
SELECT cast(NULL as dnotnull); -- fail
-ERROR: domain dnotnull does not allow NULL values
+ERROR: domain dnotnull does not allow null values
SELECT cast(cast(NULL as dnull) as dnotnull); -- fail
-ERROR: domain dnotnull does not allow NULL values
+ERROR: domain dnotnull does not allow null values
SELECT cast(col4 as dnotnull) from nulltest; -- fail
-ERROR: domain dnotnull does not allow NULL values
+ERROR: domain dnotnull does not allow null values
-- cleanup
drop table nulltest;
drop domain dnotnull restrict;
);
insert into domnotnull default values;
alter domain dnotnulltest set not null; -- fails
-ERROR: relation "domnotnull" attribute "col1" contains NULL values
+ERROR: column "col1" of table "domnotnull" contains null values
update domnotnull set col1 = 5;
alter domain dnotnulltest set not null; -- fails
-ERROR: relation "domnotnull" attribute "col2" contains NULL values
+ERROR: column "col2" of table "domnotnull" contains null values
update domnotnull set col2 = 6;
alter domain dnotnulltest set not null;
update domnotnull set col1 = null; -- fails
-ERROR: domain dnotnulltest does not allow NULL values
+ERROR: domain dnotnulltest does not allow null values
alter domain dnotnulltest drop not null;
update domnotnull set col1 = null;
drop domain dnotnulltest cascade;
insert into domcontest values (1);
insert into domcontest values (2);
alter domain con add constraint t check (VALUE < 1); -- fails
-ERROR: relation "domcontest" attribute "col1" contains values that violate the new constraint
+ERROR: relation "domcontest" column "col1" contains values that violate the new constraint
alter domain con add constraint t check (VALUE < 34);
alter domain con add check (VALUE > 0);
insert into domcontest values (-5); -- fails
-ERROR: value for domain con violates CHECK constraint "$1"
+ERROR: value for domain con violates check constraint "$1"
insert into domcontest values (42); -- fails
-ERROR: value for domain con violates CHECK constraint "t"
+ERROR: value for domain con violates check constraint "t"
insert into domcontest values (5);
alter domain con drop constraint t;
insert into domcontest values (-5); --fails
-ERROR: value for domain con violates CHECK constraint "$1"
+ERROR: value for domain con violates check constraint "$1"
insert into domcontest values (42);
-- Confirm ALTER DOMAIN with RULES.
create table domtab (col1 integer);
alter domain dom set not null;
select * from domview; -- fail
-ERROR: domain dom does not allow NULL values
+ERROR: domain dom does not allow null values
alter domain dom drop not null;
select * from domview;
col1
alter domain dom add constraint domchkgt6 check(value > 6);
select * from domview; --fail
-ERROR: value for domain dom violates CHECK constraint "domchkgt6"
+ERROR: value for domain dom violates check constraint "domchkgt6"
alter domain dom drop constraint domchkgt6 restrict;
select * from domview;
col1
ERROR: syntax error at or near "from" at character 8
-- bad name in target list
select nonesuch from pg_database;
-ERROR: attribute "nonesuch" not found
+ERROR: column "nonesuch" does not exist
-- bad attribute name on lhs of operator
select * from pg_database where nonesuch = pg_database.datname;
-ERROR: attribute "nonesuch" not found
+ERROR: column "nonesuch" does not exist
-- bad attribute name on rhs of operator
select * from pg_database where pg_database.datname = nonesuch;
-ERROR: attribute "nonesuch" not found
+ERROR: column "nonesuch" does not exist
-- bad select distinct on syntax, distinct attribute missing
select distinct on (foobar) from pg_database;
ERROR: syntax error at or near "from" at character 29
-- bad select distinct on syntax, distinct attribute not in target list
select distinct on (foobar) * from pg_database;
-ERROR: attribute "foobar" not found
+ERROR: column "foobar" does not exist
--
-- DELETE
ERROR: relation "nonesuchrel" does not exist
-- no such attribute
alter table emp rename column nonesuchatt to newnonesuchatt;
-ERROR: attribute "nonesuchatt" does not exist
+ERROR: column "nonesuchatt" does not exist
-- conflict
alter table emp rename column salary to manager;
-ERROR: attribute "manager" of relation "stud_emp" already exists
+ERROR: column "manager" of relation "stud_emp" already exists
-- conflict
alter table emp rename column salary to oid;
-ERROR: attribute "oid" of relation "stud_emp" already exists
+ERROR: column "oid" of relation "stud_emp" already exists
--
-- TRANSACTION STUFF
INSERT INTO FLOAT4_TBL(f1) VALUES ('1.2345678901234e-20');
-- test for over and under flow
INSERT INTO FLOAT4_TBL(f1) VALUES ('10e40');
-ERROR: float4 value out of range: overflow
+ERROR: type "real" value out of range: overflow
INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e40');
-ERROR: float4 value out of range: overflow
+ERROR: type "real" value out of range: overflow
INSERT INTO FLOAT4_TBL(f1) VALUES ('10e-40');
-ERROR: float4 value out of range: underflow
+ERROR: type "real" value out of range: underflow
INSERT INTO FLOAT4_TBL(f1) VALUES ('-10e-40');
-ERROR: float4 value out of range: underflow
+ERROR: type "real" value out of range: underflow
SELECT '' AS five, FLOAT4_TBL.*;
five | f1
------+-------------
SET f1 = FLOAT8_TBL.f1 * '-1'
WHERE FLOAT8_TBL.f1 > '0.0';
SELECT '' AS bad, f.f1 * '1e200' from FLOAT8_TBL f;
-ERROR: float8 value out of range: overflow
+ERROR: type "double precision" value out of range: overflow
SELECT '' AS bad, f.f1 ^ '1e200' from FLOAT8_TBL f;
ERROR: result is out of range
SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 = '0.0' ;
-ERROR: cannot take log of zero
+ERROR: cannot take logarithm of zero
SELECT '' AS bad, ln(f.f1) from FLOAT8_TBL f where f.f1 < '0.0' ;
-ERROR: cannot take log of a negative number
+ERROR: cannot take logarithm of a negative number
SELECT '' AS bad, exp(f.f1) from FLOAT8_TBL f;
ERROR: result is out of range
SELECT '' AS bad, f.f1 / '0.0' from FLOAT8_TBL f;
-- test for over- and underflow
INSERT INTO FLOAT8_TBL(f1) VALUES ('10e400');
-ERROR: "10e400" is out of range for float8
+ERROR: "10e400" is out of range for type double precision
INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e400');
-ERROR: "-10e400" is out of range for float8
+ERROR: "-10e400" is out of range for type double precision
INSERT INTO FLOAT8_TBL(f1) VALUES ('10e-400');
-ERROR: "10e-400" is out of range for float8
+ERROR: "10e-400" is out of range for type double precision
INSERT INTO FLOAT8_TBL(f1) VALUES ('-10e-400');
-ERROR: "-10e-400" is out of range for float8
+ERROR: "-10e-400" is out of range for type double precision
-- maintain external table consistency across platforms
-- delete all values and reinsert well-behaved ones
DELETE FROM FLOAT8_TBL;
CREATE TABLE PKTABLE ( ptest1 int PRIMARY KEY, ptest2 text );
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
CREATE TABLE FKTABLE ( ftest1 int REFERENCES PKTABLE MATCH FULL ON DELETE CASCADE ON UPDATE CASCADE, ftest2 int );
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
-- Insert test data into PKTABLE
INSERT INTO PKTABLE VALUES (1, 'Test1');
INSERT INTO PKTABLE VALUES (2, 'Test2');
INSERT INTO FKTABLE VALUES (NULL, 1);
-- Insert a failed row into FK TABLE
INSERT INTO FKTABLE VALUES (100, 2);
-ERROR: insert or update on "fktable" violates foreign key constraint "$1"
-DETAIL: Key (ftest1)=(100) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "$1"
+DETAIL: Key (ftest1)=(100) is not present in table "pktable".
-- Check FKTABLE
SELECT * FROM FKTABLE;
ftest1 | ftest2
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, CONSTRAINT constrname FOREIGN KEY(ftest1, ftest2)
REFERENCES PKTABLE MATCH FULL ON DELETE SET NULL ON UPDATE SET NULL);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
-- Insert test data into PKTABLE
INSERT INTO PKTABLE VALUES (1, 2, 'Test1');
INSERT INTO PKTABLE VALUES (1, 3, 'Test1-2');
INSERT INTO FKTABLE VALUES (NULL, NULL, 0);
-- Insert failed rows into FK TABLE
INSERT INTO FKTABLE VALUES (100, 2, 4);
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname"
-DETAIL: Key (ftest1,ftest2)=(100,2) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname"
+DETAIL: Key (ftest1,ftest2)=(100,2) is not present in table "pktable".
INSERT INTO FKTABLE VALUES (2, 2, 4);
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname"
-DETAIL: Key (ftest1,ftest2)=(2,2) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname"
+DETAIL: Key (ftest1,ftest2)=(2,2) is not present in table "pktable".
INSERT INTO FKTABLE VALUES (NULL, 2, 4);
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname"
-DETAIL: MATCH FULL does not allow mixing of NULL and non-NULL key values.
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname"
+DETAIL: MATCH FULL does not allow mixing of null and nonnull key values.
INSERT INTO FKTABLE VALUES (1, NULL, 4);
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname"
-DETAIL: MATCH FULL does not allow mixing of NULL and non-NULL key values.
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname"
+DETAIL: MATCH FULL does not allow mixing of null and nonnull key values.
-- Check FKTABLE
SELECT * FROM FKTABLE;
ftest1 | ftest2 | ftest3
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
CREATE TABLE FKTABLE ( ftest1 int DEFAULT -1, ftest2 int DEFAULT -2, ftest3 int, CONSTRAINT constrname2 FOREIGN KEY(ftest1, ftest2)
REFERENCES PKTABLE MATCH FULL ON DELETE SET DEFAULT ON UPDATE SET DEFAULT);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
-- Insert a value in PKTABLE for default
INSERT INTO PKTABLE VALUES (-1, -2, 'The Default!');
-- Insert test data into PKTABLE
INSERT INTO FKTABLE VALUES (NULL, NULL, 0);
-- Insert failed rows into FK TABLE
INSERT INTO FKTABLE VALUES (100, 2, 4);
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname2"
-DETAIL: Key (ftest1,ftest2)=(100,2) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname2"
+DETAIL: Key (ftest1,ftest2)=(100,2) is not present in table "pktable".
INSERT INTO FKTABLE VALUES (2, 2, 4);
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname2"
-DETAIL: Key (ftest1,ftest2)=(2,2) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname2"
+DETAIL: Key (ftest1,ftest2)=(2,2) is not present in table "pktable".
INSERT INTO FKTABLE VALUES (NULL, 2, 4);
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname2"
-DETAIL: MATCH FULL does not allow mixing of NULL and non-NULL key values.
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname2"
+DETAIL: MATCH FULL does not allow mixing of null and nonnull key values.
INSERT INTO FKTABLE VALUES (1, NULL, 4);
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname2"
-DETAIL: MATCH FULL does not allow mixing of NULL and non-NULL key values.
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname2"
+DETAIL: MATCH FULL does not allow mixing of null and nonnull key values.
-- Check FKTABLE
SELECT * FROM FKTABLE;
ftest1 | ftest2 | ftest3
CREATE TABLE PKTABLE ( ptest1 int PRIMARY KEY, ptest2 text );
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
CREATE TABLE FKTABLE ( ftest1 int REFERENCES PKTABLE MATCH FULL, ftest2 int );
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
-- Insert test data into PKTABLE
INSERT INTO PKTABLE VALUES (1, 'Test1');
INSERT INTO PKTABLE VALUES (2, 'Test2');
INSERT INTO FKTABLE VALUES (NULL, 1);
-- Insert a failed row into FK TABLE
INSERT INTO FKTABLE VALUES (100, 2);
-ERROR: insert or update on "fktable" violates foreign key constraint "$1"
-DETAIL: Key (ftest1)=(100) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "$1"
+DETAIL: Key (ftest1)=(100) is not present in table "pktable".
-- Check FKTABLE
SELECT * FROM FKTABLE;
ftest1 | ftest2
-- Delete a row from PK TABLE (should fail)
DELETE FROM PKTABLE WHERE ptest1=1;
ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "fktable"
-DETAIL: Key (ptest1)=(1) is still referenced from "fktable".
+DETAIL: Key (ptest1)=(1) is still referenced from table "fktable".
-- Delete a row from PK TABLE (should succeed)
DELETE FROM PKTABLE WHERE ptest1=5;
-- Check PKTABLE for deletes
-- Update a row from PK TABLE (should fail)
UPDATE PKTABLE SET ptest1=0 WHERE ptest1=2;
ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "fktable"
-DETAIL: Key (ptest1)=(2) is still referenced from "fktable".
+DETAIL: Key (ptest1)=(2) is still referenced from table "fktable".
-- Update a row from PK TABLE (should succeed)
UPDATE PKTABLE SET ptest1=0 WHERE ptest1=4;
-- Check PKTABLE for updates
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, ftest4 int, CONSTRAINT constrname3
FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
-- Insert Primary Key values
INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1');
INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2');
INSERT INTO FKTABLE VALUES (NULL, 3, 4, 5);
-- Insert a failed values
INSERT INTO FKTABLE VALUES (1, 2, 7, 6);
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname3"
-DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3"
+DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in table "pktable".
-- Show FKTABLE
SELECT * from FKTABLE;
ftest1 | ftest2 | ftest3 | ftest4
-- Try to update something that should fail
UPDATE PKTABLE set ptest2=5 where ptest2=2;
ERROR: update or delete on "pktable" violates foreign key constraint "constrname3" on "fktable"
-DETAIL: Key (ptest1,ptest2,ptest3)=(1,2,3) is still referenced from "fktable".
+DETAIL: Key (ptest1,ptest2,ptest3)=(1,2,3) is still referenced from table "fktable".
-- Try to update something that should succeed
UPDATE PKTABLE set ptest1=1 WHERE ptest2=3;
-- Try to delete something that should fail
DELETE FROM PKTABLE where ptest1=1 and ptest2=2 and ptest3=3;
ERROR: update or delete on "pktable" violates foreign key constraint "constrname3" on "fktable"
-DETAIL: Key (ptest1,ptest2,ptest3)=(1,2,3) is still referenced from "fktable".
+DETAIL: Key (ptest1,ptest2,ptest3)=(1,2,3) is still referenced from table "fktable".
-- Try to delete something that should work
DELETE FROM PKTABLE where ptest1=2;
-- Show PKTABLE and FKTABLE
CREATE TABLE FKTABLE ( ftest1 int, ftest2 int, ftest3 int, ftest4 int, CONSTRAINT constrname3
FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE
ON DELETE CASCADE ON UPDATE CASCADE);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
-- Insert Primary Key values
INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1');
INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2');
INSERT INTO FKTABLE VALUES (NULL, 3, 4, 5);
-- Insert a failed values
INSERT INTO FKTABLE VALUES (1, 2, 7, 6);
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname3"
-DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3"
+DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in table "pktable".
-- Show FKTABLE
SELECT * from FKTABLE;
ftest1 | ftest2 | ftest3 | ftest4
CREATE TABLE FKTABLE ( ftest1 int DEFAULT 0, ftest2 int, ftest3 int, ftest4 int, CONSTRAINT constrname3
FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE
ON DELETE SET DEFAULT ON UPDATE SET NULL);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
-- Insert Primary Key values
INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1');
INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2');
INSERT INTO FKTABLE VALUES (NULL, 3, 4, 5);
-- Insert a failed values
INSERT INTO FKTABLE VALUES (1, 2, 7, 6);
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname3"
-DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3"
+DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in table "pktable".
-- Show FKTABLE
SELECT * from FKTABLE;
ftest1 | ftest2 | ftest3 | ftest4
CREATE TABLE FKTABLE ( ftest1 int DEFAULT 0, ftest2 int DEFAULT -1, ftest3 int, ftest4 int, CONSTRAINT constrname3
FOREIGN KEY(ftest1, ftest2, ftest3) REFERENCES PKTABLE
ON DELETE SET NULL ON UPDATE SET DEFAULT);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
-- Insert Primary Key values
INSERT INTO PKTABLE VALUES (1, 2, 3, 'test1');
INSERT INTO PKTABLE VALUES (1, 3, 3, 'test2');
INSERT INTO FKTABLE VALUES (NULL, 3, 4, 5);
-- Insert a failed values
INSERT INTO FKTABLE VALUES (1, 2, 7, 6);
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname3"
-DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3"
+DETAIL: Key (ftest1,ftest2,ftest3)=(1,2,7) is not present in table "pktable".
-- Show FKTABLE
SELECT * from FKTABLE;
ftest1 | ftest2 | ftest3 | ftest4
-- Try to update something that will fail
UPDATE PKTABLE set ptest2=5 where ptest2=2;
-ERROR: insert or update on "fktable" violates foreign key constraint "constrname3"
-DETAIL: Key (ftest1,ftest2,ftest3)=(1,-1,3) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "constrname3"
+DETAIL: Key (ftest1,ftest2,ftest3)=(1,-1,3) is not present in table "pktable".
-- Try to update something that will set default
UPDATE PKTABLE set ptest1=0, ptest2=5, ptest3=10 where ptest2=2;
UPDATE PKTABLE set ptest2=10 where ptest2=4;
CREATE TABLE PKTABLE (ptest1 int PRIMARY KEY);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
CREATE TABLE FKTABLE_FAIL1 ( ftest1 int, CONSTRAINT fkfail1 FOREIGN KEY (ftest2) REFERENCES PKTABLE);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: column "ftest2" referenced in foreign key constraint does not exist
CREATE TABLE FKTABLE_FAIL2 ( ftest1 int, CONSTRAINT fkfail1 FOREIGN KEY (ftest1) REFERENCES PKTABLE(ptest2));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: column "ptest2" referenced in foreign key constraint does not exist
DROP TABLE FKTABLE_FAIL1;
ERROR: table "fktable_fail1" does not exist
CREATE TABLE PKTABLE (ptest1 int, ptest2 int, UNIQUE(ptest1, ptest2));
NOTICE: CREATE TABLE / UNIQUE will create implicit index "pktable_ptest1_key" for table "pktable"
CREATE TABLE FKTABLE_FAIL1 (ftest1 int REFERENCES pktable(ptest1));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
-ERROR: there is no UNIQUE constraint matching given keys for referenced table "pktable"
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
+ERROR: there is no unique constraint matching given keys for referenced table "pktable"
DROP TABLE FKTABLE_FAIL1;
ERROR: table "fktable_fail1" does not exist
DROP TABLE PKTABLE;
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-- This next should fail, because inet=int does not exist
CREATE TABLE FKTABLE (ftest1 inet REFERENCES pktable);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- This should also fail for the same reason, but here we
-- give the column name
CREATE TABLE FKTABLE (ftest1 inet REFERENCES pktable(ptest1));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- This should succeed, even though they are different types
-- because varchar=int does exist
CREATE TABLE FKTABLE (ftest1 varchar REFERENCES pktable);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
DROP TABLE FKTABLE;
-- As should this
CREATE TABLE FKTABLE (ftest1 varchar REFERENCES pktable(ptest1));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
DROP TABLE FKTABLE;
DROP TABLE PKTABLE;
-- Two columns, two tables
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-- This should fail, because we just chose really odd types
CREATE TABLE FKTABLE (ftest1 cidr, ftest2 timestamp, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: cidr = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- Again, so should this...
CREATE TABLE FKTABLE (ftest1 cidr, ftest2 timestamp, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest1, ptest2));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: cidr = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- This fails because we mixed up the column ordering
CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest2, ftest1) REFERENCES pktable);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- As does this...
CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest2, ftest1) REFERENCES pktable(ptest1, ptest2));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- And again..
CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest2, ptest1));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: integer = inet
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- This works...
CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest2, ftest1) REFERENCES pktable(ptest2, ptest1));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
DROP TABLE FKTABLE;
-- As does this
CREATE TABLE FKTABLE (ftest1 int, ftest2 inet, FOREIGN KEY(ftest1, ftest2) REFERENCES pktable(ptest1, ptest2));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
DROP TABLE FKTABLE;
DROP TABLE PKTABLE;
-- Two columns, same table
CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3,
ptest4) REFERENCES pktable(ptest1, ptest2));
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
DROP TABLE PKTABLE;
-- And this,
CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3,
ptest4) REFERENCES pktable);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
DROP TABLE PKTABLE;
-- This shouldn't (mixed up columns)
CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest3,
ptest4) REFERENCES pktable(ptest2, ptest1));
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: integer = inet
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- Nor should this... (same reason, we have 4,3 referencing 1,2 which mismatches types
CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest4,
ptest3) REFERENCES pktable(ptest1, ptest2));
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- Not this one either... Same as the last one except we didn't defined the columns being referenced.
CREATE TABLE PKTABLE (ptest1 int, ptest2 inet, ptest3 int, ptest4 inet, PRIMARY KEY(ptest1, ptest2), FOREIGN KEY(ptest4,
ptest3) REFERENCES pktable);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
--
-- Now some cases with inheritance
-- Basic 2 table case: 1 column of matching types.
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
NOTICE: CREATE TABLE / UNIQUE will create implicit index "pktable_base1_key" for table "pktable"
create table fktable (ftest1 int references pktable(base1));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
-- now some ins, upd, del
insert into pktable(base1) values (1);
insert into pktable(base1) values (2);
-- let's insert a non-existant fktable value
insert into fktable(ftest1) values (3);
-ERROR: insert or update on "fktable" violates foreign key constraint "$1"
-DETAIL: Key (ftest1)=(3) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "$1"
+DETAIL: Key (ftest1)=(3) is not present in table "pktable".
-- let's make a valid row for that
insert into pktable(base1) values (3);
insert into fktable(ftest1) values (3);
-- let's try removing a row that should fail from pktable
delete from pktable where base1>2;
ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "fktable"
-DETAIL: Key (base1)=(3) is still referenced from "fktable".
+DETAIL: Key (base1)=(3) is still referenced from table "fktable".
-- okay, let's try updating all of the base1 values to *4
-- which should fail.
update pktable set base1=base1*4;
ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "fktable"
-DETAIL: Key (base1)=(3) is still referenced from "fktable".
+DETAIL: Key (base1)=(3) is still referenced from table "fktable".
-- okay, let's try an update that should work.
update pktable set base1=base1*4 where base1<3;
-- and a delete that should work
delete from pktable;
-- Now 2 columns 2 tables, matching types
create table fktable (ftest1 int, ftest2 int, foreign key(ftest1, ftest2) references pktable(base1, ptest1));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
-- now some ins, upd, del
insert into pktable(base1, ptest1) values (1, 1);
insert into pktable(base1, ptest1) values (2, 2);
-- let's insert a non-existant fktable value
insert into fktable(ftest1, ftest2) values (3, 1);
-ERROR: insert or update on "fktable" violates foreign key constraint "$1"
-DETAIL: Key (ftest1,ftest2)=(3,1) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "$1"
+DETAIL: Key (ftest1,ftest2)=(3,1) is not present in table "pktable".
-- let's make a valid row for that
insert into pktable(base1,ptest1) values (3, 1);
insert into fktable(ftest1, ftest2) values (3, 1);
-- let's try removing a row that should fail from pktable
delete from pktable where base1>2;
ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "fktable"
-DETAIL: Key (base1,ptest1)=(3,1) is still referenced from "fktable".
+DETAIL: Key (base1,ptest1)=(3,1) is still referenced from table "fktable".
-- okay, let's try updating all of the base1 values to *4
-- which should fail.
update pktable set base1=base1*4;
ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "fktable"
-DETAIL: Key (base1,ptest1)=(3,1) is still referenced from "fktable".
+DETAIL: Key (base1,ptest1)=(3,1) is still referenced from table "fktable".
-- okay, let's try an update that should work.
update pktable set base1=base1*4 where base1<3;
-- and a delete that should work
create table pktable(ptest1 int, ptest2 int, primary key(base1, ptest1), foreign key(base2, ptest2) references
pktable(base1, ptest1)) inherits (pktable_base);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
insert into pktable (base1, ptest1, base2, ptest2) values (1, 1, 1, 1);
insert into pktable (base1, ptest1, base2, ptest2) values (2, 1, 1, 1);
insert into pktable (base1, ptest1, base2, ptest2) values (2, 2, 2, 1);
insert into pktable (base1, ptest1, base2, ptest2) values (1, 3, 2, 2);
-- fails (3,2) isn't in base1, ptest1
insert into pktable (base1, ptest1, base2, ptest2) values (2, 3, 3, 2);
-ERROR: insert or update on "pktable" violates foreign key constraint "$1"
-DETAIL: Key (base2,ptest2)=(3,2) is not present in "pktable".
+ERROR: insert or update on table "pktable" violates foreign key constraint "$1"
+DETAIL: Key (base2,ptest2)=(3,2) is not present in table "pktable".
-- fails (2,2) is being referenced
delete from pktable where base1=2;
ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "pktable"
-DETAIL: Key (base1,ptest1)=(2,2) is still referenced from "pktable".
+DETAIL: Key (base1,ptest1)=(2,2) is still referenced from table "pktable".
-- fails (1,1) is being referenced (twice)
update pktable set base1=3 where base1=1;
ERROR: update or delete on "pktable" violates foreign key constraint "$1" on "pktable"
-DETAIL: Key (base1,ptest1)=(1,1) is still referenced from "pktable".
+DETAIL: Key (base1,ptest1)=(1,1) is still referenced from table "pktable".
-- this sequence of two deletes will work, since after the first there will be no (2,*) references
delete from pktable where base2=2;
delete from pktable where base1=2;
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-- just generally bad types (with and without column references on the referenced table)
create table fktable(ftest1 cidr, ftest2 int[], foreign key (ftest1, ftest2) references pktable);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: cidr = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
create table fktable(ftest1 cidr, ftest2 int[], foreign key (ftest1, ftest2) references pktable(base1, ptest1));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: cidr = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
-- let's mix up which columns reference which
create table fktable(ftest1 int, ftest2 inet, foreign key(ftest2, ftest1) references pktable);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
create table fktable(ftest1 int, ftest2 inet, foreign key(ftest2, ftest1) references pktable(base1, ptest1));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
create table fktable(ftest1 int, ftest2 inet, foreign key(ftest1, ftest2) references pktable(ptest1, base1));
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: integer = inet
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
drop table pktable;
drop table pktable_base;
-- 2 columns (1 table), mismatched types
create table pktable(ptest1 inet, ptest2 inet[], primary key(base1, ptest1), foreign key(base2, ptest2) references
pktable(base1, ptest1)) inherits (pktable_base);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet[] = inet
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
create table pktable(ptest1 inet, ptest2 inet, primary key(base1, ptest1), foreign key(base2, ptest2) references
pktable(ptest1, base1)) inherits (pktable_base);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: integer = inet
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
create table pktable(ptest1 inet, ptest2 inet, primary key(base1, ptest1), foreign key(ptest2, base2) references
pktable(base1, ptest1)) inherits (pktable_base);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
create table pktable(ptest1 inet, ptest2 inet, primary key(base1, ptest1), foreign key(ptest2, base2) references
pktable(base1, ptest1)) inherits (pktable_base);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pktable_pkey" for table "pktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
ERROR: operator does not exist: inet = integer
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
drop table pktable;
ERROR: table "pktable" does not exist
drop table pktable_base;
fk INT4 REFERENCES pktable DEFERRABLE
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "fktable_pkey" for table "fktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
-- default to immediate: should fail
INSERT INTO fktable VALUES (5, 10);
-ERROR: insert or update on "fktable" violates foreign key constraint "$1"
-DETAIL: Key (fk)=(10) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "$1"
+DETAIL: Key (fk)=(10) is not present in table "pktable".
-- explicitely defer the constraint
BEGIN;
SET CONSTRAINTS ALL DEFERRED;
fk INT4 REFERENCES pktable DEFERRABLE INITIALLY DEFERRED
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "fktable_pkey" for table "fktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
-- default to deferred, should succeed
BEGIN;
INSERT INTO fktable VALUES (100, 200);
SET CONSTRAINTS ALL IMMEDIATE;
-- should fail
INSERT INTO fktable VALUES (500, 1000);
-ERROR: insert or update on "fktable" violates foreign key constraint "$1"
-DETAIL: Key (fk)=(1000) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "$1"
+DETAIL: Key (fk)=(1000) is not present in table "pktable".
COMMIT;
DROP TABLE fktable, pktable;
-- tricky behavior: according to SQL99, if a deferred constraint is set
fk INT4 REFERENCES pktable DEFERRABLE
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "fktable_pkey" for table "fktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
BEGIN;
SET CONSTRAINTS ALL DEFERRED;
-- should succeed, for now
INSERT INTO fktable VALUES (1000, 2000);
-- should cause transaction abort, due to preceding error
SET CONSTRAINTS ALL IMMEDIATE;
-ERROR: insert or update on "fktable" violates foreign key constraint "$1"
-DETAIL: Key (fk)=(2000) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "$1"
+DETAIL: Key (fk)=(2000) is not present in table "pktable".
INSERT INTO pktable VALUES (2000, 3); -- too late
-ERROR: current transaction is aborted, queries ignored until end of transaction block
+ERROR: current transaction is aborted, commands ignored until end of transaction block
COMMIT;
DROP TABLE fktable, pktable;
-- deferrable, initially deferred
fk INT4 REFERENCES pktable DEFERRABLE INITIALLY DEFERRED
);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "fktable_pkey" for table "fktable"
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
BEGIN;
-- no error here
INSERT INTO fktable VALUES (100, 200);
-- error here on commit
COMMIT;
-ERROR: insert or update on "fktable" violates foreign key constraint "$1"
-DETAIL: Key (fk)=(200) is not present in "pktable".
+ERROR: insert or update on table "fktable" violates foreign key constraint "$1"
+DETAIL: Key (fk)=(200) is not present in table "pktable".
-- should fail in mdy mode:
SELECT timestamp with time zone '27/12/2001 04:05:06.789-08';
ERROR: date/time field value out of range: "27/12/2001 04:05:06.789-08"
-HINT: Perhaps you need a different DateStyle setting.
+HINT: Perhaps you need a different "datestyle" setting.
set datestyle to dmy;
SELECT timestamp with time zone '27/12/2001 04:05:06.789-08';
timestamptz
SELECT date '1991-02-03' - time with time zone '04:05:06 UTC' AS "Subtract Time UTC";
ERROR: operator does not exist: date - time with time zone
-HINT: No operator matches the given name and argument type(s). You may need to add explicit typecasts.
+HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts.
--
-- timestamp, interval arithmetic
--
SELECT '' AS three, f1 as abstime, cast(f1 as timestamp) AS "timestamp"
FROM ABSTIME_TBL WHERE NOT isfinite(f1);
-ERROR: cannot convert "invalid" abstime to timestamp
+ERROR: cannot convert abstime "invalid" to timestamp
SELECT '' AS ten, f1 AS interval, reltime(f1) AS reltime
FROM INTERVAL_TBL;
ten | interval | reltime
ERROR: invalid cidr value: "192.168.1.2/24"
DETAIL: Value has bits set to right of mask.
INSERT INTO INET_TBL (c, i) VALUES ('1234::1234::1234', '::1.2.3.4');
-ERROR: invalid input syntax for cidr: "1234::1234::1234"
+ERROR: invalid input syntax for type cidr: "1234::1234::1234"
-- check that CIDR rejects invalid input when converting from text:
INSERT INTO INET_TBL (c, i) VALUES (cidr('192.168.1.2/24'), '192.168.1.226');
ERROR: invalid cidr value: "192.168.1.2/24"
CREATE TABLE b (bb TEXT) INHERITS (a);
CREATE TABLE c (cc TEXT) INHERITS (a);
CREATE TABLE d (dd TEXT) INHERITS (b,c,a);
-NOTICE: merging multiple inherited definitions of attribute "aa"
-NOTICE: merging multiple inherited definitions of attribute "aa"
+NOTICE: merging multiple inherited definitions of column "aa"
+NOTICE: merging multiple inherited definitions of column "aa"
INSERT INTO a(aa) VALUES('aaa');
INSERT INTO a(aa) VALUES('aaaa');
INSERT INTO a(aa) VALUES('aaaaa');
CREATE TEMP TABLE z (b TEXT, PRIMARY KEY(aa, b)) inherits (a);
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "z_pkey" for table "z"
INSERT INTO z VALUES (NULL, 'text'); -- should fail
-ERROR: null value for attribute "aa" violates NOT NULL constraint
+ERROR: null value in column "aa" violates not-null constraint
-- Check UPDATE with inherited target and an inherited source table
create temp table foo(f1 int, f2 int);
create temp table foo2(f3 int) inherits (foo);
(1 row)
CREATE TABLE inhf (LIKE inhx, LIKE inhx); /* Throw error */
-ERROR: attribute "xx" duplicated
+ERROR: column "xx" duplicated
CREATE TABLE inhf (LIKE inhx INCLUDING DEFAULTS);
INSERT INTO inhf DEFAULT VALUES;
SELECT * FROM inhf; /* Single entry with value 'text' */
--
create table inserttest (col1 int4, col2 int4 NOT NULL, col3 text default 'testing');
insert into inserttest (col1, col2, col3) values (DEFAULT, DEFAULT, DEFAULT);
-ERROR: null value for attribute "col2" violates NOT NULL constraint
+ERROR: null value in column "col2" violates not-null constraint
insert into inserttest (col2, col3) values (3, DEFAULT);
insert into inserttest (col1, col2, col3) values (DEFAULT, 5, DEFAULT);
insert into inserttest values (DEFAULT, 5, 'test');
INSERT INTO INT2_TBL(f1) VALUES ('-32767');
-- bad input values -- should give warnings
INSERT INTO INT2_TBL(f1) VALUES ('100000');
-ERROR: 100000 is out of range for int2
+ERROR: value "100000" is out of range for type shortint
INSERT INTO INT2_TBL(f1) VALUES ('asdf');
ERROR: invalid input syntax for integer: "asdf"
SELECT '' AS five, INT2_TBL.*;
INSERT INTO INT4_TBL(f1) VALUES ('-2147483647');
-- bad input values -- should give warnings
INSERT INTO INT4_TBL(f1) VALUES ('1000000000000');
-ERROR: 1000000000000 is out of range for int4
+ERROR: value "1000000000000" is out of range for type integer
INSERT INTO INT4_TBL(f1) VALUES ('asdf');
ERROR: invalid input syntax for integer: "asdf"
SELECT '' AS five, INT4_TBL.*;
INSERT INTO INTERVAL_TBL (f1) VALUES ('5 months 12 hours');
-- badly formatted interval
INSERT INTO INTERVAL_TBL (f1) VALUES ('badly formatted interval');
-ERROR: invalid input syntax for interval: "badly formatted interval"
+ERROR: invalid input syntax for type interval: "badly formatted interval"
INSERT INTO INTERVAL_TBL (f1) VALUES ('@ 30 eons ago');
-ERROR: invalid input syntax for interval: "@ 30 eons ago"
+ERROR: invalid input syntax for type interval: "@ 30 eons ago"
-- test interval operators
SELECT '' AS ten, INTERVAL_TBL.*;
ten | f1
-- UNION JOIN isn't implemented yet
SELECT '' AS "xxx", *
FROM J1_TBL UNION JOIN J2_TBL;
-ERROR: UNION JOIN is not implemented yet
+ERROR: UNION JOIN is not implemented
--
-- Multiway full join
--
INSERT INTO LSEG_TBL VALUES ('(11,22,33,44)');
-- bad values for parser testing
INSERT INTO LSEG_TBL VALUES ('(3asdf,2 ,3,4r2)');
-ERROR: invalid input syntax for lseg: "(3asdf,2 ,3,4r2)"
+ERROR: invalid input syntax for type lseg: "(3asdf,2 ,3,4r2)"
INSERT INTO LSEG_TBL VALUES ('[1,2,3, 4');
-ERROR: invalid input syntax for lseg: "[1,2,3, 4"
+ERROR: invalid input syntax for type lseg: "[1,2,3, 4"
INSERT INTO LSEG_TBL VALUES ('[(,2),(3,4)]');
-ERROR: invalid input syntax for lseg: "[(,2),(3,4)]"
+ERROR: invalid input syntax for type lseg: "[(,2),(3,4)]"
INSERT INTO LSEG_TBL VALUES ('[(1,2),(3,4)');
-ERROR: invalid input syntax for lseg: "[(1,2),(3,4)"
+ERROR: invalid input syntax for type lseg: "[(1,2),(3,4)"
select * from LSEG_TBL;
s
-------------------------------
INSERT INTO fract_only VALUES (2, '0.1');
INSERT INTO fract_only VALUES (3, '1.0'); -- should fail
ERROR: numeric field overflow
-DETAIL: ABS(value) >= 10^0 for field with precision 4, scale 4.
+DETAIL: The absolute value is greater than or equal to 10^0 for field with precision 4, scale 4.
INSERT INTO fract_only VALUES (4, '-0.9999');
INSERT INTO fract_only VALUES (5, '0.99994');
INSERT INTO fract_only VALUES (6, '0.99995'); -- should fail
ERROR: numeric field overflow
-DETAIL: ABS(value) >= 10^0 for field with precision 4, scale 4.
+DETAIL: The absolute value is greater than or equal to 10^0 for field with precision 4, scale 4.
INSERT INTO fract_only VALUES (7, '0.00001');
INSERT INTO fract_only VALUES (8, '0.00017');
SELECT * FROM fract_only;
INSERT INTO OID_TBL(f1) VALUES ('');
-- bad inputs
INSERT INTO OID_TBL(f1) VALUES ('asdfasd');
-ERROR: invalid input syntax for OID: "asdfasd"
+ERROR: invalid input syntax for type "oid": "asdfasd"
INSERT INTO OID_TBL(f1) VALUES ('99asdfasd');
-ERROR: invalid input syntax for OID: "99asdfasd"
+ERROR: invalid input syntax for type "oid": "99asdfasd"
SELECT '' AS six, OID_TBL.*;
six | f1
-----+------------
INSERT INTO PATH_TBL VALUES ('(11,12,13,14)');
-- bad values for parser testing
INSERT INTO PATH_TBL VALUES ('[(,2),(3,4)]');
-ERROR: invalid input syntax for path: "[(,2),(3,4)]"
+ERROR: invalid input syntax for type path: "[(,2),(3,4)]"
INSERT INTO PATH_TBL VALUES ('[(1,2),(3,4)');
-ERROR: invalid input syntax for path: "[(1,2),(3,4)"
+ERROR: invalid input syntax for type path: "[(1,2),(3,4)"
SELECT f1 FROM PATH_TBL;
f1
---------------------------
-- Finally we want errors
--
insert into PField values ('PF1_1', 'should fail due to unique index');
-ERROR: duplicate key violates UNIQUE constraint "pfield_name"
+ERROR: duplicate key violates unique constraint "pfield_name"
update PSlot set backlink = 'WS.not.there' where slotname = 'PS.base.a1';
ERROR: WS.not.there does not exist
CONTEXT: PL/pgSQL function "tg_backlink_a" line 16 at assignment
ERROR: illegal slotlink beginning with XX
CONTEXT: PL/pgSQL function "tg_slotlink_a" line 16 at assignment
insert into HSlot values ('HS', 'base.hub1', 1, '');
-ERROR: duplicate key violates UNIQUE constraint "hslot_name"
+ERROR: duplicate key violates unique constraint "hslot_name"
insert into HSlot values ('HS', 'base.hub1', 20, '');
ERROR: no manual manipulation of HSlot
delete from HSlot;
INSERT INTO POINT_TBL(f1) VALUES ('(-5.0,-12.0)');
-- bad format points
INSERT INTO POINT_TBL(f1) VALUES ('asdfasdf');
-ERROR: invalid input syntax for point: "asdfasdf"
+ERROR: invalid input syntax for type point: "asdfasdf"
INSERT INTO POINT_TBL(f1) VALUES ('10.0,10.0');
INSERT INTO POINT_TBL(f1) VALUES ('(10.0 10.0)');
-ERROR: invalid input syntax for point: "(10.0 10.0)"
+ERROR: invalid input syntax for type point: "(10.0 10.0)"
INSERT INTO POINT_TBL(f1) VALUES ('(10.0,10.0');
-ERROR: invalid input syntax for point: "(10.0,10.0"
+ERROR: invalid input syntax for type point: "(10.0,10.0"
SELECT '' AS six, POINT_TBL.*;
six | f1
-----+------------
INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0,1.0),(0.0,1.0)');
-- bad polygon input strings
INSERT INTO POLYGON_TBL(f1) VALUES ('0.0');
-ERROR: invalid input syntax for polygon: "0.0"
+ERROR: invalid input syntax for type polygon: "0.0"
INSERT INTO POLYGON_TBL(f1) VALUES ('(0.0 0.0');
-ERROR: invalid input syntax for polygon: "(0.0 0.0"
+ERROR: invalid input syntax for type polygon: "(0.0 0.0"
INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2)');
-ERROR: invalid input syntax for polygon: "(0,1,2)"
+ERROR: invalid input syntax for type polygon: "(0,1,2)"
INSERT INTO POLYGON_TBL(f1) VALUES ('(0,1,2,3');
-ERROR: invalid input syntax for polygon: "(0,1,2,3"
+ERROR: invalid input syntax for type polygon: "(0,1,2,3"
INSERT INTO POLYGON_TBL(f1) VALUES ('asdf');
-ERROR: invalid input syntax for polygon: "asdf"
+ERROR: invalid input syntax for type polygon: "asdf"
SELECT '' AS four, POLYGON_TBL.*;
four | f1
------+---------------------
-- should ERROR: stfnp(anyarray) not matched by stfnp(int[])
CREATE AGGREGATE myaggp02a(BASETYPE = "ANY", SFUNC = stfnp, STYPE = anyarray,
FINALFUNC = ffp, INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
-- N P
-- should CREATE
CREATE AGGREGATE myaggp03a(BASETYPE = "ANY", SFUNC = stfp, STYPE = int4[],
-- should ERROR: we have no way to resolve S
CREATE AGGREGATE myaggp04a(BASETYPE = "ANY", SFUNC = stfp, STYPE = anyarray,
FINALFUNC = ffp, INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
CREATE AGGREGATE myaggp04b(BASETYPE = "ANY", SFUNC = stfp, STYPE = anyarray,
INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
-- Case2 (R = P) && ((B = P) || (B = N))
-- -------------------------------------
-- S tf1 B tf2
-- should ERROR: tfnp(anyarray, int) not matched by tfnp(int[],int)
CREATE AGGREGATE myaggp13a(BASETYPE = int, SFUNC = tfnp, STYPE = anyarray,
FINALFUNC = ffp, INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
-- P N N P
-- should ERROR: tf2p(anyarray, int) not matched by tf2p(int[],anyelement)
CREATE AGGREGATE myaggp14a(BASETYPE = int, SFUNC = tf2p, STYPE = anyarray,
FINALFUNC = ffp, INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
-- P N P N
-- should ERROR: tfnp(anyarray, anyelement) not matched by tfnp(int[],int)
CREATE AGGREGATE myaggp15a(BASETYPE = anyelement, SFUNC = tfnp,
-- should ERROR: we have no way to resolve S
CREATE AGGREGATE myaggp17a(BASETYPE = int, SFUNC = tf1p, STYPE = anyarray,
FINALFUNC = ffp, INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
CREATE AGGREGATE myaggp17b(BASETYPE = int, SFUNC = tf1p, STYPE = anyarray,
INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
-- P P N P
-- should ERROR: tfp(anyarray, int) not matched by tfp(anyarray, anyelement)
CREATE AGGREGATE myaggp18a(BASETYPE = int, SFUNC = tfp, STYPE = anyarray,
FINALFUNC = ffp, INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
CREATE AGGREGATE myaggp18b(BASETYPE = int, SFUNC = tfp, STYPE = anyarray,
INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
-- P P P N
-- should ERROR: tf1p(anyarray, anyelement) not matched by tf1p(anyarray, int)
CREATE AGGREGATE myaggp19a(BASETYPE = anyelement, SFUNC = tf1p,
-- should ERROR: stfnp(anyarray) not matched by stfnp(int[])
CREATE AGGREGATE myaggn02a(BASETYPE = "ANY", SFUNC = stfnp, STYPE = anyarray,
FINALFUNC = ffnp, INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
CREATE AGGREGATE myaggn02b(BASETYPE = "ANY", SFUNC = stfnp, STYPE = anyarray,
INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
-- N P
-- should CREATE
CREATE AGGREGATE myaggn03a(BASETYPE = "ANY", SFUNC = stfp, STYPE = int4[],
-- should ERROR: ffnp(anyarray) not matched by ffnp(int[])
CREATE AGGREGATE myaggn04a(BASETYPE = "ANY", SFUNC = stfp, STYPE = anyarray,
FINALFUNC = ffnp, INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
-- Case4 (R = N) && ((B = P) || (B = N))
-- -------------------------------------
-- S tf1 B tf2
-- should ERROR: tfnp(anyarray, int) not matched by tfnp(int[],int)
CREATE AGGREGATE myaggn13a(BASETYPE = int, SFUNC = tfnp, STYPE = anyarray,
FINALFUNC = ffnp, INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
CREATE AGGREGATE myaggn13b(BASETYPE = int, SFUNC = tfnp, STYPE = anyarray,
INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
-- P N N P
-- should ERROR: tf2p(anyarray, int) not matched by tf2p(int[],anyelement)
CREATE AGGREGATE myaggn14a(BASETYPE = int, SFUNC = tf2p, STYPE = anyarray,
FINALFUNC = ffnp, INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
CREATE AGGREGATE myaggn14b(BASETYPE = int, SFUNC = tf2p, STYPE = anyarray,
INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
-- P N P N
-- should ERROR: tfnp(anyarray, anyelement) not matched by tfnp(int[],int)
CREATE AGGREGATE myaggn15a(BASETYPE = anyelement, SFUNC = tfnp,
-- should ERROR: ffnp(anyarray) not matched by ffnp(int[])
CREATE AGGREGATE myaggn17a(BASETYPE = int, SFUNC = tf1p, STYPE = anyarray,
FINALFUNC = ffnp, INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
-- P P N P
-- should ERROR: tfp(anyarray, int) not matched by tfp(anyarray, anyelement)
CREATE AGGREGATE myaggn18a(BASETYPE = int, SFUNC = tfp, STYPE = anyarray,
FINALFUNC = ffnp, INITCOND = '{}');
-ERROR: cannot determine transition datatype
-DETAIL: An aggregate using ANYARRAY or ANYELEMENT as trans type must have one of them as its base type.
+ERROR: cannot determine transition data type
+DETAIL: An aggregate using "anyarray" or "anyelement" as transition type must have one of them as its base type.
-- P P P N
-- should ERROR: tf1p(anyarray, anyelement) not matched by tf1p(anyarray, int)
CREATE AGGREGATE myaggn19a(BASETYPE = anyelement, SFUNC = tf1p,
INSERT INTO RELTIME_TBL (f1) VALUES ('@ 14 seconds ago');
-- badly formatted reltimes
INSERT INTO RELTIME_TBL (f1) VALUES ('badly formatted reltime');
-ERROR: invalid input syntax for reltime: "badly formatted reltime"
+ERROR: invalid input syntax for type reltime: "badly formatted reltime"
INSERT INTO RELTIME_TBL (f1) VALUES ('@ 30 eons ago');
-ERROR: invalid input syntax for reltime: "@ 30 eons ago"
+ERROR: invalid input syntax for type reltime: "@ 30 eons ago"
-- test reltime operators
SELECT '' AS six, RELTIME_TBL.*;
six | f1
-- this should fail because f1 is not exposed for unqualified reference:
create rule foorule as on insert to foo where f1 < 100
do instead insert into foo2 values (f1);
-ERROR: attribute "f1" not found
+ERROR: column "f1" does not exist
-- this is the correct way:
create rule foorule as on insert to foo where f1 < 100
do instead insert into foo2 values (new.f1);
-- w/o existing GROUP BY target and w/o existing a different ORDER BY target
-- failure expected
SELECT count(*) FROM test_missing_target GROUP BY a ORDER BY b;
-ERROR: attribute "test_missing_target.b" must be GROUPed or used in an aggregate function
+ERROR: column "test_missing_target.b" must appear in GROUP BY clause or used in an aggregate function
-- w/o existing GROUP BY target and w/o existing same ORDER BY target
SELECT count(*) FROM test_missing_target GROUP BY b ORDER BY b;
count
-- group using reference number out of range
-- failure expected
SELECT c, count(*) FROM test_missing_target GROUP BY 3;
-ERROR: GROUP BY position 3 is not in target list
+ERROR: GROUP BY position 3 is not in select list
-- group w/o existing GROUP BY and ORDER BY target under ambiguous condition
-- failure expected
SELECT count(*) FROM test_missing_target x, test_missing_target y
-- w/o existing GROUP BY target and w/o existing a different ORDER BY target
-- failure expected
SELECT count(a) FROM test_missing_target GROUP BY a ORDER BY b;
-ERROR: attribute "test_missing_target.b" must be GROUPed or used in an aggregate function
+ERROR: column "test_missing_target.b" must appear in GROUP BY clause or used in an aggregate function
-- w/o existing GROUP BY target and w/o existing same ORDER BY target
SELECT count(b) FROM test_missing_target GROUP BY b/2 ORDER BY b/2;
count
---
CREATE TABLE serialTest (f1 text, f2 serial);
-NOTICE: CREATE TABLE will create implicit sequence "serialtest_f2_seq" for SERIAL column "serialtest.f2"
+NOTICE: CREATE TABLE will create implicit sequence "serialtest_f2_seq" for "serial" column "serialtest.f2"
INSERT INTO serialTest VALUES ('foo');
INSERT INTO serialTest VALUES ('bar');
INSERT INTO serialTest VALUES ('force', 100);
INSERT INTO serialTest VALUES ('wrong', NULL);
-ERROR: null value for attribute "f2" violates NOT NULL constraint
+ERROR: null value in column "f2" violates not-null constraint
SELECT * FROM serialTest;
f1 | f2
ERROR: relation "temptest" does not exist
-- ON COMMIT is only allowed for TEMP
CREATE TABLE temptest(col int) ON COMMIT DELETE ROWS;
-ERROR: ON COMMIT can only be used on TEMP tables
+ERROR: ON COMMIT can only be used on temporary tables
-- statements.
INSERT INTO TIMESTAMP_TBL VALUES ('now');
INSERT INTO TIMESTAMP_TBL VALUES ('current');
-ERROR: "current" is no longer supported
+ERROR: date/time value "current" is no longer supported
INSERT INTO TIMESTAMP_TBL VALUES ('today');
INSERT INTO TIMESTAMP_TBL VALUES ('yesterday');
INSERT INTO TIMESTAMP_TBL VALUES ('tomorrow');
INSERT INTO TIMESTAMP_TBL VALUES ('epoch');
-- Obsolete special values
INSERT INTO TIMESTAMP_TBL VALUES ('invalid');
-ERROR: "invalid" is no longer supported
+ERROR: date/time value "invalid" is no longer supported
-- Postgres v6.0 standard output format
INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST');
INSERT INTO TIMESTAMP_TBL VALUES ('Invalid Abstime');
-ERROR: "Invalid Abstime" is no longer supported
+ERROR: date/time value "Invalid Abstime" is no longer supported
INSERT INTO TIMESTAMP_TBL VALUES ('Undefined Abstime');
-ERROR: "Undefined Abstime" is no longer supported
+ERROR: date/time value "Undefined Abstime" is no longer supported
-- Variations on Postgres v6.1 standard output format
INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01.000001 1997 PST');
INSERT INTO TIMESTAMP_TBL VALUES ('Mon Feb 10 17:32:01.999999 1997 PST');
CREATE TABLE TIMESTAMPTZ_TBL ( d1 timestamp(2) with time zone);
INSERT INTO TIMESTAMPTZ_TBL VALUES ('now');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('current');
-ERROR: "current" is no longer supported
+ERROR: date/time value "current" is no longer supported
INSERT INTO TIMESTAMPTZ_TBL VALUES ('today');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('yesterday');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('tomorrow');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('epoch');
-- Obsolete special values
INSERT INTO TIMESTAMPTZ_TBL VALUES ('invalid');
-ERROR: "invalid" is no longer supported
+ERROR: date/time value "invalid" is no longer supported
-- Postgres v6.0 standard output format
INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01 1997 PST');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('Invalid Abstime');
-ERROR: "Invalid Abstime" is no longer supported
+ERROR: date/time value "Invalid Abstime" is no longer supported
INSERT INTO TIMESTAMPTZ_TBL VALUES ('Undefined Abstime');
-ERROR: "Undefined Abstime" is no longer supported
+ERROR: date/time value "Undefined Abstime" is no longer supported
-- Variations on Postgres v6.1 standard output format
INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.000001 1997 PST');
INSERT INTO TIMESTAMPTZ_TBL VALUES ('Mon Feb 10 17:32:01.999999 1997 PST');
-- badly formatted tintervals
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["bad time specifications" ""]');
-ERROR: invalid input syntax for abstime: "bad time specifications"
+ERROR: invalid input syntax for type abstime: "bad time specifications"
INSERT INTO TINTERVAL_TBL (f1)
VALUES ('["" "infinity"]');
-ERROR: invalid input syntax for abstime: ""
+ERROR: invalid input syntax for type abstime: ""
-- test tinterval operators
SELECT '' AS five, TINTERVAL_TBL.*;
five | f1
-- Test foreign constraint check
CREATE TABLE truncate_b(col1 integer references truncate_a);
-NOTICE: CREATE TABLE will create implicit trigger(s) for FOREIGN KEY check(s)
+NOTICE: CREATE TABLE will create implicit triggers for foreign-key checks
INSERT INTO truncate_a VALUES (1);
SELECT * FROM truncate_a;
col1
-- This should fail, because q2 isn't a name of an EXCEPT output column
SELECT q1 FROM int8_tbl EXCEPT SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1;
-ERROR: attribute "q2" not found
+ERROR: column "q2" does not exist
-- But this should work:
SELECT q1 FROM int8_tbl EXCEPT (((SELECT q2 FROM int8_tbl ORDER BY q2 LIMIT 1)));
q1