On Fri, Feb 13, 2009 at 6:31 AM, Lee Braiden <fallibledra...@gmail.com> wrote: > What exactly is the reasoning behind this advice? It seems to me that > one would very rarely want to store an empty string. For example, if > a user doesn't enter a surname, that does not mean that their surname > is "", unless they're Cher.
As covered in the documentation, the advice is intended to avoid cases where there are two different possible values which represent "no value for this field" (an empty string, or a NULL). Allowing both can make for more complicated queries since, for example, a row which has an empty string will still be returned by an "IS NOT NULL" query (and, correspondingly, a row with a NULL will be returned by a query which checks only that the value does not equal ""). -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---