I was trying to extract some preparatory work from the remaining patches
and came up with the attached. This is part of your patch 0003, but
also relevant for part 0004. The problem was that COPY (SELECT *) is
not sufficient when the table has generated columns, so we need to build
the column list explicitly.
Thoughts?
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services