1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Error message editing in backend/access.

This commit is contained in:
Tom Lane
2003-07-21 20:29:40 +00:00
parent c6106d91e2
commit ec7aa4b515
33 changed files with 702 additions and 533 deletions

View File

@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.64 2003/02/23 06:17:12 tgl Exp $
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.65 2003/07/21 20:29:37 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -52,8 +52,10 @@ index_formtuple(TupleDesc tupleDescriptor,
#endif
if (numberOfAttributes > INDEX_MAX_KEYS)
elog(ERROR, "index_formtuple: numberOfAttributes %d > %d",
numberOfAttributes, INDEX_MAX_KEYS);
ereport(ERROR,
(errcode(ERRCODE_TOO_MANY_COLUMNS),
errmsg("number of index attributes %d exceeds limit, %d",
numberOfAttributes, INDEX_MAX_KEYS)));
#ifdef TOAST_INDEX_HACK
for (i = 0; i < numberOfAttributes; i++)
@ -158,8 +160,11 @@ index_formtuple(TupleDesc tupleDescriptor,
* it in t_info.
*/
if ((size & INDEX_SIZE_MASK) != size)
elog(ERROR, "index_formtuple: data takes %lu bytes, max is %d",
(unsigned long) size, INDEX_SIZE_MASK);
ereport(ERROR,
(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
errmsg("index tuple requires %lu bytes, maximum size is %lu",
(unsigned long) size,
(unsigned long) INDEX_SIZE_MASK)));
infomask |= size;