From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Heikki Linnakangas <hlinnaka@iki.fi>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Improve new hash partition bound check error messages
Date: Mon, 22 Feb 2021 08:09:46 +0100
Message-ID: <0e685d51-d214-3dde-8e78-23edfec055dc@enterprisedb.com> (raw)
In-Reply-To: <b7a09729-7815-4bf5-c74c-211ac4997688@enterprisedb.com>
References: <bb9d60b4-aadb-607a-1a9d-fdc3434dddcd@enterprisedb.com>
<9fc7eb48-0e8f-0836-8def-bc4b242e9c63@iki.fi>
<aeb41d57-da42-b46d-bfc1-4933afbc5658@enterprisedb.com>
<b7a09729-7815-4bf5-c74c-211ac4997688@enterprisedb.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: peter.eisentraut@enterprisedb.com, hlinnaka@iki.fi
Subject: Re: Improve new hash partition bound check error messages
In-Reply-To: <0e685d51-d214-3dde-8e78-23edfec055dc@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox