Take advantage of the copy_data method from pg 0.17+.