Postgres Get Function In C