On Fri, Nov 09, 2018 at 11:40:44AM +0100, Daniel Verite wrote: > The above is meant to accept a multibyte character as the separator, > in which case strlen(value) would be greater than 1.
Still what's the point except complicating the code? We don't care about anything fancy in the backend-side ProcessCopyOptions() when checking cstate->delim, and having some consistency looks like a good thing to me. I am also questioning a couple of things: it is possible to choose freely how to represent a null value thanks to "\pset null", which gives an equivalent to the COPY option. Choosing if a header is present or not can be done with tuples_only. However there is no option to specify an escape character, no option to specify a quote character, and it is not possible to force quotes for all values. Those are huge advantages as any output can be made compatible with other CSV variants. Isn't what is presented too limited? \copy has at least the advantage to push down those responsibilities to the backend.. -- Michael
signature.asc
Description: PGP signature