On 14.11.23 02:58, Jeff Davis wrote:
If the user just wants PK/FK constraints, and equality lookups, then an index with the "C" collation makes a lot of sense to serve those purposes.
The problem is that the user has no way to declare whether they just want this. The default assumption is that you get a btree and that is useful for range queries. If the user just wants equality lookups, they could use a hash index. Hash indexes kind of work like what we discussed in another message: They use C collation semantics unless the collation is declared nondeterministic. Of course, hash indexes don't support uniqueness, but maybe that could be fixed? And/or we could provide some other syntax that say, I want a btree but I just want equality lookups?