pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Pavel Borisov <pashkin.elfe@gmail.com>
Cc: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17847: Unaligned memory access in ltree_gist
Date: Tue, 18 Apr 2023 11:25:42 -0400
Message-ID: <2656633.1681831542@sss.pgh.pa.us> (raw)
In-Reply-To: <CALT9ZEGhQfRM5ix280xeQgRm4RzO2QW58Nxv2VdLwu6tQh0uUg@mail.gmail.com>
References: <17847-171232970bea406b@postgresql.org>
	<3966266.1678995315@sss.pgh.pa.us>
	<CAPpHfds=s6CmMzB1pO2UX9QnUvz6nOWofdnK84NXPQdVp0VWEw@mail.gmail.com>
	<365d1917-f5b7-ff20-2d0b-8d501cee5434@gmail.com>
	<CAPpHfdvvB1-tGha_CXeN5ojWZ48=C77sSrVkgSLLFCVMfv0s1Q@mail.gmail.com>
	<CALT9ZEF9RnRM9gkE6J_GLN8XTdQ3gZw=c6CHyZY5VueAs4T0PA@mail.gmail.com>
	<CAPpHfduJEJbeRGm-VgeyPAzNzC6oc8u+WNqfcZgWnXPUo6F6Dg@mail.gmail.com>
	<CALT9ZEHCN686xmRGorzoAcAJfE6NnNwDuAE=TxAe1tcp5aQTiA@mail.gmail.com>
	<CAPpHfdt7Jonzoh763XbP0idPUPp5JaTj2rtQotXLsrr0+Dqp-A@mail.gmail.com>
	<2654443.1681830401@sss.pgh.pa.us>
	<CALT9ZEGhQfRM5ix280xeQgRm4RzO2QW58Nxv2VdLwu6tQh0uUg@mail.gmail.com>

Pavel Borisov <pashkin.elfe@gmail.com> writes:
> On Tue, 18 Apr 2023 at 19:06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The DETAIL message's grammar seems a bit off.  Also, this is confusing the
>> range limitation with the alignment requirement.  How about just saying
>> ERROR:  siglen value must be a multiple of 4

> I definitely like this wording.

>> and leaving out-of-range cases to be handled by the existing check?

> But that means that if we try 2025 then we just get it is not multiple
> of 4 (and no clue of the range). Then we try 2028 and get another
> error that it's outside of range. I suppose giving clues one by one
> makes this look like a step-by-step quest. But in principle it's
> possible.

Well, that's the case just about everywhere else that there are multiple
constraints on an input.  It'd be impossibly unwieldy, and confusing,
for every error message to include details on all the other errors
you might have hit if you didn't hit that one.

FWIW, I find it odd that the multiple-of-4 error comes out in advance
of the range check; that seems backwards somehow.  Maybe we should
alter the order of applying the range check and the custom validator?

			regards, tom lane





view thread (20+ messages)  latest in thread

Message-ID: <2656633.1681831542@sss.pgh.pa.us>
Permalink:  ../2656633.1681831542@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2656633.1681831542@sss.pgh.pa.us

 · 

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-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pashkin.elfe@gmail.com, aekorotkov@gmail.com, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17847: Unaligned memory access in ltree_gist
  In-Reply-To: <2656633.1681831542@sss.pgh.pa.us>

* 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