Useless removal of duplicate GIN index entries in pg_trgm - Mailing list pgsql-hackers

From Fujii Masao
Subject Useless removal of duplicate GIN index entries in pg_trgm
Date
Msg-id CAHGQGwEUmJ+Q0fd8eUJuE19-a4Hz1qtYHWSQ16avwfn8JxmL-A@mail.gmail.com
Whole thread Raw
Responses Re: Useless removal of duplicate GIN index entries in pg_trgm
List 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: unsigned and signed chars in libpq API
Next
From: Gabriele Bartolini
Date:
Subject: Italian PGDay 2012, Call for papers is now open