X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 5AB3B14B2820 for ; Wed, 11 Aug 2004 10:02:18 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76849-09 for ; Wed, 11 Aug 2004 13:02:12 +0000 (GMT) Received: from curie.credativ.org (credativ.com [217.160.209.18]) by svr1.postgresql.org (Postfix) with ESMTP id 7E6A414B281B for ; Wed, 11 Aug 2004 10:02:10 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by curie.credativ.org (Postfix) with ESMTP id CD6B655EAE; Wed, 11 Aug 2004 15:02:13 +0200 (CEST) Received: from www.credativ.de (pD9500869.dip0.t-ipconnect.de [217.80.8.105]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by curie.credativ.org (Postfix) with ESMTP id 5412D55BCC; Wed, 11 Aug 2004 15:02:13 +0200 (CEST) Received: from bell.credativ.de (bell.credativ.de [172.26.14.16]) by www.credativ.de (Postfix) with ESMTP id 8135C1C000B; Wed, 11 Aug 2004 15:02:11 +0200 (CEST) From: Peter Eisentraut To: Lars Erik Thorsplass Subject: Re: Inserts with incomplete rows... NOT NULL constraints Date: Wed, 11 Aug 2004 15:02:08 +0200 User-Agent: KMail/1.6.2 Cc: pgsql-sql@postgresql.org References: <7eeb33a040811053563894d7b@mail.gmail.com> In-Reply-To: <7eeb33a040811053563894d7b@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408111502.08030.peter_e@gmx.net> X-Virus-Scanned: by AMaViS at credativ.com X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.2 tagged_above=0.0 required=5.0 tests=RCVD_IN_NJABL, RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200408/83 X-Sequence-Number: 18580 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/