diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 1997-08-19 04:46:15 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 1997-08-19 04:46:15 +0000 |
commit | b992e200b8872ecb6652ec85111995f8d4c5aee0 (patch) | |
tree | 52ce3eed9d36e779fe3fa729c12757b13a521b56 /src/backend/commands/command.c | |
parent | b99c63cfc029cc0552e98f652d1734aec1124a5b (diff) |
NOT NULL implementation (submitted by Robson Paniago de Miranda).
Diffstat (limited to 'src/backend/commands/command.c')
-rw-r--r-- | src/backend/commands/command.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c index 74941993e47..6cbe9bda767 100644 --- a/src/backend/commands/command.c +++ b/src/backend/commands/command.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.9 1997/08/18 20:52:11 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.10 1997/08/19 04:43:27 vadim Exp $ * * NOTES * The PortalExecutorHeapMemory crap needs to be eliminated @@ -279,7 +279,11 @@ PerformAddAttribute(char *relationName, elog(WARN, "PerformAddAttribute: you do not own class \"%s\"", relationName); #endif - + /* + * we can't add a not null attribute + */ + if (colDef->is_not_null) + elog(WARN,"Can't add a not null attribute to a existent relation"); /* * if the first element in the 'schema' list is a "*" then we are * supposed to add this attribute to all classes that inherit from @@ -454,6 +458,7 @@ PerformAddAttribute(char *relationName, attribute->attcacheoff = -1; attribute->attisset = (bool) (form->typtype == 'c'); attribute->attalign = form->typalign; + attribute->attnotnull = false; heap_insert(attrdesc, attributeTuple); if (hasindex) |