Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLEQl-0004HK-35 for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Nov 2018 21:35:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gLEQj-0006iX-H7 for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Nov 2018 21:35:05 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLEQj-0006iP-5v for pgsql-hackers@lists.postgresql.org; Fri, 09 Nov 2018 21:35:05 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gLEQg-0001PA-My for pgsql-hackers@lists.postgresql.org; Fri, 09 Nov 2018 21:35:03 +0000 Received: by mail-wm1-x32a.google.com with SMTP id r63-v6so3288589wma.4 for ; Fri, 09 Nov 2018 13:35:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=strobel.info; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=RIax7heJkoPV7R0n5pR6undK49aQHk4/n2vgEmPnZnc=; b=irirMGERTKYgdDb+N1jLoe2w8GlpRK7oCrAJDJYE0sbI2bkrNcOheNiPRMc4D+ArZx dk/ZAtZ9MHlytGNIinyr4/CHhBgglZXmBHZ2qyJXBStEugqx3ludcohV8RH40Oa4jwwP Cxnh9gopbSFQpXjCsLtfoq1Ds88UAPYVKd2kE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RIax7heJkoPV7R0n5pR6undK49aQHk4/n2vgEmPnZnc=; b=DQtS9l+ZboIg/pCg0wRifsgYBesHsYEs2sDwqipl/0I8WVscy0c+z8uRQUDydrfNGb bsDlU56PXMVROhixJVSx2L8TRXPifIlrFsZXex/EXf5qCwbKaCSj9cVBktge2HpQiPYL 3VGl6qjd3zmpDQqIh6Owr6a5ZlfooOPw587ffqGmtNh6m1SH7bk7y8xxcn4f2Pxuygy1 U9GAph0SX3czN7Tw9ozoKxurn93HDhp0YGnP7rO8ybVgvbGwAB3A/mbtUocxrx6dEsVE 2rnqts24FHIQFY8oUIQ8mM/DpnobQrOXxOYzwX4r9z3t3Y95RrLeQnWW5iUB5Jc3ivxz /2WA== X-Gm-Message-State: AGRZ1gL0RSAhrHh0lWoxucztupeJnHgg+h+dNYY0uzAH3x6zn2iqAuq2 1o14ZucWezWQQvXRILCYOFvr4FQTfvcOcg== X-Google-Smtp-Source: AJdET5eLpH+dgsiDEJ0T0WzesD5LurP0MQpz/y0LbCY1RrfCt4utLu8PaY3oykaMi7fUBzZ9nV2+rQ== X-Received: by 2002:a1c:5507:: with SMTP id j7-v6mr811794wmb.98.1541799300106; Fri, 09 Nov 2018 13:35:00 -0800 (PST) Received: from Juergens-MacBook.local (77.119.129.96.wireless.dyn.drei.com. [77.119.129.96]) by smtp.gmail.com with ESMTPSA id y2-v6sm14983700wrh.53.2018.11.09.13.34.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Nov 2018 13:34:59 -0800 (PST) Subject: Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation To: Alvaro Herrera Cc: Amit Langote , Amit Langote , PostgreSQL Hackers References: <20181109211106.ue3nkyyv62lyspab@alvherre.pgsql> From: =?UTF-8?Q?J=c3=bcrgen_Strobel?= Message-ID: <553783fa-c48f-629a-daa9-602599deb516@strobel.info> Date: Fri, 9 Nov 2018 22:34:37 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181109211106.ue3nkyyv62lyspab@alvherre.pgsql> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-11-09 22:11, Alvaro Herrera wrote: > On 2018-Nov-09, Jürgen Strobel wrote: > >> I am slightly confused now, I thought this landmine was already fixed in >> master and what remains is only whether to backport it or not? Which I >> guess depends on whether this is classified as a bug or not. > > Hmm, I changed (and back-patched) what happens to the NOT NULL clauses, > but as I understand the behavior of the DEFAULT clauses has not changed. > >> Since the fix has the potential to break current applications and the >> documentation is vague about wanted behavior I think it would be >> sensible to add a warning only, even if we agree to call it a bug. > > Hmm, the part I was first proposing to backpatch as an ERROR was a > mismatch in the COLLATE clause; then I talked about using a WARNING. I > ended up backpatching neither -- only immortalized the current behavior > in a test case. I think it should be an ERROR, but in master only. > > > The DEFAULT clauses are a different problem (landmine) :-) > OK got it. I agree about differing COLLATE clauses making no sense and with the ERROR+WARNING solution, but I didn't report that. The NULL violation is obvious too. I still hope for a bug fix for the DEFAULT clause with sensible restrictions. -Jürgen