Postgres String Operations In C