Based on the table:
id | value
-------------------
1 | food
2 | foot
3 | barfoo
4 | bar
5 | baz
Using postgres, I want to find all the lines in which the value field matches the beginning of the search field. Similar to SELECT * FROM table where 'foo' ilike value%
A search for "foo" will return food and foot, but not barfoo.
I think it should be easy, but I am missing something obvious.
source share