got curl working in R, now need to pipe into postgres