Patrick B Kelly <pbk@patrickbkelly.org> writes:
> What about just coding a FSM into
> backend/commands/copy.c:CopyReadLine() that does not process any flavor
> of NL characters when it is inside of a data field?
CopyReadLine has no business tracking that. One reason why not is that
it is dealing with data not yet converted out of the client's encoding,
which makes matching to user-specified quote/escape characters
difficult.
regards, tom lane