Add a bound check to TidRangeEval

Junwang Zhao <zhjwpku@gmail.com>

From: Junwang Zhao <zhjwpku@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-06-08T09:41:17Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Improve comments for TidRangeEval

Attachments

Hi hackers,

The comments of TidRangeEval saids:

```
Returns false if we detect the range cannot contain any tuples.
```

After narrowing the upper and lower bounds, we can add an
additional check to verify if the lower bound exceeds the
upper bound. If true, return false to avoid unnecessary calls
to table_beginscan_tidrange.

PFA the trivial patch.

-- 
Regards
Junwang Zhao