Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fct2q-0003ST-Jp for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Jul 2018 13:51:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fct2o-0000m1-Nw for pgsql-hackers@arkaria.postgresql.org; Tue, 10 Jul 2018 13:51:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fct2o-0000lu-DV for pgsql-hackers@lists.postgresql.org; Tue, 10 Jul 2018 13:51:06 +0000 Received: from mahout.postgresql.org ([2001:4800:1501:1::227]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fct2k-0005Np-PS for pgsql-hackers@lists.postgresql.org; Tue, 10 Jul 2018 13:51:05 +0000 Received: from coridan.postgresql.org ([2001:4800:1501:1::213]) by mahout.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1fct2k-0007MO-Cr for pgsql-hackers@lists.postgresql.org; Tue, 10 Jul 2018 13:51:02 +0000 Received: from localhost ([127.0.0.1] helo=coridan.postgresql.org) by coridan.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fct2j-0006ss-HB for pgsql-hackers@lists.postgresql.org; Tue, 10 Jul 2018 13:51:01 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Subject: Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation To: pgsql-hackers@lists.postgresql.org From: Ashutosh Bapat Cc: Amit Langote Date: Tue, 10 Jul 2018 13:50:47 +0000 User-Agent: pgcommitfest X-cfsender: ashutoshbapat In-Reply-To: References: <152746742177.1291.9847032632907407358@wrigleys.postgresql.org> Message-ID: <153123064797.1384.12444178573294974260.pgcf@coridan.postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk SSBkaWRuJ3Qgc2VlIGFueSBoYWNrZXJzIHRocmVhZCBsaW5rZWQgdG8gdGhpcyBDRiBlbnRyeS4g SGVuY2Ugc2VuZGluZyB0aGlzIG1haWwgdGhyb3VnaCBDRiBhcHAuDQoNClRoZSBwYXRjaCBsb29r cyBnb29kIHRvIG1lLiBJdCBhcHBsaWVzIGNsZWFubHksIGNvbXBpbGVzIGNsZWFubHkgYW5kIG1h a2UgY2hlY2sgcGFzc2VzLg0KDQpJIHRoaW5rIHlvdSBjb3VsZCBhdm9pZCBjb25kaXRpb24NCisg ICAgICAgICAgICAgICAgICAgICAgIC8qIERvIG5vdCBvdmVycmlkZSBwYXJlbnQncyBOT1QgTlVM TCBjb25zdHJhaW50LiAqLw0KKyAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3RkZWYtPmlz X25vdF9udWxsKQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbGRlZi0+aXNfbm90X251 bGwgPSByZXN0ZGVmLT5pc19ub3RfbnVsbDsNCg0KYnkgcmV3cml0aW5nIHRoaXMgbGluZSBhcw0K Y29sZGVmLT5pc19ub3RfbnVsbCA9IGNvbGRlZi0+aXNfbm90X251bGwgfHwgcmVzdGRlZi0+aXNf bm90X251bGw7DQoNClRoZSBjb21tZW50IGxvb2tzIGEgYml0IG9kZCBlaXRoZXIgd2F5IHNpbmNl IHdlIGFyZSBjaGFuZ2luZyBjb2xkZWYtPmlzX25vdF9udWxsIGJhc2VkIG9uIHJlc3RkZWYtPmlz X25vdF9udWxsLiBUaGF0J3MgYmVjYXVzZSBvZiB0aGUgbmF0dXJlIG9mIGJvb2xlYW4gdmFyaWFi bGVzLiBNYXkgYmU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