When the number of bigrams is only one, obviously there is
no duplicated bigrams and its elimination is not needed.
This commit comes from the change of PostgreSQL:
c3ccc9ee584b9b015dd9c1931e261e21f3961e5f
The issue which this commit has addressed is basically
harmless, but there is no strong reason not to back-patch
this. So back-patch to all supported versions.
Beena Emerson
if ((len = bptr - GETARR(bgm)) == 0)
return bgm;
if ((len = bptr - GETARR(bgm)) == 0)
return bgm;
+ /*
+ * Make bigrams unique.
+ */
+ if (len > 1)
/*
* Make bigrams unique.
*/
/*
* Make bigrams unique.
*/