diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2001-08-09 18:28:18 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2001-08-09 18:28:18 +0000 |
commit | 2e57875b97e8bf08e44352045197995d5d589a23 (patch) | |
tree | b79404ffee7e20f1d4ad1fbfdbdbd5c0d6fbeac9 /src/backend/commands/indexcmds.c | |
parent | 51e8dfddf10d5fd26a623c02700346c8bbf56b4c (diff) | |
download | postgresql-2e57875b97e8bf08e44352045197995d5d589a23.tar.gz postgresql-2e57875b97e8bf08e44352045197995d5d589a23.zip |
Use format_type sibling in backend error messages, so the user sees
consistent type naming.
Diffstat (limited to 'src/backend/commands/indexcmds.c')
-rw-r--r-- | src/backend/commands/indexcmds.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c index 094ddefcc7b..f5f815f1954 100644 --- a/src/backend/commands/indexcmds.c +++ b/src/backend/commands/indexcmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.54 2001/08/06 18:09:45 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v 1.55 2001/08/09 18:28:17 petere Exp $ * *------------------------------------------------------------------------- */ @@ -403,8 +403,10 @@ GetAttrOpClass(IndexElem *attribute, Oid attrType, /* no operator class specified, so find the default */ attribute->class = GetDefaultOpClass(attrType); if (attribute->class == NULL) - elog(ERROR, "DefineIndex: type %s has no default operator class", - typeidTypeName(attrType)); + elog(ERROR, "data type %s has no default operator class" + "\n\tYou must specify an operator class for the index or define a" + "\n\tdefault operator class for the data type", + format_type_be(attrType)); /* assume we need not check type compatibility */ doTypeCheck = false; } @@ -468,8 +470,8 @@ GetAttrOpClass(IndexElem *attribute, Oid attrType, if (attrType != opInputType && !IS_BINARY_COMPATIBLE(attrType, opInputType)) - elog(ERROR, "DefineIndex: opclass \"%s\" does not accept datatype \"%s\"", - attribute->class, typeidTypeName(attrType)); + elog(ERROR, "operator class \"%s\" does not accept data type %s", + attribute->class, format_type_be(attrType)); ReleaseSysCache(tuple); } } |