Re: pgsql: Generalize hash and ordering support in amapi
От | Peter Eisentraut |
---|---|
Тема | Re: pgsql: Generalize hash and ordering support in amapi |
Дата | |
Msg-id | 5cc4192a-7c28-4a69-a879-477b5ece600c@eisentraut.org обсуждение исходный текст |
Ответ на | Re: pgsql: Generalize hash and ordering support in amapi (Mark Dilger <mark.dilger@enterprisedb.com>) |
Список | pgsql-committers |
On 27.02.25 23:17, Mark Dilger wrote: > > On Thu, Feb 27, 2025 at 8:27 AM Tom Lane <tgl@sss.pgh.pa.us > <mailto:tgl@sss.pgh.pa.us>> wrote: > > Peter Eisentraut <peter@eisentraut.org > <mailto:peter@eisentraut.org>> writes: > > Generalize hash and ordering support in amapi > > Stop comparing access method OID values against HASH_AM_OID and > > BTREE_AM_OID, and instead check the IndexAmRoutine for an index > to see > > if it advertises its ability to perform the necessary ordering, > > hashing, or cross-type comparing functionality. A field amcanorder > > already existed, this uses it more widely. Fields amcanhash and > > amcancrosscompare are added for the other purposes. > > AFAICS, this patch sets amcancrosscompare true only for btree, > which means this change to equality_ops_are_compatible is surely wrong: > > - /* must be btree or hash */ > - if (op_form->amopmethod == BTREE_AM_OID || > - op_form->amopmethod == HASH_AM_OID) > + if (amroutine->amcancrosscompare) > > > It seems you are right. hashhandler()'s amroutine should have this > true, also. I have fixed that. I will come back to the rest of the discussion in a bit.
В списке pgsql-committers по дате отправления: