Plpgsql string match (find position in text / indexOf)

position(... IN ...) tells you the position of a string in another, starting at 1 and giving 0 for not found.

position('he' IN 'hello'); 

That will return 1. If you want to ignore upper and lower case, use lower(str).

postgresql

Edit on github
comments powered by Disqus
Click me