Re: Doc: Fix BrinOpcInfo members to match the code

From: "Ideriha, Takeshi" <iderihatakeshi(at)gmail(dot)com>
To: Kirill Reshke <reshkekirill(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Doc: Fix BrinOpcInfo members to match the code
Date: 2026-12-01 06:34:39
Message-ID: 7b9b2461-36ee-4525-95c1-5373eec2d418@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi all

Thank you for the comments.

On 12/1/26 1:41 PM, Fujii Masao wrote:
> On Tue, Dec 1, 2026 at 11:36 AM Ideriha, Takeshi
> <iderihatakeshi(at)gmail(dot)com> wrote:
>> The patch attached.
>
> Thanks for the patch! LGTM.
> Barring any objections, I will commit it and backpatch it to v15.

Thanks!

>> Maybe we could remove BrinOpcInfo structure from the
>
> +1 to removing it from the docs in master. I'm not sure how useful
> it is to document this structure. I guess that BRIN developers still
> need to consult the source, e.g., for related types such as BrinDesc
> and TypeCacheEntry anyway, regardless of whether this definition
> is documented.

Thank you for the comment. That's true. I was checking brin.c,
brin_minmax.c and so on while I was developing. I removed BrinOpcInfo
definition from the doc for master branch.

On 12/1/26 2:13 PM, Kirill Reshke wrote:
>> (I noticed other several things about BRIN also and will send another
>> patch.)
>
> Are they related to this one? If its all about doc we can commit it in one go
>

Other things I found are:
1. brin_minmax_multi_consistent() has a dead line of code
I posted in
https://www.postgresql.org/message-id/afc6425d-3f95-4aa0-ae65-e483c93b2436%40gmail.com

2. The doc says API name is unionTuples() but actually it seems union()
is correct according to the implementation such as brin_minmax_union()
or brin_minmax_multi_union(). There is a static function called
union_tuples() in brin.c, which wraps union function.

3. The return value of union() API is defined as bool in the doc and
actual source code such as pg_proc.dat but actual implementation just
returns such as brin_minmax_union() or brin_minmax_multi_union() void.
The caller function in brin.c also does not care return value.
This is harmless issue.

I already posted 1st point in another thread and it seems point 3rd
point needs some discussion including the code. The 2nd point seems very
simple one. So attached the patch for the 2nd point in this thread.

--
Regards,
Takeshi Ideriha

Attachment Content-Type Size
v1-0001-remove-BrinOpcInfo-defenition-from-the-doc.patch text/plain 1.5 KB
v1-0001-union-is-correct-API-name.patch text/plain 817 bytes
v1-0001-doc-Fix-BrinOpcInfo-members-to-match-the-code.patch text/plain 805 bytes

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Xueyu Gao 2026-12-01 06:45:41 pg_upgrade: backslash escaping in check_for_unicode_update()
Previous Message Michael Paquier 2026-12-01 06:22:00 Re: GetNewOidWithIndex() can reuse a TOAST value ID while its chunks are still in the heap