Re: [PATCH] seg: preserve the upper boundary's certainty indicator in seg_out()
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Heikki Linnakangas <hlinnaka@iki.fi>, Ewan Young <kdbase.hack@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-06-12T18:58:52Z
Lists: pgsql-hackers
On 2026-06-11 Th 5:45 AM, Heikki Linnakangas wrote: > 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! This is upsetting cross version upgrade tests, I assume since we didn't backport it to branches older than 14. Not sure what the best solution is. Drop the table, or at least the offending row? cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com
Commits
-
Adjust cross-version upgrade tests for seg_out() fix
- 7974f94a02a1 14 (unreleased) landed
- 8aede3600c84 15 (unreleased) landed
- d26641329346 16 (unreleased) landed
- c0d44e009406 17 (unreleased) landed
- 10e510423dc3 18 (unreleased) landed
- 3e3d7875e956 19 (unreleased) landed
-
seg: Fix seg_out() to preserve the upper boundary's certainty indicator
- 58b91fc73a86 14 (unreleased) landed
- b3aa2083a4da 15 (unreleased) landed
- 504ca05133db 16 (unreleased) landed
- bcbbd070d496 17 (unreleased) landed
- 0004cab4dc60 18 (unreleased) landed
- 0e1f1ed157e9 19 (unreleased) landed