aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/creatinh.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands/creatinh.c')
-rw-r--r--src/backend/commands/creatinh.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/backend/commands/creatinh.c b/src/backend/commands/creatinh.c
index 1113a84e26f..28143a993b6 100644
--- a/src/backend/commands/creatinh.c
+++ b/src/backend/commands/creatinh.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.11 1997/08/18 20:52:16 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.12 1997/08/19 04:43:30 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@@ -276,14 +276,16 @@ MergeAttributes(List *schema, List *supers)
AttributeTupleForm attribute = tupleDesc->attrs[attrno];
char *attributeName;
char *attributeType;
+ AttrConstr constraints;
HeapTuple tuple;
ColumnDef *def;
TypeName *typename;
/*
- * form name and type
+ * form name, type and constraints
*/
attributeName = (attribute->attname).data;
+ constraints.has_not_null = attribute->attnotnull;
tuple =
SearchSysCacheTuple(TYPOID,
ObjectIdGetDatum(attribute->atttypid),
@@ -311,7 +313,8 @@ MergeAttributes(List *schema, List *supers)
def->colname = pstrdup(attributeName);
typename->name = pstrdup(attributeType);
def->typename = typename;
- partialResult = lcons(def, partialResult);
+ def->is_not_null = constraints.has_not_null;
+ partialResult = lcons(def, partialResult);
}
/*