Search Postgresql Archives

Re: null constraints and defaults

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2005-06-29 at 13:04 -0700, elein wrote:
> default constraint
> ...
> elein=# insert into nulldefault values (NULL);
> ERROR:  null value in column "one" violates not-null constraint

I think the idea of a DEFAULT value is to tell the DB what to supply
only if you omit the column from the insert statement altogether.  If
you deliberately call for a NULL, the DB will try to oblige.

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux