Re: Supporting = operator in gin/gist_trgm_ops

Alexander Korotkov <aekorotkov@gmail.com>

From: Alexander Korotkov <aekorotkov@gmail.com>
To: Georgios <gkokolatos@protonmail.com>
Cc: Julien Rouhaud <julien.rouhaud@free.fr>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-11-14T05:30:51Z
Lists: pgsql-hackers

Attachments

Hi!

On Fri, Nov 13, 2020 at 1:47 PM Georgios <gkokolatos@protonmail.com> wrote:
> In short, I think v3 of the patch looks good to change to 'RFC' status.
> Given the possible costing concerns, I will refrain from changing the
> status just yet, to give the opportunity to more reviewers to chime in.
> If in the next few days there are no more reviews, I will update the
> status to 'RFC' to move the patch forward.
>
> Thoughts?

I went through and revised this patch.  I made the documentation
statement less categorical.  pg_trgm gist/gin indexes might have lower
performance of equality operator search than B-tree.  So, we can't
claim the B-tree index is always not needed.  Also, simple comparison
operators are <, <=, >, >=, and they are not supported.

I also have checked that btree_gist is preferred over pg_trgm gist
index for equality search.  Despite our gist cost estimate is quite
dumb, it selects btree_gist index due to its lower size.  So, this
part also looks good to me.

I'm going to push this if no objections.

------
Regards,
Alexander Korotkov

Commits

  1. Reword 'simple comparison' => 'inequality' in pgtrgm.sgml

  2. Add missing 'the' to pgtrgm.sgml

  3. Handle equality operator in contrib/pg_trgm