File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 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 );
You can’t perform that action at this time.
0 commit comments