Postgresql C Function In R