Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 000666b

Browse files
committed
Split error message.
1 parent f10589e commit 000666b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/backend/catalog/pg_enum.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/catalog/pg_enum.c,v 1.4 2008/01/01 19:45:48 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/catalog/pg_enum.c,v 1.5 2008/01/20 17:50:41 alvherre Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -83,14 +83,12 @@ EnumValuesCreate(Oid enumTypeOid, List *vals)
8383
* labels are stored in a name field, for easier syscache lookup, so
8484
* check the length to make sure it's within range.
8585
*/
86-
8786
if (strlen(lab) > (NAMEDATALEN - 1))
8887
ereport(ERROR,
8988
(errcode(ERRCODE_INVALID_NAME),
90-
errmsg("invalid enum label \"%s\", must be %d characters or less",
91-
lab,
92-
NAMEDATALEN - 1)));
93-
89+
errmsg("invalid enum label \"%s\"", lab),
90+
errdetail("Labels must be %d characters or less.",
91+
NAMEDATALEN - 1)));
9492

9593
values[Anum_pg_enum_enumtypid - 1] = ObjectIdGetDatum(enumTypeOid);
9694
namestrcpy(&enumlabel, lab);

0 commit comments

Comments
 (0)