How to write a mask function in PostgreSQL which will take a given string and replace the given positions.
I pass ('THOMAS,RANJAN,JDJDJDJ,OOOO','1,2,3') it should result 'TxxxAS,RANJAN,JDJDJDJ,OOOO'
Here '1,2,3' are the positions I want to replace with x