Andres Freund <andres@xxxxxxxxxxx> writes: > On February 11, 2018 2:48:13 PM PST, Tom Lane <tgl@xxxxxxxxxxxxx> wrote: >> (Any such patch should manage >> to turn COPY-CSV into an extension, at least so far as copy.c is >> concerned, even if we don't package it as one.) > Yea, I was thinking we should move all three (default, csv, binary) > supported formats to using such a facility. Hm, yeah, probably. That opens up a different dimension of variation: is the raw data text or binary? I'm thinking we shouldn't make the format handlers reinvent e.g. encoding conversion if they don't have to, so it's likely that some of the infrastructure for text data would remain in core copy.c. regards, tom lane