aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeModifyTable.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-03-14 10:34:08 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-03-14 10:34:08 +0100
commita359d3701991d040bf7b66cfa7052546eb923c38 (patch)
tree2d22e60a2d991fc36f085aab87a07789afad5cd2 /src/backend/executor/nodeModifyTable.c
parent1548c3a30436dd825cfbf57923c6766b2fddd355 (diff)
downloadpostgresql-a359d3701991d040bf7b66cfa7052546eb923c38.tar.gz
postgresql-a359d3701991d040bf7b66cfa7052546eb923c38.zip
Simplify and generalize PrepareSortSupportFromIndexRel()
PrepareSortSupportFromIndexRel() was accepting btree strategy numbers purely for the purpose of comparing it later against btree strategies to determine if the sort direction was forward or reverse. Change that. Instead, pass a bool directly, to indicate the same without an unfortunate assumption that a strategy number refers specifically to a btree strategy. (This is similar in spirit to commits 0d2aa4d4937 and c594f1ad2ba.) (This could arguably be simplfied further by having the callers fill in ssup_reverse directly. But this way, it preserves consistency by having all PrepareSortSupport*() variants be responsible for filling in ssup_reverse.) Moreover, remove the hardcoded check against BTREE_AM_OID, and check against amcanorder instead, which is the actual requirement. Co-authored-by: Mark Dilger <mark.dilger@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330@enterprisedb.com
Diffstat (limited to 'src/backend/executor/nodeModifyTable.c')
0 files changed, 0 insertions, 0 deletions