Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKWy1-0007of-LR for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Nov 2017 22:06:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eKWy0-0005ly-FA for pgsql-hackers@arkaria.postgresql.org; Thu, 30 Nov 2017 22:06:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eKWy0-0005lo-7T for pgsql-hackers@lists.postgresql.org; Thu, 30 Nov 2017 22:06:00 +0000 Received: from forward1j.cmail.yandex.net ([2a02:6b8:0:1630::14]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eKWxx-0002lJ-3p for pgsql-hackers@postgresql.org; Thu, 30 Nov 2017 22:05:59 +0000 Received: from mxback2j.mail.yandex.net (mxback2j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10b]) by forward1j.cmail.yandex.net (Yandex) with ESMTP id DD9ED20C58; Fri, 1 Dec 2017 01:05:54 +0300 (MSK) Received: from web16o.yandex.ru (web16o.yandex.ru [2a02:6b8:0:1a2d::5:116]) by mxback2j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id PtHPt1pRZC-5qxe1PFt; Fri, 01 Dec 2017 01:05:53 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zsrv.org; s=mail; t=1512079553; bh=WhwFvy+bYlDWpYxEZvURZcKO+fYh7vwpgVj1HKlMKiA=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date; b=Rb+DjPMnNt1FxE8WQOAQDRaENvbaW3ml/edwDY01k3Xh3iUgrRGbOOWsXIebX4SA7 KeUscBDfUhb1LwxDL25u3kZntfKtZcFF7KH7Z78+TxQhsQp6CTqdV5dqIymW9dnJbx lMoIsa/1NWHDDw3frUuwM4x9+yHjfMLKgR/pQauw= Authentication-Results: mxback2j.mail.yandex.net; dkim=pass header.i=@zsrv.org Received: by web16o.yandex.ru with HTTP; Fri, 01 Dec 2017 01:05:52 +0300 From: Sergei Kornilov To: Robert Haas Cc: Tom Lane , Stephen Frost , "pgsql-hackers@postgresql.org" In-Reply-To: References: <81911511895540@web58j.yandex.ru> <20171129152135.GN4628@tamriel.snowman.net> <9878.1511970441@sss.pgh.pa.us> <370481511970756@web3j.yandex.ru> <491651511974381@web27j.yandex.ru> Subject: Re: using index or check in ALTER TABLE SET NOT NULL MIME-Version: 1.0 Message-Id: <602671512079552@web16o.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Fri, 01 Dec 2017 01:05:52 +0300 Content-Transfer-Encoding: 7bit Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thank you for review! My apologies for my errors. It seems i read developers wiki pages not enough carefully. I will reread wiki, code style and then update patch with all your remarks. > The comment /* T if we added new NOT NULL constraints */ should > probably be changed to /* T if we should recheck NOT NULL constraints > */ or similar. Correct. Hm, probably I will also rename this property to verify_new_notnull for clarity > I'd suggest registering this with the next CommitFest. Already done in https://commitfest.postgresql.org/16/1389/ , i noticed this step in wiki