Postgresql String Replace Function In C