pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
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: Wed, 3 Feb 2021 15:52:51 +0100
Message-ID: <aeb41d57-da42-b46d-bfc1-4933afbc5658@enterprisedb.com> (raw)
In-Reply-To: <9fc7eb48-0e8f-0836-8def-bc4b242e9c63@iki.fi>
References: <bb9d60b4-aadb-607a-1a9d-fdc3434dddcd@enterprisedb.com>
	<9fc7eb48-0e8f-0836-8def-bc4b242e9c63@iki.fi>

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.






view thread (6+ messages)  latest in thread

Message-ID: <aeb41d57-da42-b46d-bfc1-4933afbc5658@enterprisedb.com>
Permalink:  ../aeb41d57-da42-b46d-bfc1-4933afbc5658@enterprisedb.com/
Also on:    postgresql.org/message-id/aeb41d57-da42-b46d-bfc1-4933afbc5658@enterprisedb.com

 · 

reply

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: <aeb41d57-da42-b46d-bfc1-4933afbc5658@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