Kenneth Gonsalves wrote:
hi,
i have a table
name varchar not null
title varchar not null
blurb varchar not null
in django, if i want to insert a new record and just give a value
for the 'name' field and no values for the rest - it gets saved.
Postgresql should barf saying 'lack of value in xxx field violates
not null constraint' but it doesnt. This looks very much like a
serious bug to me
It should be noted that NULL != ''. If you say not null for a text field
you can still
enter a '' (blank string). That is perfectly valid. If you don't want
null or blank you
can say blank=False and null=False will give you the desired behavior.
Joshua D. Drake
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: PLphp, PLperl - http://www.commandprompt.com/