replace COPY FROM with a set of inserts