Test using 'copy to' from postgresql, but impossible due to necessary
index corresponance
Adapt for copy to optimization