Postgresql – How to trim a string by the nth occurrence of a special character?
I have string values (filed name: filename) that follow a certain template: filename_this_is_called_Plan_A file_this_is_Plan_A filename2024_this_is_known_as_Plan_A While the strings are all a different length, they all end with _Plan_A, also known as the segment. How can I trim this in PostgreSQL…