Re: Let an ordering index scan hand its ORDER BY value to the target list

From: Greg Burd <greg(at)burd(dot)me>
To: Greg Burd <greg(at)burd(dot)me>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Let an ordering index scan hand its ORDER BY value to the target list
Date: 2026-10-27 17:56:32
Message-ID: N8OH-VY2Aev7mvEaoQAicvVzGXMhwPN4-1N-gl8gLY2M4tv6m4hIWSnvw1HFO5V9T6Zf_szS8GOtz1XoXIHw_vN0F-YcDfDA3mnIr_PpROw=@burd.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

v12 attached, a few small fixes:

* 0001's comment in computeDistance() now says the box distance is
exact for box_ops keys and a lower bound for point_ops' internal
ones.

* join_path_target() in 0007 takes its shortcut for the target's cost
and width only when it sees that every value added a column, and
otherwise falls back to set_pathtarget_cost_width(). Before, an
Assert was the only guard.

* 0008 drops an Assert in search_indexed_tlist_for_nulled_expr() that
v11's NULL check made unsound.

* expr_contains() and strip_nullingrels() in clauses.c follow the
layout of the functions around them.

0002 through 0006 are the same as in v11.

The series applies to master as of 700b422af7e. Each patch builds
without warnings and passes the regress, isolation and btree_gist
suites on its own, and the series passes the running-server pass and
CI on Linux (32- and 64-bit), macOS, Windows and MinGW.

best.

-greg

Attachment Content-Type Size
v12-0001-Compute-the-distance-between-a-point-and-a-box-e.patch text/x-patch 22.0 KB
v12-0002-Let-an-ordering-index-scan-hand-its-ORDER-BY-val.patch text/x-patch 60.3 KB
v12-0005-Don-t-charge-an-index-only-scan-for-index-expres.patch text/x-patch 8.4 KB
v12-0006-Let-an-index-only-scan-win-on-the-index-expressi.patch text/x-patch 14.4 KB
v12-0008-Carry-index-computed-values-through-outer-joins-.patch text/x-patch 53.9 KB
v12-0007-Carry-index-computed-values-up-through-joins-and.patch text/x-patch 87.5 KB
v12-0003-Don-t-charge-an-ordering-index-scan-for-ORDER-BY.patch text/x-patch 23.5 KB
v12-0004-Let-an-ordering-index-scan-below-a-join-emit-its.patch text/x-patch 19.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Prashant Chinnam 2026-10-27 18:40:38 Re: [PATCH] pgcrypto: Fix sha-crypt rounds= values that do not fit in int (BUG #19743)
Previous Message Greg Burd 2026-10-27 17:50:50 Re: nbtree: opt-in leaf key prefix compression