Useless removal of duplicate GIN index entries in pg_trgm

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Useless removal of duplicate GIN index entries in pg_trgm
Date: 2012-08-27 16:46:18
Message-ID: CAHGQGwEUmJ+Q0fd8eUJuE19-a4Hz1qtYHWSQ16avwfn8JxmL-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

After pg_trgm extracts the trigrams as GIN index keys, generate_trgm()
removes duplicate index keys, to avoid generating redundant index entries.
Also ginExtractEntries() which is the caller of pg_trgm does the same thing.
Why do we need to remove GIN index entries twice? I think that we can
get rid of the removal-of-duplicate code block from generate_trgm()
because it's useless. Comments?

Regards,

--
Fujii Masao

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gabriele Bartolini 2012-08-27 16:52:19 Italian PGDay 2012, Call for papers is now open
Previous Message Tom Lane 2012-08-27 16:40:37 Re: unsigned and signed chars in libpq API