Re: Fix possible bogus array out of bonds (src/backend/access/brin/brin_minmax_multi.c)

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fix possible bogus array out of bonds (src/backend/access/brin/brin_minmax_multi.c)
Date: 2022-09-02 00:58:37
Message-ID: CAApHDvqxExQC3_GQLWDroEOncMw8ZpZesmFGsQ-fM_ARSB_WBA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 2 Sept 2022 at 12:55, Ranier Vilela <ranier(dot)vf(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonathan S. Katz 2022-09-02 00:59:06 Re: PostgreSQL 15 release announcement draft
Previous Message osumi.takamichi@fujitsu.com 2022-09-02 00:56:43 test_decoding assertion failure for the loss of top-sub transaction relationship