I'm using PostgreSQL 9.5.6. I have space separated multi-word strings that I need to shorten to say 3 words?
I've looked at the documentation and in order to use the substring() functions I need to know the index position of the char where I want to start extraction, but the strings I'm working with are varying length.
I've also looked at split_part() and that only returns one word.
How can I get something like:
hello everyone out there somewhere
hello everyone out