Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXw2j-0006SJ-TC for pgsql-bugs@arkaria.postgresql.org; Thu, 02 May 2013 16:07:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1UXw2j-00056k-86 for pgsql-bugs@arkaria.postgresql.org; Thu, 02 May 2013 16:07:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXw2i-00056f-OM for pgsql-bugs@postgresql.org; Thu, 02 May 2013 16:07:36 +0000 Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1UXw2f-0003dH-LG for pgsql-bugs@postgresql.org; Thu, 02 May 2013 16:07:36 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UXw2e-0005Gx-VS for pgsql-bugs@postgresql.org; Thu, 02 May 2013 18:07:32 +0200 Received: from ppp-46-244-221-120.dynamic.mnet-online.de ([46.244.221.120]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 May 2013 18:07:32 +0200 Received: from spam_eater by ppp-46-244-221-120.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 02 May 2013 18:07:32 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-bugs@postgresql.org From: Thomas Kellerer Subject: Re: BUG #8132: Not Null column should set default value when inserting or setting null Date: Thu, 02 May 2013 18:07:22 +0200 Lines: 12 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ppp-46-244-221-120.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: X-Pg-Spam-Score: -4.4 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hajo@Lemcke.com wrote on 02.05.2013 10:18: > I would like to have the default value replace a given null value if the > column is specified with not null and default. > > The SQL specification only requires to set the default value when the column > is omitted on insert or update. > > I think this is a flaw in the specification because it requires developers > to create multiple statements for inserts and updates for all combinations > of default not null columns. You can use DEFAULT instead of NULL, no need to have different statements. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs