77 *
88 *
99 * IDENTIFICATION
10- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.21 1997/11/28 17:27:04 momjian Exp $
10+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.22 1997/12/04 23:15:28 thomas Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -99,9 +99,9 @@ DefineRelation(CreateStmt *stmt)
9999
100100foreach (entry ,constraints )
101101{
102- ConstraintDef * cdef = (ConstraintDef * )lfirst (entry );
102+ Constraint * cdef = (Constraint * )lfirst (entry );
103103
104- if (cdef -> type == CONSTR_CHECK )
104+ if (cdef -> contype == CONSTR_CHECK )
105105{
106106if (cdef -> name != NULL )
107107{
@@ -218,7 +218,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
218218
219219if (!strcmp (coldef -> colname ,restdef -> colname ))
220220{
221- elog (WARN ,"attribute\"%s\" duplicated" ,
221+ elog (WARN ,"attribute'%s' duplicated" ,
222222coldef -> colname );
223223}
224224}
@@ -231,7 +231,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
231231{
232232if (!strcmp (strVal (lfirst (entry )),strVal (lfirst (rest ))))
233233{
234- elog (WARN ,"relation\"%s\" duplicated" ,
234+ elog (WARN ,"relation'%s' duplicated" ,
235235strVal (lfirst (entry )));
236236}
237237}
@@ -253,13 +253,11 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
253253if (relation == NULL )
254254{
255255elog (WARN ,
256- "MergeAttr: Can't inherit from non-existent superclass '%s'" ,
257- name );
256+ "MergeAttr: Can't inherit from non-existent superclass '%s'" ,name );
258257}
259258if (relation -> rd_rel -> relkind == 'S' )
260259{
261- elog (WARN ,"MergeAttr: Can't inherit from sequence superclass '%s'" ,
262- name );
260+ elog (WARN ,"MergeAttr: Can't inherit from sequence superclass '%s'" ,name );
263261}
264262tupleDesc = RelationGetTupleDescriptor (relation );
265263constr = tupleDesc -> constr ;
@@ -335,9 +333,9 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
335333
336334for (i = 0 ;i < constr -> num_check ;i ++ )
337335{
338- ConstraintDef * cdef = (ConstraintDef * )palloc (sizeof (ConstraintDef ));
336+ Constraint * cdef = (Constraint * )makeNode ( Constraint ); /* palloc(sizeof(Constraint )); */
339337
340- cdef -> type = CONSTR_CHECK ;
338+ cdef -> contype = CONSTR_CHECK ;
341339if (check [i ].ccname [0 ]== '$' )
342340cdef -> name = NULL ;
343341else