script to copy r data() to pg tables