pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter_e@gmx.net>
To: Lars Erik Thorsplass <thorsplass@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Inserts with incomplete rows... NOT NULL constraints
Date: Wed, 11 Aug 2004 15:02:08 +0200
Message-ID: <200408111502.08030.peter_e@gmx.net> (raw)
In-Reply-To: <7eeb33a040811053563894d7b@mail.gmail.com>
References: <7eeb33a040811053563894d7b@mail.gmail.com>

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/



view thread (4+ messages)  latest in thread

Message-ID: <200408111502.08030.peter_e@gmx.net>
Permalink:  ../200408111502.08030.peter_e@gmx.net/
Also on:    postgresql.org/message-id/200408111502.08030.peter_e@gmx.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: peter_e@gmx.net, thorsplass@gmail.com
  Subject: Re: Inserts with incomplete rows... NOT NULL constraints
  In-Reply-To: <200408111502.08030.peter_e@gmx.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox