77 *
88 *
99 * IDENTIFICATION
10- * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.74 1999/02/13 23:14:55 momjian Exp $
10+ * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.75 1999/02/23 07:54:03 thomas Exp $
1111 *
1212 *
1313 * INTERFACE ROUTINES
@@ -197,8 +197,8 @@ heap_create(char *relname,
197197
198198if (relname && IsSystemRelationName (relname )&& IsNormalProcessingMode ())
199199{
200- elog (ERROR ,
201- "Illegal class name: %s -- pg_ is reserved for system catalogs" ,
200+ elog (ERROR ,"Illegal class name '%s'"
201+ "\n\tThe 'pg_' name prefix is reserved for system catalogs" ,
202202relname );
203203}
204204
@@ -427,15 +427,15 @@ CheckAttributeNames(TupleDesc tupdesc)
427427if (nameeq (& (HeapAtt [j ]-> attname ),
428428& (tupdesc -> attrs [i ]-> attname )))
429429{
430- elog (ERROR ,
431- "create: system attribute named \"%s\" " ,
430+ elog (ERROR ,"Attribute '%s' has a name conflict"
431+ "\n\tName matches an existing system attribute " ,
432432HeapAtt [j ]-> attname .data );
433433}
434434}
435435if (tupdesc -> attrs [i ]-> atttypid == UNKNOWNOID )
436436{
437- elog (NOTICE ,
438- "create: attribute named \"%s\" has an unknown type " ,
437+ elog (NOTICE ,"Attribute '%s' has an unknown type"
438+ "\n\tRelation created; continue " ,
439439tupdesc -> attrs [i ]-> attname .data );
440440}
441441}
@@ -451,8 +451,7 @@ CheckAttributeNames(TupleDesc tupdesc)
451451if (nameeq (& (tupdesc -> attrs [j ]-> attname ),
452452& (tupdesc -> attrs [i ]-> attname )))
453453{
454- elog (ERROR ,
455- "create: repeated attribute \"%s\"" ,
454+ elog (ERROR ,"Attribute '%s' is repeated" ,
456455tupdesc -> attrs [j ]-> attname .data );
457456}
458457}
@@ -774,15 +773,16 @@ heap_create_with_catalog(char *relname,
774773 */
775774Assert (IsNormalProcessingMode ()|| IsBootstrapProcessingMode ());
776775if (natts == 0 || natts > MaxHeapAttributeNumber )
777- elog (ERROR ,"amcreate: from 1 to %d attributes must be specified" ,
778- MaxHeapAttributeNumber );
776+ elog (ERROR ,"Number of attributes is out of range"
777+ "\n\tFrom 1 to %d attributes may be specified" ,
778+ MaxHeapAttributeNumber );
779779
780780CheckAttributeNames (tupdesc );
781781
782782/* temp tables can mask non-temp tables */
783783if ((!istemp && RelnameFindRelid (relname ))||
784784 (istemp && get_temp_rel_by_name (relname )!= NULL ))
785- elog (ERROR ,"%s relation already exists" ,relname );
785+ elog (ERROR ,"Relation '%s' already exists" ,relname );
786786
787787/* invalidate cache so non-temp table is masked by temp */
788788if (istemp )
@@ -951,7 +951,7 @@ RelationRemoveInheritance(Relation relation)
951951heap_endscan (scan );
952952heap_close (catalogRelation );
953953
954- elog (ERROR ,"relation <%d> inherits\"%s\" " ,
954+ elog (ERROR ,"Relation '%d' inherits'%s' " ,
955955 ((Form_pg_inherits )GETSTRUCT (tuple ))-> inhrel ,
956956RelationGetRelationName (relation ));
957957}
@@ -1054,7 +1054,7 @@ DeleteRelationTuple(Relation rel)
10541054if (!HeapTupleIsValid (tup ))
10551055{
10561056heap_close (pg_class_desc );
1057- elog (ERROR ,"DeleteRelationTuple: %s relation nonexistent " ,
1057+ elog (ERROR ,"Relation '%s' does not exist " ,
10581058& rel -> rd_rel -> relname );
10591059}
10601060
@@ -1250,7 +1250,7 @@ heap_destroy_with_catalog(char *relname)
12501250 */
12511251rel = heap_openr (relname );
12521252if (rel == NULL )
1253- elog (ERROR ,"Relation%s Does Not Exist! " ,relname );
1253+ elog (ERROR ,"Relation'%s' does not exist " ,relname );
12541254
12551255LockRelation (rel ,AccessExclusiveLock );
12561256rid = rel -> rd_id ;
@@ -1261,7 +1261,7 @@ heap_destroy_with_catalog(char *relname)
12611261 */
12621262/* allow temp of pg_class? Guess so. */
12631263if (!istemp && IsSystemRelationName (RelationGetRelationName (rel )-> data ))
1264- elog (ERROR ,"amdestroy: cannot destroy %s relation " ,
1264+ elog (ERROR ,"System relation '%s' cannot be destroyed " ,
12651265& rel -> rd_rel -> relname );
12661266
12671267/* ----------------
@@ -1505,7 +1505,7 @@ start:;
15051505
15061506if (length (query -> rtable )> 1 ||
15071507flatten_tlist (query -> targetList )!= NIL )
1508- elog (ERROR ,"DEFAULT: cannot use attribute(s)" );
1508+ elog (ERROR ,"Cannot use attribute(s) in DEFAULT clause " );
15091509te = (TargetEntry * )lfirst (query -> targetList );
15101510resdom = te -> resdom ;
15111511expr = te -> expr ;
@@ -1585,7 +1585,7 @@ StoreRelCheck(Relation rel, ConstrCheck *check)
15851585query = (Query * ) (queryTree_list -> qtrees [0 ]);
15861586
15871587if (length (query -> rtable )> 1 )
1588- elog (ERROR ,"CHECK: only relation %.*s can be referenced" ,
1588+ elog (ERROR ,"Only relation' %.*s' can be referenced" ,
15891589NAMEDATALEN ,rel -> rd_rel -> relname .data );
15901590
15911591plan = (Plan * )lfirst (planTree_list );