Sheeri K. Cabral wrote:
My viewpoint:
If I say "don't do that", then don't let me do it. If I told you
once, I told you a thousand times....(sorry, channeling my inner
Jewish mother)....
Therefore, if I say NOT NULL, I mean "no NULL allowed". No, really.
I mean it. Drizzle shouldn't act like a 3-year-old.
Agreed. If you specify NOT NULL without a default, then you are
explicitly asking to only accept valid data. Munging it with fake "non
data" like an empty string or a zero is something different when you
have a default available to you. On the flip side, if you specify a
default, then accepting NULL is fine; as it will of course use the
default instead.
However, even if the above may seem to be (hopefully) logical behavior,
we don't want to make anyone's life harder. So having a default DEFAULT
for a given data type may be reasonable if not defined on creation.
With the ability to remove the default later if you explicitly want NULL
to fail (which would likely be the minority case). Or use some idiom
like specifying a self conflicting "NOT NULL DEFAULT NULL" to make a
NULL fail on a NOT NULL field. That may be a bit too arcane though.
--
Erik Jacobson
Themis Group, Inc. - http://www.themis-group.com/
( Vim, Tabs, BSD Braces, Debian, and Perl )
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp