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 1l7JXE-0000AK-Pd for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Feb 2021 14:53:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1l7JWg-0008SS-KJ for pgsql-hackers@arkaria.postgresql.org; Wed, 03 Feb 2021 14:53:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l7JWg-0008SL-DL for pgsql-hackers@lists.postgresql.org; Wed, 03 Feb 2021 14:53:02 +0000 Received: from forward4-smtp.messagingengine.com ([66.111.4.238]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l7JWb-0004lq-3f for pgsql-hackers@postgresql.org; Wed, 03 Feb 2021 14:53:01 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailforward.nyi.internal (Postfix) with ESMTP id 0EF0B1940959; Wed, 3 Feb 2021 09:52:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 03 Feb 2021 09:52:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=DLBW+1khn5GB/ThNy/dv0OYNCtMV6NTfAf225UJQR gM=; b=LxMD4jeLiJ0T6zf1k0WqANqzrrbiAaEQsWrIkERtv4++tyKHTmgerVqla 74UZGJwywakjl67BIT+LMAkYJRSkFWElMI3bYXd52O94tAopUgdrwvWX6jUrv/wv EYBXyfCtQVZ4C+YTkjnCTQxKOe3xmxSbwGAYKrxkIeCWUov01K24JqGSLJn/PoCu uvZZqnunzRbu++lO4uTz0JXc6LXkfEaMU8Ir29XJXnjZ2IL0BLYmPbdsXM0nXpMG 0DVai5x14mA5GuKMBWpLvt7Kwn+kDXXOlm4kZdYu+SmZmaeNHac9KCarJ/ClgvpV ayzvb4xIkj9KM9gN1c9boAmJYUK1w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgedvgdeikecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhfhokffffgggjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheehieejgfevhfdvheel keeuvefhheehvdehtefghfetfeeggefgveejjeffgfdvnecukfhppeekjedrudejjedrie elrddugedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhepphgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: from april.pezone.net (p57b1458c.dip0.t-ipconnect.de [87.177.69.140]) by mail.messagingengine.com (Postfix) with ESMTPA id 89A1F24005E; Wed, 3 Feb 2021 09:52:53 -0500 (EST) Subject: Re: Improve new hash partition bound check error messages To: Heikki Linnakangas , pgsql-hackers References: <9fc7eb48-0e8f-0836-8def-bc4b242e9c63@iki.fi> From: Peter Eisentraut Organization: EnterpriseDB Message-ID: Date: Wed, 3 Feb 2021 15:52:51 +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: <9fc7eb48-0e8f-0836-8def-bc4b242e9c63@iki.fi> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2021-02-02 13:26, Heikki Linnakangas wrote: > How about this? > > CREATE TABLE fail_part PARTITION OF hash_parted FOR VALUES WITH (MODULUS > 25, REMAINDER 3); > ERROR: every hash partition modulus must be a factor of the next larger > modulus > DETAIL: 25 is not divisible by 10, the modulus of existing partition > "hpart_1" I don't know if we can easily get the name of the existing partition. I'll have to check that. I'm worried that this phrasing requires the user to understand that "divisible by" is related to "factor of", which is of course correct but introduces yet more complexity into this. I'll play around with this a bit more.