On Mon, May 14, 2018 at 09:37:07AM +0900, Michael Paquier wrote: > On Sun, May 13, 2018 at 07:01:00PM -0400, David Steele wrote: > > This patch makes sense to me and looks reasonable. > > One "potential" problem is if a relation has a full set of column which > allows the input of text-like data: if the header has been added with > COPY TO, and that the user forgets to add again the header option with > COPY FROM, then an extra row will be generated but there is the same > problem with CSV format :)
Yeah, I wonder if that can be addressed. I wonder if there was a way to let COPY FROM detect or ignore headers as appropriate and rather than cause silently result in headers being added as data. Maybe a blank line after the header line could prevent this confusion? Garick