Postgresql Left String Function In C