aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/creatinh.c
diff options
context:
space:
mode:
authorVadim B. Mikheev <vadim4o@yahoo.com>1997-08-19 04:46:15 +0000
committerVadim B. Mikheev <vadim4o@yahoo.com>1997-08-19 04:46:15 +0000
commitb992e200b8872ecb6652ec85111995f8d4c5aee0 (patch)
tree52ce3eed9d36e779fe3fa729c12757b13a521b56 /src/backend/commands/creatinh.c
parentb99c63cfc029cc0552e98f652d1734aec1124a5b (diff)
downloadpostgresql-b992e200b8872ecb6652ec85111995f8d4c5aee0.tar.gz
postgresql-b992e200b8872ecb6652ec85111995f8d4c5aee0.zip
NOT NULL implementation (submitted by Robson Paniago de Miranda).
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);
}
/*