Re: Fix possible bogus array out of bonds (src/backend/access/brin/brin_minmax_multi.c) - Mailing list pgsql-hackers

From David Rowley
Subject Re: Fix possible bogus array out of bonds (src/backend/access/brin/brin_minmax_multi.c)
Date
Msg-id CAApHDvqxExQC3_GQLWDroEOncMw8ZpZesmFGsQ-fM_ARSB_WBA@mail.gmail.com
Whole thread Raw
In response to Re: Fix possible bogus array out of bonds (src/backend/access/brin/brin_minmax_multi.c)  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
On Fri, 2 Sept 2022 at 12:55, Ranier Vilela <ranier.vf@gmail.com> wrote:
> Why not?
> astate_values = accumArrayResult(astate_values,
>                           PointerGetDatum(a),
>                           false,
>                          TEXTOID,
>                          CurrentMemoryContext);
>
> Is it possible to avoid cstring_to_text conversion?

Note the element_type is being passed to accumArrayResult() as
TEXTOID, so we should be passing a text type, not a cstring type. The
conversion to text is required.

David



pgsql-hackers by date:

Previous
From: "osumi.takamichi@fujitsu.com"
Date:
Subject: test_decoding assertion failure for the loss of top-sub transaction relationship
Next
From: "Jonathan S. Katz"
Date:
Subject: Re: PostgreSQL 15 release announcement draft