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 1lE5M8-0004St-15 for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Feb 2021 07:10:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lE5M6-0006Ya-WE for pgsql-hackers@arkaria.postgresql.org; Mon, 22 Feb 2021 07:10:07 +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 1lE5M5-0006YF-Tn for pgsql-hackers@lists.postgresql.org; Mon, 22 Feb 2021 07:10:06 +0000 Received: from [64.147.123.34] (helo=wforward4-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lE5M2-0007DP-Qi for pgsql-hackers@postgresql.org; Mon, 22 Feb 2021 07:10:04 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailforward.west.internal (Postfix) with ESMTP id 4CF212D5; Mon, 22 Feb 2021 02:09:51 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 22 Feb 2021 02:09:51 -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=WmMociEUOGOUNuaW4xgdbcnInCjkXoOlGdimoJ1sz z0=; b=SGQjaMcIPG728VwtlD64huvRoyQGK4euZnv0yfBfE+gIqv1oP4ZmWEUQD JUW7Xxn3O0Ln5mqc9SkTc32CJo530rscxwZK3ZfQmBysXSA4tV9UBwD7HvWWe26a 3JGcNz6oHr9ks/K9GX1pZtst/8DUhYogYU92osjVV1lnHtOZoHyAyCjL3TKsgTUO NPwPFxdTKAmICoxqhCXNJJP5DdpeyVODjZQvY2p7KvFwkJHpDy+xw/VYv/y5f+va svnEx0KBo4LA7xgOQbjqqZv1ejkTMHRvSSLlNjATcCmyuTe3J0Dsbx3aCLlgKC3/ wHsgBJ9uz779dgNNBP5vKcEhliNDw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrkedvgddutdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffhvfhfkffffgggjggtgfesthekredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepffefgeeljeettddviefg keekvefgleduveetgfehteefleetteejueehgeegudehnecukfhppeekjedrudejjedrie elrddugedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhepphgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: from laptop206oxuk.local (p57b1458c.dip0.t-ipconnect.de [87.177.69.140]) by mail.messagingengine.com (Postfix) with ESMTPA id 9A8F724005B; Mon, 22 Feb 2021 02:09:49 -0500 (EST) Subject: Re: Improve new hash partition bound check error messages From: Peter Eisentraut To: Heikki Linnakangas , pgsql-hackers References: <9fc7eb48-0e8f-0836-8def-bc4b242e9c63@iki.fi> Message-ID: <0e685d51-d214-3dde-8e78-23edfec055dc@enterprisedb.com> Date: Mon, 22 Feb 2021 08:09:46 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.34 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 15.02.21 17:45, Peter Eisentraut wrote: > On 2021-02-03 15:52, Peter Eisentraut wrote: >> 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. > > Here is a new patch that implements the suggestions. committed