Reverse btree indexes

From: Zach Aysan <zachaysan(at)gmail(dot)com>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Reverse btree indexes
Date: 2021-06-22 18:46:52
Message-ID: CABYkO2Bfg6sJviiOCBze0fJ5720Oo3VjRnVtVNKM-0i0exALVg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Hey there! Thanks for putting together such wonderful documentation. I have
a small suggestion for improvement.

*Page:* https://www.postgresql.org/docs/13/indexes-types.html

*Existing language:*

for example, col LIKE 'foo%' or col ~ '^foo', but not col LIKE '%bar'.

*Desired improvement:*

for example, col LIKE 'foo%' or col ~ '^foo', but not col LIKE '%bar',
> which would require a reversed index on the field. Postgres will
> automatically use the reverse index for LIKE '%bar'

*Or if it doesn't:*

> for example, col LIKE 'foo%' or col ~ '^foo', but not col LIKE '%bar',
> which would require a reversed index on the field. To use the reversed
> index, query with reverse(col) like reverse('%bar').

I hope you all have a great day!

Zach

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message David G. Johnston 2021-06-22 22:51:23 Re: Reverse btree indexes
Previous Message PG Doc comments form 2021-06-22 16:31:39 Operator function clarification needed