Re: BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns
Date
Msg-id ZGcMAtZiHe2EUllk@paquier.xyz
Whole thread Raw
In response to Re: BUG #17884: gist_page_items() crashes for a non-leaf page of an index with non-key columns  (Michael Paquier <michael@paquier.xyz>)
List pgsql-bugs
On Thu, May 18, 2023 at 04:16:24PM +0900, Michael Paquier wrote:
> The format output could be tweaked forever, so if there are arguments
> for more improvements, we could always discuss that later as adapted
> and the tests will be here to provide coverage.  I am planning to
> apply and backpatch that down to v14 tomorrow.

Well, I have woken up on this one and using parentheses was still
confusing when I attached composite types into the INCLUDE clause, so
I have looked again at record_out() and hstore, and noted that the
part where we apply the double quotes to the values is actually ~15
lines.  With that, it is easily possible to apply it to all the
values, giving a representation close to how rows display for a nice
result.

So, at the end, I have used that, reduced a bit the scope of the
tests, and applied the result down to 14.  Note the trick with
regexp_replace() to avoid some issues I noticed with alignment when
using -m32 for the non-leaf page when using INCLUDE.  The
documentation needed also a refresh to show the new output generated.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: Thomas Munro
Date:
Subject: Re: llvmjit.so: undefined symbol: LLVMBuildGEP Fedora 38
Next
From: Richard Guo
Date:
Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)