Postgres View Function Package In R