Re: [PATCH] seg: preserve the upper boundary's certainty indicator in seg_out()

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Ewan Young <kdbase(dot)hack(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] seg: preserve the upper boundary's certainty indicator in seg_out()
Date: 2026-06-11 09:45:32
Message-ID: cbb5de5e-56e5-4789-b830-4777c665a355@iki.fi
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/06/2026 10:03, Ewan Young wrote:
> Certainty indicators are documented to be preserved on output (they are
> ignored by the operators, but kept as a comment), so this breaks the
> input/output round-trip for the affected values.

As a side note, while ignoring the boundaries makes sense for comparison
operators, seg_union() and seg_intersect() need to do with them. That's
not documented anywhere, and their current behavior seems pretty
arbitrary. We haven't actually documented those functions at all, I
think they were added just for the GiST support and calling them
directly from SQL was an afterthought.

> The attached patch fixes the one-character typo and adds regression
> tests that place each indicator on both boundaries of an interval, so
> the upper-boundary case is now covered. make installcheck passes with
> the fix and fails without it.

Applied to master and all stable branches, thanks!

- Heikki

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Junwang Zhao 2026-06-11 09:50:51 Re: PG19 FK fast path: OOB write and missed FK checks during batched
Previous Message Ewan Young 2026-06-11 09:40:38 [PATCH] Fix some typos in code comments