Postgres Sql Using Function In C