I have a column of words whose elements look like this:
id | word
---+---------
1 | cute
2 | advanced
3 | unusual
Suppose I want to run a query for the words "cuter" or "cutest." I'd like to do something like:
SELECT * FROM words WHERE word% LIKE 'cutest'
Of course, I realize that's not valid SQL syntax, but I want to match a superstring, not a substring.
I don't want to use the similarity package because it will match things like "notcute", whereas I only want to specify that the wildcard should go at the end of the field.
Is this possible to achieve in Postgres?