Re: Inserts with incomplete rows... NOT NULL constraints - Mailing list pgsql-sql

From Peter Eisentraut
Subject Re: Inserts with incomplete rows... NOT NULL constraints
Date
Msg-id 200408111502.08030.peter_e@gmx.net
Whole thread Raw
In response to Inserts with incomplete rows... NOT NULL constraints  (Lars Erik Thorsplass <thorsplass@gmail.com>)
List pgsql-sql
Am Mittwoch, 11. August 2004 14:35 schrieb Lars Erik Thorsplass:
> I would expect NULL fields not specified in the insert to get NULL
> inserted automatically. But that fields which are NOT NULL in the
> table structure gets inserted a NULL value too seems odd.

More accurately, the default value is inserted, which in turn is null if you 
didn't specify one.  You might find it odd that default values that are 
inconsistent with constraints are allowed, but I don't see any reasonable 
alternative.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/


pgsql-sql by date:

Previous
From: Lars Erik Thorsplass
Date:
Subject: Inserts with incomplete rows... NOT NULL constraints
Next
From: Richard Huxton
Date:
Subject: Re: Inserts with incomplete rows... NOT NULL constraints