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 1fzJxo-0004RH-KO for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Sep 2018 11:02:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fzJxm-0008Lt-9a for pgsql-hackers@arkaria.postgresql.org; Mon, 10 Sep 2018 11:02:38 +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 1fzJxl-0008Lc-JQ for pgsql-hackers@lists.postgresql.org; Mon, 10 Sep 2018 11:02:37 +0000 Received: from mail.postgrespro.ru ([93.174.131.138]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fzJxh-0002K9-Jo for pgsql-hackers@postgresql.org; Mon, 10 Sep 2018 11:02:36 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 0B11E21C1FB5; Mon, 10 Sep 2018 14:02:31 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from asp437-ThinkPad-L380 (unknown [176.50.147.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id D126A21C1FB4; Mon, 10 Sep 2018 14:02:26 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1536577350; bh=rgePiSQ9cteXP6O8tqYDlqNaHxBZjknysIkWIR2g7EQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=pfrpQKaBWQpS9An959ATOfF9sxAo6HovpRi2zPNMpN3HVWy11rmtyY42jEM2fbYQX ycYQATxZZ4cBxkAIi3hqa2tXwPeLDYZMy+mxeW65Rd3WHB0CADLqHt/VVTl39nxKfx /kzbV+LpMlU3fh1BFDQMibzQuhwK0v/TVtwseza0= Date: Mon, 10 Sep 2018 18:02:10 +0700 From: Aleksandr Parfenov To: Nikolay Shaplov Cc: Nikita Glukhov , Alvaro Herrera , PostgreSQL mailing lists Subject: Re: [PATCH][PROPOSAL] Add enum releation option type Message-ID: <20180910180210.579b8303@asp437-ThinkPad-L380> In-Reply-To: <3831139.TYuODbpbJx@x200m> References: <20180215213518.5btgsjhbjxlolife@alvherre.pgsql> <68976929-aeeb-336d-869c-94e53c9b1c87@postgrespro.ru> <3831139.TYuODbpbJx@x200m> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Nikolay, I did a quick look at yout patch and have some questions/points to discuss. I like the idea of the patch and think that enum reloptions can be useful. Especially for some frequently checked values, as it was mentioned before. There are few typos in comments, like 'validateing'. I have two questions about naming of variables/structures: 1) variable opt_enum in parse_one_reloption named in different way other similar variables named (without underscore). 2) enum gist_option_buffering_numeric_values/gist_option_buffering_value_numbers. Firstly, it has two names. Secondly, can we name it gist_option_buffering, why not? As you mentioned in previous mail, you prefer to keep enum and relopt_enum_element_definition array in the same .h file. I'm not sure, but I think it is done to keep everything related to enum in one place to avoid inconsistency in case of changes in some part (e.g. change of enum without change of array). On the other hand, array content created without array creation itself in .h file. Can we move actual array creation into same .h file? What is the point to separate array content definition and array definition? -- Aleksandr Parfenov Postgres Professional: http://www.postgrespro.com Russian Postgres Company