From: | Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: dubious error message from partition.c |
Date: | 2017-08-09 05:49:49 |
Message-ID: | a621abe3-38ca-bac8-7aa4-3d68b79f5b6b@lab.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2017/08/09 13:03, David G. Johnston wrote:
> On Tue, Aug 8, 2017 at 8:34 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> A small suggestion is that it'd be better to write it like "Specified
>> upper bound \"%s\" precedes lower bound \"%s\"." I think "succeeds" has
>> more alternate meanings than "precedes", so the wording you have seems
>> more confusing than it needs to be. (Of course, the situation could be
>> the opposite in other languages, but translators have the ability to
>> reverse the ordering if they need to.)
>>
>> Or you could just go with "follows" instead of "succeeds".
>>
>
> "exceeds" seems to be the word the original sentence was looking for. If
> using a single word I kinda like reversing the direction and using
> "precedes" though. "follows" makes it sound like a puppy :)
>
> "is greater than" is a bit more verbose but an option as well - one that
> seems more natural in this space - and yes I've reverted back to
> lower->upper with this wording. I think the hard "x" in exceeds is what
> turned me off to it.
I went with the Tom's suggested "Specified upper bound %s precedes lower
bound %s." in the attached patch.
Although, we can also consider a message along the lines suggested by
David: "Specified upper bound is less than (less than or equal to) lower
bound." or "Specified lower bound is greater than (greater than or equal
to) upper bound", because the "precedes" version looks a bit odd in the
following, for example:
CREATE TABLE fail_part PARTITION OF range_parted2 FOR VALUES FROM (1) TO (1);
-ERROR: cannot create range partition with empty range
+ERROR: invalid range bound specification for partition "fail_part"
+DETAIL: Specified upper bound (1) precedes lower bound (1).
In any case, for someone to make sense of why that leads to an empty
range, they have to remember the rule that the upper bound is an exclusive
bound.
Thanks,
Amit
Attachment | Content-Type | Size |
---|---|---|
0001-Fix-error-message-when-apprently-empty-range-bound-i.patch | text/plain | 5.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2017-08-09 06:42:25 | Re: Re: [COMMITTERS] pgsql: Fix inadequacies in recently added wait events |
Previous Message | Konstantin Knizhnik | 2017-08-09 05:10:07 | Re: Error : undefined symbol : LWLockAssign in 9.6.3 |