Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nqDK3-0000mh-99 for pgsql-hackers@arkaria.postgresql.org; Sun, 15 May 2022 12:26:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nqDK2-0000iv-2Z for pgsql-hackers@arkaria.postgresql.org; Sun, 15 May 2022 12:26:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nqDK1-0000il-OI for pgsql-hackers@lists.postgresql.org; Sun, 15 May 2022 12:26:05 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nqDJv-0004yX-3C for pgsql-hackers@lists.postgresql.org; Sun, 15 May 2022 12:26:04 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 1673D32004CE; Sun, 15 May 2022 08:25:57 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Sun, 15 May 2022 08:25:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1652617556; x=1652703956; bh=VeB7HO2H8YJZnU/l0XtpymLJ2Xm8 D2svVx3bzuQWUus=; b=M8/lpILdjCZpL10B8xsZySHEaCZVVfX3xIeL1/4CaP0D 78f8eracYtFagY04FiYQIY76HH/Wb7dLR3J8lQbNsPUAKTcQ592KrdwOC2vMOMG2 ZHH8qvEZi6sqhH/1YmuMJfCvEbRSCF3lpb52urOmZLamQAyAnchc3pb8oIX/8POp pNRP/a27Fe/wQEUqZ1aALbWXUgNMpBSgwKwmo6YoXWXm3GOKY/o7JeXTTUoxmQ/6 eSpEB9nJgF1u0Z1gWhkl8aJ2fAvFPhFUAmxG/hTHul29bJbXjap293WweFaCw70S PGKSI6f8g3a9rmJiuCnurVJU+AyosJsNa9bavDl10g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrheefgdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeejkeff gfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 15 May 2022 08:25:55 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 6DD4D2A6B58; Sun, 15 May 2022 14:25:47 +0200 (CEST) Date: Sun, 15 May 2022 14:25:47 +0200 From: Alvaro Herrera To: Nikolay Shaplov Cc: Andres Freund , pgsql-hackers@lists.postgresql.org, Michael Paquier , Amit Langote Subject: Re: [PATCH] New [relation] option engine Message-ID: <202205151225.jbalr77h46jc@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2827066.dzGTFBD8OB@thinkpad-pgpro> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I'm sorry if you've already said this elsewhere, but can you please state what is the *intention* of this patchset? If it's a pure refactoring (but I don't think it is), then it's a net loss, because after pgindent it summarizes as: 58 files changed, 2714 insertions(+), 2368 deletions(-) so we end up 500+ lines worse than the initial story. However, I suspect that's not the final situation, since I saw a comment somewhere that opclass options have to be rewritten to modify this mechanism, and I suspect that will remove a few lines. And you maybe have a more ambitious goal. But what is it? Please pgindent your code for the next submission, making sure to add your new typedef(s) to typedefs.list so that it doesn't generate stupid spaces. After pgindenting you'll notice the argument lists of some functions look bad (cf. commit c4f113e8fef9). Please fix that too. I notice that you kept the commentary about lock levels in the place where they were previously defined. This is not good. Please move each explanation next to the place where each option is defined. For next time, please use "git format-patch" for submission, and write a tentative commit message. The committer may or may not use your proposed commit message, but with it they will know what you're trying to achieve. The translatability marker for detailmsg for enums is wrong AFAICT. You need gettext_noop() around the strings themselves IIRC. I think you need to get rid of the _() call around the variable that receives that value and use errdetail() instead of errdetail_internal(), to avoid double-translating it; but I'm not 100% sure. Please experiment with "make update-po" until you get the messages in the .po file. You don't need braces around single-statement blocks. Thanks -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "World domination is proceeding according to plan" (Andrew Morton)