7
7
*
8
8
*
9
9
* 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 $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -99,9 +99,9 @@ DefineRelation(CreateStmt *stmt)
99
99
100
100
foreach (entry , constraints )
101
101
{
102
- ConstraintDef * cdef = (ConstraintDef * ) lfirst (entry );
102
+ Constraint * cdef = (Constraint * ) lfirst (entry );
103
103
104
- if (cdef -> type == CONSTR_CHECK )
104
+ if (cdef -> contype == CONSTR_CHECK )
105
105
{
106
106
if (cdef -> name != NULL )
107
107
{
@@ -218,7 +218,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
218
218
219
219
if (!strcmp (coldef -> colname , restdef -> colname ))
220
220
{
221
- elog (WARN , "attribute \"%s\" duplicated" ,
221
+ elog (WARN , "attribute '%s' duplicated" ,
222
222
coldef -> colname );
223
223
}
224
224
}
@@ -231,7 +231,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
231
231
{
232
232
if (!strcmp (strVal (lfirst (entry )), strVal (lfirst (rest ))))
233
233
{
234
- elog (WARN , "relation \"%s\" duplicated" ,
234
+ elog (WARN , "relation '%s' duplicated" ,
235
235
strVal (lfirst (entry )));
236
236
}
237
237
}
@@ -253,13 +253,11 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
253
253
if (relation == NULL )
254
254
{
255
255
elog (WARN ,
256
- "MergeAttr: Can't inherit from non-existent superclass '%s'" ,
257
- name );
256
+ "MergeAttr: Can't inherit from non-existent superclass '%s'" , name );
258
257
}
259
258
if (relation -> rd_rel -> relkind == 'S' )
260
259
{
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 );
263
261
}
264
262
tupleDesc = RelationGetTupleDescriptor (relation );
265
263
constr = tupleDesc -> constr ;
@@ -335,9 +333,9 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
335
333
336
334
for (i = 0 ; i < constr -> num_check ; i ++ )
337
335
{
338
- ConstraintDef * cdef = (ConstraintDef * ) palloc (sizeof (ConstraintDef ));
336
+ Constraint * cdef = (Constraint * ) makeNode ( Constraint ); /* palloc(sizeof(Constraint )); */
339
337
340
- cdef -> type = CONSTR_CHECK ;
338
+ cdef -> contype = CONSTR_CHECK ;
341
339
if (check [i ].ccname [0 ] == '$' )
342
340
cdef -> name = NULL ;
343
341
else
0 commit comments